系统服务综合作业

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

相关推荐
老师用之于民5 分钟前
【DAY21】Linux软件编程基础&Shell 命令、脚本及系统管理实操
linux·运维·chrome·经验分享·笔记·ubuntu
路由侠内网穿透.8 分钟前
本地部署代码托管解决方案 Gitea 并实现外部访问( Windows 版本)
运维·服务器·网络协议·gitea
serve the people22 分钟前
python环境搭建 (十三) tenacity重试库
服务器·python·php
jake don42 分钟前
GPU服务器搭建大模型指南
服务器·人工智能
江畔何人初1 小时前
pod的内部结构
linux·运维·云原生·容器·kubernetes
不做无法实现的梦~1 小时前
PX4编译环境配置和qgc配置安装教程(2)
linux·stm32
齐鲁大虾1 小时前
Linux下用什么编程语言方便开发B/S架构程序
linux·运维·架构
范纹杉想快点毕业1 小时前
状态机设计与嵌入式系统开发完整指南从面向过程到面向对象,从理论到实践的全面解析
linux·服务器·数据库·c++·算法·mongodb·mfc
三块钱07942 小时前
群晖docker部署Mattermost,对接openclaw
运维·docker·容器
博客-小覃2 小时前
内网穿透/端口映射之二层穿透访问”FTP共享文件“示例操作教程
运维·服务器·网络