RHCE课程作业-02

  1. 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 ~]# 
  1. 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 ~]# 
  1. 安装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

请添加图片描述

  1. 虚拟主机:虚拟两台主机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

请添加图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值