본문 바로가기

728x90

CentOS7

CentOS 7 컨테이너 내에서 systemctl을 사용하는 방법(centos init) CentOS 7 컨테이너 내에서 systemctl을 사용하는 방법(centos init) 기본적으로 Docker 컨테이너는 systemd를 지원하지 않기 때문에 다음과 같은 방법을 사용하여 systemctl을 활성화할 수 있습니다. 1. Dockerfile 설정 Docker 이미지를 빌드할 때 systemd 지원을 활성화하려면 Dockerfile에 다음 명령을 추가합니다. vim Dockerfile # Use the CentOS 7 base image FROM centos:7 # Install systemd which will replace the entry point RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \ .. 더보기
PHP Redis 확장(Extension) 모듈을 설치하는 방법 PHP Redis 확장(Extension) 모듈을 설치하는 방법 redis server 설치 sudo yum install -y gcc gcc-c++ make jemalloc tcl sudo yum install -y redis systemctl --now enable redis redis-cli -h 127.0.0.1 -p 6379 ping redis extension 모듈 설치 phpredis 패키지 다운로드 wget https://github.com/phpredis/phpredis/archive/develop.zip unzip develop.zip cd phpredis-develop phpredis 소스 코드 컴파일 및 설치 /usr/local/php/bin/phpize ./configure --w.. 더보기
CentOS 7에서 OpenSSL을 최신 버전으로 업그레이드하는 방법 CentOS 7에서 OpenSSL을 최신 버전으로 업그레이드하는 방법 CentOS 7 OpenSSL 지원 프로토콜 확인 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 $ openssl ciphers -v | awk '{print $2}' | sort | uniq SSLv3 TLSv1.2 OpenSSL 삭제 yum remove openssl 기본 라이브러리 설치 yum install gcc gcc-c++ pcre-devel zlib-devel perl wget OpenSSL Downloads https://www.openssl.org/source/ 소스.. 더보기
HAProxy를 사용하여 고가용성(High Availability) 구성을 구현하는 방법 HAProxy (High Availability Proxy)를 사용하여 고가용성 (High Availability) 구성을 구현하는 방법 haproxy(로드밸런싱) : TCP/HTTP proxy and load balancer for high availability environments keepalived(이중화) : Load balancer and high availability service 구성 환경 서버 운영체제 아이피 패키지 비고 VIP 192.168.0.100 master CentOS 7.9 192.168.0.8 haproxy, keepalived backup CentOS 7.9 192.168.0.9 haproxy, keepalived web CentOS 7.9 192.168.0.7 ngin.. 더보기
[리눅스] CentOS 7에서 방화벽(firewalld) 설정하기 CentOS 7에서 방화벽(firewalld) 설정하기 방화벽 실행 여부 확인 firewall-cmd --state $ firewall-cmd --state not running 방화벽 실행 systemctl start firewalld.service 방화벽 실행 여부 확인 firewall-cmd --state $ firewall-cmd --state running FTP 서비스 추가 firewall-cmd --add-service=ftp $ firewall-cmd --add-service=ftp success public에 속한 모든 서비스/포트 목록 출력 firewall-cmd --zone=public --list-all $ firewall-cmd --zone=public --list-all publ.. 더보기
[리눅스] CentOS 7 런레벨(runlevel) 변경 CentOS 7 런레벨(runlevel) 변경 1. RunLevel config 파일 (CentOS 7 부터 systemctl 명령을 통해 RunLevel를 변경하도록 안내) vim /etc/inittab # inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # .. 더보기
[리눅스] OpenLDAP 설치 및 구성 OpenLDAP 설치 및 구성 OpenLDAP 설치 yum install -y compat-openldap openldap openldap-servers openldap-clients $ yum install -y compat-openldap openldap openldap-servers openldap-clients openldap-servers-sql openldap-devel OpenLDAP 데이터베이스 설정 cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG chown ldap. /var/lib/ldap/DB_CONFIG $ cp /usr/share/openldap-servers/DB_CONFIG.example /var.. 더보기
애플 맥북 실리콘 M1에서 도커 컨테이너 실행 시 오류 애플 맥북 실리콘 M1에서 도커 컨테이너 실행 시 오류 The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 해당 오류는 이미지 플랫폼이 호스트 플랫폼과 일치하지 않을 때 발생합니다. 예를 들어, linux/amd64 플랫폼의 이미지를 linux/arm64/v8 플랫폼의 호스트에서 실행하려고 할 때 이 오류가 발생할 수 있습니다. 이 문제를 해결하기 위해 다음 중 하나를 시도할 수 있습니다. 1. 호스트 플랫폼과 일치하는 이미지 사용: 호스트의 플랫폼에 맞는 이미지를 사용해야 합니다. 예를 들어, linu.. 더보기

728x90