一:首先要完成以下两步骤
1,安装虚拟机:安装虚拟机
2,连接XShell:连接xshell
注:一定要关闭防火墙:systemctl stop firewalld,systemctl disable firewalld
二:设置免密登陆,远程登陆,同步时间,启动定时任务,修改计算机名
可以先安装vim工具,方便后面使用:yum install -y vim
1,设置免密登陆:ssh-keygen -t rsa -P ""
2,远程登陆:
[root@localhost ~]# cd /root/.ssh
开启:[root@localhost .ssh]# ssh-copy-id -i ./id_rsa.pub -p22 root@192.168.255.171
登陆:[root@localhost .ssh]# ssh -p22 root@192.168.255.171
3,同步时间和定时更新时间
[root@localhost ~]# yum install -y ntpdate
[root@localhost ~]# crontab -e
输入以下内容(每5分钟更新一次时间):
*/5 * * * * /usr/sbin/ntpdate -u time.windows.com
4,启动定时任务
开启定时任务:[root@localhost ~]# service crond start
查看定时任务的状态:[root@localhost ~]# service crond status