1.at 配置在5小时后,将 “This is a at task” 写入 root家目录中的at_test文件中
[root@localhost ~]# at now+1 minutes
warning: commands will be executed using /bin/sh
at> echo "This is a at task" >> at_test
at> <EOT>
job 3 at Thu Dec 2 08:31:00 2021
[root@localhost at]# date
Thu Dec 2 08:32:15 EST 2021
[root@localhost at]# more at_test
2.crontab配置,每周六,周日9点半,14点提醒我上RHCE课 写入root家目录中的cron_test文件中
[root@localhost ~]# crontab -u root -e #编辑crontab的工作内容
[root@localhost ~]# crontab -u root -l #查阅crontab的工作内容
3.安装httpd,并将访问apache服务器的首页修改为hello.html, 且内容为: “My Home Page is hello”
[root@localhost yum]# cd /etc/yum.repos.d #配置yum源
[root@localhost yum.repos.d]# wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum makecache
[root@localhost yum.repos.d]# yum install httpd -y
[root@localhost html]# vim /var/www/html/index.html
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl restart httpd #重启服务
浏览器输入IP查看结果:
4.虚拟主机:虚拟两台主机ip为100,200, 对应访问目录:/www/ip/100, /www/ip/200
并创建首页文件index.html
为ens160网卡增添两个IP
查看新加IP
编辑配置文件
重启服务未报错,进入浏览器查看