设置root密码
sudo passwd root
设置允许root用户登录ssh
# 安装openssh-server
apt-get install openssh-server
# 编辑配置文件
vim /etc/ssh/sshd_config
# 找到Authentication部分找到“PermitRootLogin without-password”注释在下方加入
PermitRootLogin yes
# 重起ssh服务
service ssh restart
更换阿里源
sed -i s@/cn.archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
# 更新
apt-get update && apt-get upgrade -y
时间同步
apt-get install ntpdate -y
# 定时任务
*/01 * * * * /usr/sbin/ntpdate pool.ntp.org > /dev/null 2>&1
# 设置时区
timedatectl set-timezone Asia/Shanghai
设置主机名
hostnamectl set-hostname node-0