当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Jetpack Compose - Image using Coli load network Image (including GIF, SVG)
*1-5 OJ 642 俄式乘法
Simulate the realization of strcpy function (including multiple optimization ideas)
RHCE Course Summary
*2-1 OJ 254 翻煎饼
响应式pbootcms模板外贸灯具类网站
*2-2 OJ 1163 导弹拦截之测试版
汇编语言学习(八)
使用Connection对象连接管理事务
Counter of openharmony container components
青蛙跳台阶
C语言 求一个整数存储在内存中的二进制中1的个数(多种方法详解)
LNMP架构搭建之论坛
11. cuBLAS Development Guide Chinese version--Level-1 functions amax() and amin() in cuBLAS
RHCE Course Summary
Analysis of SEATA Distributed Transaction Framework
C语言中的 pow 函数 使用方法及注意事项,和常见报错原因,且分享实战中的使用
微信小程序getPhoneNumber接口code=40013
GridContainer of openharmony container component
【LeetCode】1413. 逐步求和得到正数的最小值








