Visit www.baidu.com to create a web page for yourself
umount /dev/sda5-take the mount of saa5
umount /dev/sda6
Df-h
pvcreate /dev/
sda5 creates a pv type sda5 pvcreate /dev/sda6 creates a pv type sda6
Pvs ——Check whether the creation is successful. (Pvdisplay is also for viewing)
vgcreate vg1 /dev/sda5 /dev/sda6-change the pv type to the vg type and name it vg1
Vgs
lvcreate -n lv1 -L 10G vg1——改成lv型10G大小
Lvs
mkfs.xfs /dev/vg1/lv1-format lv1
mount /dev/vg1/lv1 /data/www-mount the directory
df -h——查看挂载是否成功
ll /etc/httpd/conf/httpd.conf
vim vhost.conf (content)
content: (white is the IP address of my own virtual machine, if you don’t know, you can check it with IP a, the domain name is www.baidu.com)
[root@localhost conf.d]# cat vhost.conf
<Directory /data/www>
AllowOverride none
Require all granted
<virtualhost 192.168.170.136:80>
servername www.baidu.com
documentroot /data/www
echo "你好,很高兴认识你" > /data/www/index.html 写一些内容进入网页.
getenforce ——查看状态
setenforce 0——关闭SELinux
getenforce
(Method 2) vim /etc/selinux/config-or modify SELinux
systemctl restart httpd under config- start httpd service.
The following modify the computer's local cache
path: C:/windiws/System32/drivers/etc/hosts
Need to use Notepad++ (you can download it online)
The result is shown in the figure