본문 바로가기
Computer Science/Server & Network

[서버] Cent OS-7 설치 및 초기 설정

by Hwan,. 2022. 3. 3.
728x90
반응형

1. 구분

  • DVD ISO 파일
  • Everything ISO
  • Minimal ISO

 

2. 네트워크 설정

  • vi /etc/sysconfig/network-scripts/ifcfg-enpXXX -> ONBOOT=YES, gateway, dns, ...
  • systemctl restart network or service network-manager restart
  • ip addr

 

3. 네트워크 관련 설치

  • yum -y install net-tools bind-tools nmap

 

4. 시간 동기화

  • yum -y install rdate
  • rdate -s time.bora.net
  • timedatectl set-ntp y
  • date

 

4. 유저 생성

  • adduser -m -u 10001 hwan
  • passwd hwan

 

5. ssh 설정

  • yum -y install openssh-server openssh-clients openssh-askpass
  • vi /etc/ssh/sshd_config
  • PermitRootLogin no
  • MaxAuthTries 3
  • MaxSessions 5
  • service sshd start
  • service sshd status

 

7. iptables 설정

  • yum -y install iptables-services
  • systemctl enable iptables
  • systemctl start iptables 
  • iptables -nL
  • iptables -A INPUT -d tcp --dport port -j ACCEPT

 

728x90
반응형

댓글