본문으로 바로가기

[CentOS7] foreman 설치 가이드 (v2.5.2)

category Linux/RHEL7 & 8 2021. 8. 20. 16:21
반응형

Foreman은 베어메탈 및 가상 서버의 구성 및 관리를 도와주는 무료 오픈 소스 도구입니다. 

Foreman은 서버를 프로비저닝하고 모니터링 할 수 있습니다.

(RedHat satellite6 도 foreman을 기반으로한 제품임)

 

 

설치 환경 정보

- VM on KVM

- 8 Core / 8G / 100G Disk

- 1 Network (public)

- CentOS 7.7 Minimall 설치

 

 

1. 호스트 네임설정

[root@foreman ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

60.30.160.240	foreman.test.com	foreman

 

 

2. 설치에 필요한 관련 패키지 설치

sudo yum -y install https://yum.puppet.com/puppet6-release-el-7.noarch.rpm

yum install -y yum-utils

sudo yum-config-manager --enable extras

sudo yum -y install epel-release centos-release-scl-rh

sudo yum -y install https://yum.theforeman.org/releases/2.5/el7/x86_64/foreman-release.rpm

 

 

3. foreman 패키지 설치

yum install -y foreman-installer

 

 

4. foreman 설치

foreman 설치가 완료되면 접속 방법과 계정정보를 알려주는데 해당 계정으로 접속 후 비밀번호를 변경하면 됩니다.

[root@foreman ~]# foreman-installer
2021-08-20 14:40:01 [NOTICE] [root] Loading installer configuration. This will take some time.
2021-08-20 14:40:05 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-08-20 14:40:05 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2021-08-20 14:41:21 [NOTICE] [configure] Starting system configuration.
2021-08-20 14:42:57 [NOTICE] [configure] 250 configuration steps out of 1336 steps complete.
2021-08-20 14:43:34 [NOTICE] [configure] 500 configuration steps out of 1338 steps complete.
2021-08-20 14:46:12 [NOTICE] [configure] 1000 configuration steps out of 1359 steps complete.
2021-08-20 14:47:05 [NOTICE] [configure] 1250 configuration steps out of 1359 steps complete.
2021-08-20 14:47:13 [NOTICE] [configure] System configuration has finished.
Executing: foreman-rake upgrade:run
`/usr/share/foreman` is not writable.
Bundler will use `/tmp/bundler20210820-5973-y1xdkk5973' as your home directory temporarily.
  Success!
  * Foreman is running at https://foreman.test.com
      Initial credentials are admin / Q9UC5RoHBhFW6UCM
  * Foreman Proxy is running at https://foreman.test.com:8443

  The full log is at /var/log/foreman-installer/foreman.log

 

 

5. 방화벽 구성

방화벽을 끄지 않았다면 아래 포트들에 대한 허용정책 및 서비스를 재시작합니다.

firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --permanent --add-port=67-69/udp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=3000/tcp
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --permanent --add-port=5910-5930/tcp
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=8140/tcp
firewall-cmd --permanent --add-port=8443/tcp


firewall-cmd --reload

 

 

6. foreman dashboard 접속

https://<서버 IP 또는 domain>

foreman 로그인화면

 

 

로그인 후 화면

 

728x90