리눅스 서버 초기 셋팅2

– 네임서버 추가
vi /etc/resolv.conf

nameserver 168.126.63.1

– 시스템 업데이트
# yum -y update

– 서버시간 맞춤
# yum -y install rdate
# crontab -e
00 01 * * * /usr/bin/rdate -s time.bora.net&&hwclock -w

타임존 다를때

ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

cp -p /usr/share/zoneinfo/Asia/Seoul /etc/localtime

 

– 일반계정 생성
# useradd 일반계정
# passwd 일반계정

– ssh root로그인 막기
vi /etc/ssh/sshd_config

PermitRootLogin no

PasswordAuthentication yes

# service sshd restart
or
# systemctl restart sshd

 

– centos  버전 확인

# grep . /etc/*-release