centos 최신버전을 설치할 일이 생겼다. 

장비는 장만했고, centos 8 도 설치가 되었다. 

그럼 설치를 한번 해볼까?

0. 버전 확인

$ cat /etc/*-release
CentOS Linux release 8.1.1911 (Core)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

CentOS Linux release 8.1.1911 (Core)
CentOS Linux release 8.1.1911 (Core)

1. Docker 설치 

1-1. yum update

$ sudo yum update

1-2. docker 설치 및 docker-compose 설치

$ sudo yum install docker-ce-18.06.3.ce-3.el7
$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ sudo chmod 755 /usr/local/bin/docker-compose

1-3. activate docker by systemctl

$ sudo systemctl enable docker 
$ sudo systemctl start docker 
$ sudo systemctl is-activate docker

1-4. check docker

$ sudo docker ps -a

1-5. 유저 추가

docker를 사용할 때 항상 root 계정이 필요하다면, 사용이 불편하기도 하고, 관리도 용이하지 않은 관계로, docker 그룹에 내 계정을 추가하여 사용하도록 하자

$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ sudo reboot

 

아쉽게도 적용을 위해서는 서버를 재시작 해야 하드라.... 

+ Recent posts