at 配置在5小时后,将 “This is a at task” 写入 root家目录中的at_test文件中
[root@zhujd ~]# at now +5 hours
warning: commands will be executed using /bin/sh
at> echo "This is a at task" > /root/at_test
at> <EOT>
job 3 at Mon Nov 29 21:58:00 2021
[root@zhujd ~]#
crontab配置,每周六,周日 9点半,14点 提醒我上RHCE课 写入root家目录中的cron_test文件中
[root@zhujd ~]# crontab -u root -e
no crontab for root - using an empty one
crontab: installing new crontab
30 9 * * 6,7 echo "RHCE上课了" > /root/cron_test
0 14 * * 6,7 echo "RHCE上课了" > /root/cron_test
[root@zhujd ~]#
安装httpd,并将访问apache服务器的首页修改为hello.html, 且内容为: “My Home Page is hello”
[root@zhujd ~]# dnf install -y httpd
[root@zhujd ~]# vim /var/www/html/hello.html
My Home Page is hello
[root@zhujd html]# vim /etc/httpd/conf.d/welcome.conf
Alias /.noindex.html /var/www/html/hello.html
虚拟主机:虚拟两台主机ip为100,200, 对应访问目录:/www/ip/100, /www/ip/200,并创建首页文件index.html
[root@zhujd html]# nmcli c modify ens160 +ipv4.add 192.168.5.100 ipv4.gate 192.168.5.2 ipv4.dns 114.114.114.114 ipv4.method manual autocon yes
[root@zhujd html]# nmcli c modify ens160 +ipv4.add 192.168.5.200 ipv4.gate 192.168.5.2 ipv4.dns 114.114.114.114 ipv4.method manual autocon yes
[root@zhujd html]# mkdir -p /www/ip/{100,200}
[root@zhujd html]# vim /www/ip/100/index.html
[root@zhujd html]# vim /www/ip/200/index.html
[root@zhujd conf.d]# vim /etc/httpd/conf.d/myhost.conf