搭建两个web网站:
1、在rhel8的系统上搭建网站:该网站ip地址主机位为11,设置documentroot为/www/wmy,网页内容为:my name is wmy
2、在rhel8的系统上搭建网站:该网站ip地址主机位为12,设置documentroot为/www/12,网页内容为:wo shi wmy。
1.首先安装httpd服务包,关闭防火墙和selinux,之后重启httpd服务
[root@localhost ~]# mount /dev/sr0 /mnt
[root@localhost ~]# vim /etc/yum.repos.d/base.repo
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
[root@localhost ~]# yum -y install httpd
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl start httpd
2.添加两个ip地址
[root@localhost ~]# nmcli connection modify ens160 +ipv4.addresses 192.168.142.11/24 ipv4.gateway 192.168.142.1 ipv4.method manual connection.autoconnect ye