본문 바로가기

728x90

2021/11

CentOS 7에서 bash 자동 완성을 사용하는 방법 CentOS 7에서 bash 자동 완성을 사용하는 방법 bash 셸의 자동 완성은 기본적으로 활성화되어 있습니다. 1. bash-completion 설치 CentOS 7에서 bash 자동 완성을 활성화하려면 bash-completion 패키지를 설치해야 합니다. sudo yum install -y bash-completion 2. bash-completion 활성화 bash-completion을 설치한 후에도 기본적으로 활성화되어 있지 않을 수 있습니다. 활성화하려면 .bashrc 파일을 수정합니다. sudo vim ~/.bashrc 3. bash-completion 스크립트 추가 편집기에서 .bashrc 파일을 열면 파일의 맨 끝에 다음 줄을 추가합니다. source /etc/profile.d/bash.. 더보기
[kubernetes] 쿠버네티스 클러스터 구성(CentOS 7) 쿠버네티스 클러스터 구성(CentOS 7) 시스템 구성 HOSTNAME IP ROLE 비고 k8s-master 192.168.0.101 control-plane node k8s-node1 192.168.0.102 worker node k8s-node2 192.168.0.103 worker node 쿠버네티스(kubeadm) 설치를 위한 사전 작업 docker 설치 및 활성화 $ curl -s https://get.docker.com | sudo sh $ systemctl enable --now docker $ docker version Client: Docker Engine - Community Version: 20.10.10 API version: 1.41 Go version: go1.16.9 Git .. 더보기
쿠버네티스(kubernetes) 초기화(kubeadm init 오류) 쿠버네티스(kubernetes) 초기화(kubeadm init 오류) 쿠버네티스를 초기화할 때 kubeadm init 명령어가 오류를 발생할 수 있습니다. 1. Docker 및 컨테이너 런타임 초기화 docker rm -f `docker ps -aq` 명령은 모든 도커 컨테이너를 강제로 중지하고 제거하는 역할을 합니다. docker rm -f `docker ps -aq` 2. Docker 서비스 정지 및 초기화 systemctl stop docker.socket 및 systemctl stop docker를 통해 Docker 서비스를 중지한 후, /var/lib/docker/ 디렉토리를 제거하고 Docker 서비스를 재시작합니다. Docker.socket 서비스 중지 systemctl stop docker.. 더보기
Docker 중지 시 Warning Docker 중지 시 Warning docker 서비스 중지 시 워닝 발생 $ systemctl stop docker Warning: Stopping docker.service, but it can still be activated by: docker.socket 이 경고 메시지는 docker.socket이 docker.service를 다시 활성화할 수 있는 상태임을 나타냅니다. docker.socket은 Docker 서비스의 소켓 활성화를 담당하며, 필요에 따라 docker.service를 시작시키거나 중지시킬 수 있습니다. 해당 경고 메시지를 해결하려면 docker.socket을 함께 중지시켜야 합니다. 다음 명령을 사용하여 docker.socket과 docker.service를 모두 중지시킬 수 있.. 더보기
[리눅스] CentOS swap 메모리 비활성화(swap 영역 해제) CentOS swap 메모리 비활성화(swap 영역 해제) swap 활성화되어 있는 상태 $ free -h total used free shared buff/cache available Mem: 3.9G 268M 3.4G 8.9M 232M 3.4G Swap: 3.9G 0B 3.9G $ swapon -s Filename Type Size Used Priority /dev/dm-1 partition 4063228 0 -2 swap 메모리 비활성화 $ swapoff -a #또는 $ blkid /dev/sda1: UUID="b9d3aecd-6fef-44f9-8c28-e3ffc7805b1a" TYPE="xfs" /dev/sda2: UUID="IWcQND-I5UU-beZS-Tdlu-vufA-4NFr-Sgum4c" .. 더보기
CentOS 7에서 전원 버튼을 비활성화하는 방법 CentOS 7에서 전원 버튼을 비활성화하는 방법 - 시스템이 비정상적으로 종료되는 현상이 발생하였다. 테스트 환경 서버 모델 $ dmidecode -t system | egrep 'Manufacturer|Product Name' Manufacturer: HP Product Name: ProLiant DL360p Gen8 운영체제 버전 $ cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core) 운영체제 아키텍처 $ uname -a Linux test-server 3.10.0-1127.18.2.el7.x86_64 #1 SMP Sun Jul 26 15:27:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux messages 로그(.. 더보기

728x90