系统服务综合作业

首先配置自动挂载 服务器的/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 小时前
今天是学习嵌入式的第37天
linux·学习·算法
一个有温度的技术博主5 小时前
Linux 核心命令速查指南:从文件操作到系统运维
linux·服务器
小小的木头人6 小时前
Docker 环境下迁移 containerd 数据目录:从 `/var/lib/containerd` 到 `/data/containerd`
linux·docker
天远数科6 小时前
零信任架构实战:基于天远全能消金报告构建自动化信贷评估网关
运维·人工智能·架构·自动化
东城居士6 小时前
验证第一个Linux字符驱动程序
linux·嵌入式系统
Winner_hwx7 小时前
华为ICT大赛备赛复习1
服务器·网络·华为
宗介波妞7 小时前
Wireshark 抓取 IEC104 报文:常见异常报文排查与标志位解读
服务器·网络·wireshark
网硕互联的小客服9 小时前
各个版本的Linux系统如何修改远程端口ssh端口?
linux·运维·服务器·网络
T1mzhou9 小时前
ARM64 Linux 6.10 内核驱动(12):dd.c:probe/ remove、延迟 probe
linux·服务器·c语言·arm开发·arm
Mr小林10 小时前
Docker 安装教程(在线 + 离线)
运维·docker·容器