Ubuntu 新装服务器部署流程

Ubuntu 新装服务器部署流程

Ubuntu 16.04.3

Ubuntu 新装服务器部署流程
Ubuntu 新装服务器部署流程

配置IP

修改文件/etc/network/interfaces

1
2
3
4
5
6
auto ens33
iface ens33 inet static
address 192.168.8.100
netmask 255.255.255.0
gateway 192.168.8.1
dns-nameserver 8.8.8.8

重启网络

1
2
systemctl restart netwoking.service
/etc/init.d/networking restart

设定时区

1
2
3
rm -f /etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
date -R

配置apt-get源

ubuntu 14.04

1
2
3
rm -f /etc/apt/sources.list
wget -P /etc/apt/ http://mirrors.163.com/.help/sources.list.trusty
mv /etc/apt/sources.list.trusty /etc/apt/sources.list

ubuntu 16.04
清华

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cd /etc/apt
cp source.list source.list.bak

vi source.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

修改主机名

1
vim /etc/hostname

安装软件包

1
2
3
4
5
apt-get update
apt-get install -y openssh-server vim lrzsz git tree bash-completion sysstat
```

### 开启root登录

vi /etc/ssh/sshd_config
PermitRootLogin yes

1
2
3
```
service ssh restart
systemctl restart sshd

踢出终端tty用户

1
pkill -kill -t tty

×

纯属好玩

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

文章目录
  1. 1. Ubuntu 新装服务器部署流程
    1. 1.0.1. 配置IP
    2. 1.0.2. 设定时区
    3. 1.0.3. 配置apt-get源
    4. 1.0.4. 修改主机名
    5. 1.0.5. 安装软件包
    6. 1.0.6. 踢出终端tty用户
,