Ubuntu 신규 설치 서버 배포 프로세스

1. 시간대 설정

rm -f /etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

2. apt-get 소스 구성

sed -i 's/us.archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
sed -i 's/security.ubuntu/mirrors.aliyun.com/g' /etc/apt/sources.list

또는 수정/etc/apt/sources.list, Ubuntu 14.04의 최종은 다음과 같다.
deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
Ubuntu 16.04 버전의 최종 효과는 다음과 같습니다.
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
Ubuntu 18.04 버전의 최종 효과는 다음과 같습니다.
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

3. 호스트 이름 수정

vim /etc/hostname

4. 소프트웨어 패키지 설치

apt-get install lrzsz ntpdate

5, 루트 로그인 오픈


Ubuntu 14.04
sed -i 's/without-password/yes/g' /etc/ssh/sshd_config

Ubuntu 16.04
sed -i 's/prohibit-password/yes/g' /etc/ssh/sshd_config

서비스 재시작
service ssh restart

6. 터미널 티 사용자

pkill -kill -t tty

7. 일반 사용자 삭제


8. 시간 동기화

echo "$((RANDOM%60)) $((RANDOM%24)) * * * /usr/sbin/ntpdate time1.aliyun.com" >> /etc/crontab

9. 모니터링 시스템 설치

apt-get install zabbix-agent

10. pip 국내 소스 설정

mkdir .pip
cat >> .pip/pip.conf <

첨부: IP 구성


파일/etc/network/interfaces 수정
auto eth0
iface eth0 inet static
address  10.0.0.100
netmask  255.0.0.0
gateway  10.0.0.1
dns-nameservers 114.114.114.114
ssserver -p 443 -k wzlinux --log-file /tmp/ss.log --worker 2 -d start
python server.py -p 443 -k password -m aes-256-cfb -O auth_sha1_v4 -o http_simple
# :-p   -k    -m   -O   -o  

좋은 웹페이지 즐겨찾기