系统服务综合作业

首先配置自动挂载 服务器的/rhce 自动挂载在客服端的/nfs/rhce

首先在服务器进行配置

复制代码
dnf install nfs-utils -y
[root@localhost ~]# vim /etc/exports
[root@localhost ~]# firewall-cmd --permanent --add-service=nfs
success
[root@localhost ~]# firewall-cmd --permanent --add-service=mount
Error: INVALID_SERVICE: 'mount' not among existing services
[root@localhost ~]# firewall-cmd --permanent --add-service=mountd
success
[root@localhost ~]# firewall-cmd --permanent --add-service=rpc-bind
success
[root@localhost ~]# firewall-cmd  --reload
success
root@localhost ~]# chcon -t httpd_sys_content_t   /rhce/*
[root@localhost ~]# ll -Z /rhce/*
-rw-r--r--. 1 nobody nobody system_u:object_r:httpd_sys_content_t:s0 13 Jul  6 11:17 /rhce/index.html

在/etc/exports中

/rhce 192.168.178.143(rw)

地址为客服端地址

客服端

dnf install nfs-utils -y

yum install autofs -y

重启后切换到/nfs/rhce就自动挂载了

在客服端配置web服务器

复制代码
[root@localhost ~]# cd /etc/httpd/conf.d

打开自己的配置文件

注意[root@localhost ~]# echo "this is rhce" > /nfs/rhce

-bash: /nfs/rhce: Permission denied

root@localhost \~\]# setsebool -P httpd_use_nfs 1 \[root@localhost \~\]# echo "this is rhce" \> /nfs/rhce/index.html

在/etc/hosts里面写本地解析

配置DNS服务器

dnf install bind bind-utils -y

在/etc/named.conf

在/var/named/named.rhce

注意所有服务需要设置开机自启

systemctl enable httpd

systemctl enable named

systemctl enable nfs-server

相关推荐
扛枪的书生11 小时前
HAProxy 学习总结
linux
herinspace11 小时前
管家婆辉煌主机登录提示“连接失败,请确认输入正确的服务器名”
运维·服务器·学习·零售·管家婆软件·财务软件
日取其半万世不竭11 小时前
Linux 云服务器磁盘扩容:从分区到文件系统的完整流程
java·linux·服务器
byxdaz11 小时前
Linux 系统中常用的日志查看命令
linux·运维
rcms1527026921811 小时前
METSO A413248自动化系统
运维·自动化
Aipollo11 小时前
从Nginx到AI网关:网关技术的演进之路
运维·人工智能·nginx
xiangw@GZ12 小时前
HDI 高密度互连板阶数的深度理解
服务器·单片机·嵌入式硬件
雨的旋律209912 小时前
rsync-daemon + lsyncd实现文件近实时备份
linux·运维·服务器
JP-Destiny12 小时前
linux-安装Ubuntu的docker
linux·ubuntu·docker
EasyCVR12 小时前
从连锁门店到城市级项目,国标GB28181视频监控平台EasyCVR的全场景适配能力有多绝?
运维·网络·音视频