系统服务综合作业

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

相关推荐
阿星_6 分钟前
Linux Ubuntu 查看 SQLite 工具
linux·ubuntu·sqlite
疯狂成瘾者7 分钟前
海康威视 WSS 视频取流原理:6014/559 端口、Nginx 代理与 TLS 证书问题
运维·nginx·音视频
ruxshui11 分钟前
Hadoop 生产运维实战手册
大数据·运维·hadoop
科技小E33 分钟前
模型训完≠能用:深度学习推理工作站DLTM推理验证如何把住“最后一公里”质量关
服务器·深度学习·自动化
Lsetea39 分钟前
OpenSSL的checkhost显示不匹配却退出0:名称检查与证书验收
linux·https·shell·ssl证书·openssl
张文君1 小时前
Ubuntu iSCSI CHAP认证与Win11挂载
linux·运维·ubuntu
一直C1 小时前
嵌入式 Linux 驱动开发学习笔记:中断、等待队列与工作队列
linux·驱动开发·嵌入式硬件·学习·imx6ull
程序员-Benothing1 小时前
Linux防火墙配置教程:iptables、firewalld、nftables、ufw
linux·运维·服务器
齐鲁大虾1 小时前
如何通过 CUPS Web 界面(http://localhost:631)安装打印机驱动
linux
Black蜡笔小新1 小时前
中央厨房配餐看不见风险高?EasyCVR可视化监管方案设计
运维·安全·easycvr