以下是实验环境设置,线上环境请勿尝试
### 1.开机启动后,要为root设置密码
sudo passwd root
### 2.设置允许root用户远程连接
vi /etc/ssh/sshd_config
#PermitRootLogin prohibit-password 更改为
PermitRootLogin yes
### 3.设置静态ip
```
安装网卡管理命令
Command 'ifdown' not found, but can be installed with:
apt install ifupdown
apt install ifupdown2
apt install netscript-2.4
ubuntu-server18.04版本用netplan来管理网卡
cd /etc/netplan
50-cloud-init.yaml
network:
ethernets:
ens33:
addresses: [172.16.168.134/24]
gateway4: 172.16.168.2
dhcp4: false
optional: true
nameservers:
addresses: [8.8.8.8, 114.114.114.114]
version: 2
sudo netplan apply
```
### 4.ubuntu18.0.4 中防火墙设置
```
*关闭ubuntu的防火墙
*ufw disable
*开启防火墙
*ufw enable
```
### 5.关闭selinux