리눅스

본문 바로가기
사이트 내 전체검색


리눅스
리눅스

4. 리눅스 설치 후 할 일

페이지 정보

작성자 관리자 댓글 0건 조회 4,371회 작성일 20-02-08 08:37

본문

4. 리눅스 설치 후 할 일

1. 호스트 네임 설정

# hostnamectl set-hostname 호스트이름

 

2. 네트워크 인터페이스 이름 및 ipv6 disable

 

“GRUB_CMDLINE_LINUX” 에 내용 추가
# vi /etc/default/grub
GRUB_CMDLINE_LINUX=”rhgb quiet net.ifnames=0 biosdevname=0 ipv6.disable=1"
# grub2-mkconfig -o /boot/grub2/grub.cfg

 

3. net-tools 설치

 

centos 7 버전부터 ifconfig, netstat 등 명령어들을 사용하려면

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


# yum install net-tools

 

4. open-vm-tools 설치

 

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

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

 

5. 네트워크 설정

 

nmcli 를 이용할 수도 있지만..
이왕이면 편하게..
nmtui 를 사용.

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

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

# nmtui# systemctl restart network

# systemctl restart NetworkManager

 

6. sshd_config


# vi /etc/ssh/sshd_config
Port 22
AddressFamily inet
LoginGraceTime 2m
PermitRootLogin no
PermitEmptyPasswords no
X11Forwarding noUse
DNS no

 

7. SELinux

 

enforcing 을 disabled 로 변경
# vi /etc/sysconfig/selinux
SELINUX=disabled

 

8. 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 ntpd
# 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

댓글목록

등록된 댓글이 없습니다.


개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.