리눅스

Total 331
Today 0
profile_image
슈퍼아이피
16-04-27 23:39 0개 46회
일반문서
Centos7 Minimall 설치 후 작업
1. minimal 설치
개발툴
호환성 라이브러리

yum groupinstall "Development Tools" "Compatibility Libraries"

2. 호스트 네임 설정
# hostnamectl set-hostname 호스트이름

3. 네트워크 인터페이스 이름 및 ipv6 disable
“GRUB_CMDLINE_LINUX” 에 내용 추가

sysctl -w net.ipv6.conf.all.disable_ipv6=1.
?sysctl -w net.ipv6.conf.default.disable_ipv6=1.
? 
# vi /etc/default/grub
GRUB_CMDLINE_LINUX=”rhgb quiet net.ifnames=0 biosdevname=0 ipv6.disable=1"
# grub2-mkconfig -o /boot/grub2/grub.cfg
4. net-tools 설치
centos 7 버전부터 ifconfig, netstat 등 명령어들을 사용하려면

net-tools 패키지를 설치해야 함.

# yum install net-tools
5. open-vm-tools 설치해야
리눅스를 위한 VMware Tool의 오픈소스 버전. 각 커뮤니티에서 업데이트 및 지원을 얻을 수 있다.

# yum install open-vm-tools
이쯤에서 리부팅 한 번.. open-vm-tools 도 설치했으니 host 시간과 동기화도 잘 될 것이다.

6. 네트워크 설정
nmcli 를 이용할 수도 있지만.. 이왕이면 편하게.. nmtui 를 사용.

“ens” 로 시작하는 것은 지우고 새로 생긴 NIC 를 편집. 맥 주소 부분에 (ethX) 로 네트워크 인터페이스 이름이 표시된다. 서버에서 사용할 네트워크에 맞게 설정하면 된다.

기본 게이트웨이를 2개 넣어도 에러가 발생하지 않으니 주의.

# nmtui
# systemctl restart network
# systemctl restart NetworkManager
7. sshd_config
# vi /etc/ssh/sshd_config
Port 22
AddressFamily inet
LoginGraceTime 2m
PermitRootLogin no
PermitEmptyPasswords no
X11Forwarding no
UseDNS no
8. SELinux
enforcing 을 disabled 로 변경

# vi /etc/sysconfig/selinux
SELINUX=disabled
9. iptables
firewalld 에 의해서 iptables 룰이 생성됨.

고로 firewalld 를 비활성화하고 중지

# systemctl stop firewalld
# systemctl mask firewalld
# systemctl disable firewalld
disable???부팅 시작 시 비활성화

mask???서비스 제거

iptables 와 관련된 패키시 설치

# yum install iptables-services
# systemctl enable iptables
# systemctl start iptables
# iptables --flush
# iptables-save > /etc/sysconfig/iptables
9. NTP
시간 동기화를 위해 ntpd 설치 및 timedatectl 명령으로 확인

# yum install ntp
# timedatectl
Local time: Sat 2016?01?30 13:03:25 KST
Universal time: Sat 2016?01?30 04:03:25 UTC
RTC time: Sat 2016?01?30 13:03:25
Time zone: Asia/Seoul (KST, +0900)
NTP enabled: n/a
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
# systemctl start ntpd
# systemctl enable ntpd
# timedatectl 
Local time: Sat 2016?01?30 13:07:24 KST
Universal time: Sat 2016?01?30 04:07:24 UTC
RTC time: Sat 2016?01?30 04:07:24
Time zone: Asia/Seoul (KST, +0900)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
추가로 타임존 설정은

# timedatectl list-timezones
# timedatectl set-timezone Asia/Seoul
설정가능한 타임존 목록을 확인할 수 있고 set-timezone 명령으로 타임존을 설정하면 된다.

10. 업데이트
# yum update
마지막으로 리부팅…

11. epel
추가로 설치할 것들이 있다면..

# yum install epel-release


댓글목록

등록된 댓글이 없습니다.