RHCE(2)

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
在这里插入图片描述
编辑配置文件
在这里插入图片描述
重启服务未报错,进入浏览器查看
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值