web网站的搭建

1.
[root@localhost 桌面]# mount /dev/sr0 /mnt
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost 桌面]# mount /dev/sr0 /mnt
mount: /dev/sr0 写保护,将以只读方式挂载
mount: /dev/sr0 已经挂载或 /mnt 忙
/dev/sr0 已经挂载到 /run/media/root/RHEL-7.2 Server.x86_64 上
/dev/sr0 已经挂载到 /mnt 上
[root@localhost 桌面]# yum install httpd
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
base | 4.1 kB 00:00
软件包 httpd-2.4.6-40.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost 桌面]# yum install httpd -y
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
软件包 httpd-2.4.6-40.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost 桌面]# systemctl start httpd
[root@localhost 桌面]# systemctl stop firewalld
[root@localhost 桌面]# setenfore 0
bash: setenfore: 未找到命令…
[root@localhost 桌面]# setenforce 0
[root@localhost 桌面]# systemctl restart httpd
[root@localhost 桌面]# vim /etc/httpd/conf.d/vhosts.conf
web网站的搭建_第1张图片

[root@localhost 桌面]# mkdir /www/xiaopang
echo ‘小胖,你咋这么胖呢!’ > /www/xiaopang/index.html
[root@localhost 桌面]# systemctl restart httpd
web网站的搭建_第2张图片
2.
[root@localhost 桌面]# vim /etc/httpd/conf.d/vhosts.conf
web网站的搭建_第3张图片

[root@localhost 桌面]# mkdir /www/dapang
[root@localhost 桌面]# echo i an dapang > /www/dapang/index.html
[root@localhost 桌面]# vim /etc/hosts
web网站的搭建_第4张图片

[root@localhost 桌面]# vim /etc/httpd/conf.d/vhosts.conf
web网站的搭建_第5张图片

[root@localhost 桌面]# mkdir /www/100
[root@localhost 桌面]# echo this is ,welcome! > /www/100/index.html
[root@localhost 桌面]# cd /www
[root@localhost www]# nmcli connection modify eno16777736 +ipv4.addresses 192.168.11.100/24 ipv4.gateway 192.168.11.1 ipv4.dns 114.114.114.114 ipv4.method manual
connection.autoconnect yes
[root@localhost www]# nmcli connection up eno16777736成功激活的连接(D-Bus 激活路径:/org/freedesktop/NetworkManager/ActiveConnection/4)
[root@localhost www]# systemctl restart httpd

web网站的搭建_第6张图片

你可能感兴趣的:(web网站的搭建)