当前位置:网站首页>The RHCE course summary
The RHCE course summary
2022-08-09 14:50:00 【Palm nine】
NFS and WEB comprehensive experiment:
Requirements:
Configure the nfs server and the web server
1. Configure the nfs server, requiring the resource files of the two websites to be shared with the web server through the nfs server.Separate webpage files through two shared directories, for example: /openlab/index.html /xianoupeng/index.html (page file content customization).
2. Share web files through nfs, configure web services to achieve www.openlab.com and www.xianoupeng.com access their respective website information.
1. Select a virtual machine as NFS
Rename:
[[email protected] ~]# hostname NFS
[[email protected] ~]# bash
[[email protected] ~]#
Mount and install:
[[email protected] ~]# mount /dev/sr0 /mnt
[[email protected] ~]# yum install nfs-utils
[[email protected] ~]# yuminstall rpcbind
Close the firewall, close selinux:
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0
Enable nfs, rpc is automatically enabled by default:
[[email protected] ~]# systemctl start nfs-server
Edit shared file directory and permissions:
[[email protected] ~]# vim /etc/exports
Create directory and write information:
[[email protected] ~]# mkdir /openlab
[[email protected] ~]# mkdir /xianoupeng
[[email protected] ~]# echo this is openlab > /openlab/index.html
[[email protected] ~]# echo this is xianoupeng > /xianoupeng/index.html
Reread:
[[email protected] ~]# exportfs -r
Mount the NFS shared directory to a local directory on another virtual machine:
[[email protected] ~]# mount 192.168.43.128:/openlab /openlab
[[email protected] ~]# mount 192.168.43.128:/xianoupeng /xianoupeng
Test:
2. Select the second virtual machine as WEB
Mount and install httpd:
[[email protected] ~]# mount /dev/sr0 /mnt
[[email protected] ~]# yum install httpd -y
Close the firewall, selinux, and start:
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0
[[email protected] ~]# systemctl start httpd
Edit the auxiliary configuration file:
[email protected] ~]# vim /etc/httpd/conf.d/vhosts.conf
Write domain name:
[[email protected] ~]# vim /etc/hosts

Restart httpd:
[[email protected] ~]# systemctl restart httpd
Test:
Experiment completed
边栏推荐
猜你喜欢
随机推荐
开源一夏│别逗,作为程序员你竟还没参与过开源项目?
#25-1 OJ 78 Calculate birthday day of the week
现实版商战:“武功再高,也怕菜刀”
*1-4 OJ 605 格雷码
Using the NVIDIA Kaolin Wisp reconstruction of 3 d scene
202五一杯数学建模ABC三题
Row of openharmony container components
*2-1 OJ 254 翻煎饼
Xshell建立SSH隧道连接
Shell course summary
*1-2 OJ 190 游程编码
Counter of openharmony container components
回归测试如何确定测试范围
青蛙跳台阶
Code of Conduct for Firefighters
探索快八年,谁挡住了小红书的电商梦?
【LeetCode】1413. 逐步求和得到正数的最小值
湖仓一体,Hologres加速云数据湖DLF技术原理解析
小程序模板制作流程,小程序模板制作方便快捷
阿里云发布中国云原生数据湖应用洞察白皮书








