系统服务综合作业

首先配置自动挂载 服务器的/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

相关推荐
大卡片18 分钟前
linux内核驱动开发
linux·运维·驱动开发
心心喵1 小时前
[linux] nohup和pm2的区别 进程保活
linux·运维·服务器
NGINX开源社区2 小时前
F5 NGINX Ingress Controller 5.3.0 新增功能
运维
醉熏的石头3 小时前
Ubuntu 中的编程语言(中)
linux·ubuntu·scala
SelectDB4 小时前
Apache Doris 在 AgentLogsBench 中领先,支撑 Agent 可观测性生产负载
运维·数据库·agent
荣-4 小时前
从两天到十几分钟:一套 YT Crash 自动化分析工具完整工程复盘
大数据·运维·自动化
酷炫的水壶5 小时前
使用memc-nginx和srcache-nginx模块构建高效透明的缓存机制
运维·nginx·缓存
dddwjzx6 小时前
嵌入式Linux C应用编程入门——信号
linux·嵌入式
范什么特西6 小时前
网络代理问题
java·linux·服务器
姚不倒7 小时前
F5 SSL Profile 证书卸载深入篇
运维·网络协议·负载均衡·ssl·f5