安装NFS服务
# 使用yum安装NFS服务
[root@localhost ~]# yum install nfs-utils -y
正在更新 Subscription Management 软件仓库。
无法读取客户身份
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
上次元数据过期检查:2:01:00 前,执行于 2024年05月16日 星期四 08时26分48秒。
依赖关系解决。
=============================================================================================================
软件包 架构 版本 仓库 大小
=============================================================================================================
安装:
nfs-utils x86_64 1:2.5.4-25.el9 ali_baseos 459 k
升级:
device-mapper x86_64 9:1.02.197-2.el9 ali_baseos 141 k
device-mapper-event x86_64 9:1.02.197-2.el9 ali_baseos 34 k
device-mapper-event-libs x86_64 9:1.02.197-2.el9 ali_baseos 32 k
device-mapper-libs x86_64 9:1.02.197-2.el9 ali_baseos 179 k
libipa_hbac x86_64 2.9.4-6.el9 ali_baseos 40 k
libldb x86_64 2.8.0-1.el9 ali_baseos 190 k
libsmbclient x86_64 4.19.4-104.el9 ali_baseos 74 k
libsss_certmap x86_64 2.9.4-6.el9 ali_baseos 94 k
libsss_idmap x86_64 2.9.4-6.el9 ali_baseos 45 k
libsss_nss_idmap x86_64 2.9.4-6.el9 ali_baseos 50 k
libsss_sudo x86_64 2.9.4-6.el9 ali_baseos 39 k
libtalloc x86_64 2.4.1-1.el9 ali_baseos 31 k
libtdb x86_64 1.4.9-1.el9 ali_baseos 51 k
libtevent x86_64 0.16.0-1.el9 ali_baseos 48 k
libwbclient x86_64 4.19.4-104.el9 ali_baseos 44 k
lvm2 x86_64 9:2.03.23-2.el9 ali_baseos 1.5 M
lvm2-libs x86_64 9:2.03.23-2.el9 ali_baseos 1.0 M
samba-client-libs x86_64 4.19.4-104.el9 ali_baseos 5.1 M
samba-common noarch 4.19.4-104.el9 ali_baseos 149 k
samba-common-libs x86_64 4.19.4-104.el9 ali_baseos 101 k
sssd x86_64 2.9.4-6.el9 ali_baseos 31 k
sssd-ad x86_64 2.9.4-6.el9 ali_baseos 220 k
sssd-client x86_64 2.9.4-6.el9 ali_baseos 172 k
sssd-common x86_64 2.9.4-6.el9 ali_baseos 1.6 M
sssd-common-pac x86_64 2.9.4-6.el9 ali_baseos 100 k
sssd-ipa x86_64 2.9.4-6.el9 ali_baseos 285 k
sssd-kcm x86_64 2.9.4-6.el9 ali_baseos 114 k
sssd-krb5 x86_64 2.9.4-6.el9 ali_baseos 77 k
sssd-krb5-common x86_64 2.9.4-6.el9 ali_baseos 98 k
sssd-ldap x86_64 2.9.4-6.el9 ali_baseos 163 k
sssd-proxy x86_64 2.9.4-6.el9 ali_baseos 77 k
安装依赖关系:
gssproxy x86_64 0.8.4-6.el9 ali_baseos 110 k
keyutils x86_64 1.6.3-1.el9 ali_baseos 74 k
libev x86_64 4.33-5.el9 ali_baseos 53 k
libnfsidmap x86_64 1:2.5.4-25.el9 ali_baseos 62 k
libverto-libev x86_64 0.3.2-3.el9 ali_baseos 14 k
rpcbind x86_64 1.2.6-7.el9 ali_baseos 58 k
sssd-nfs-idmap x86_64 2.9.4-6.el9 ali_baseos 44 k
事务概要
=============================================================================================================
安装 8 软件包
升级 31 软件包
总下载:13 M
下载软件包:
(1/39): libev-4.33-5.el9.x86_64.rpm 313 kB/s | 53 kB 00:00
(2/39): gssproxy-0.8.4-6.el9.x86_64.rpm 634 kB/s | 110 kB 00:00
(3/39): keyutils-1.6.3-1.el9.x86_64.rpm 400 kB/s | 74 kB 00:00
(4/39): libverto-libev-0.3.2-3.el9.x86_64.rpm 345 kB/s | 14 kB 00:00
(5/39): libnfsidmap-2.5.4-25.el9.x86_64.rpm 750 kB/s | 62 kB 00:00
(6/39): rpcbind-1.2.6-7.el9.x86_64.rpm 1.3 MB/s | 58 kB 00:00
(7/39): sssd-nfs-idmap-2.9.4-6.el9.x86_64.rpm 647 kB/s | 44 kB 00:00
(8/39): device-mapper-event-1.02.197-2.el9.x86_64.rpm 328 kB/s | 34 kB 00:00
(9/39): device-mapper-1.02.197-2.el9.x86_64.rpm 730 kB/s | 141 kB 00:00
(10/39): nfs-utils-2.5.4-25.el9.x86_64.rpm 1.3 MB/s | 459 kB 00:00
(11/39): device-mapper-event-libs-1.02.197-2.el9.x86_64.rpm 147 kB/s | 32 kB 00:00
(12/39): libipa_hbac-2.9.4-6.el9.x86_64.rpm 357 kB/s | 40 kB 00:00
(13/39): device-mapper-libs-1.02.197-2.el9.x86_64.rpm 849 kB/s | 179 kB 00:00
(14/39): libsmbclient-4.19.4-104.el9.x86_64.rpm 659 kB/s | 74 kB 00:00
(15/39): libsss_certmap-2.9.4-6.el9.x86_64.rpm 785 kB/s | 94 kB 00:00
(16/39): libsss_idmap-2.9.4-6.el9.x86_64.rpm 335 kB/s | 45 kB 00:00
(17/39): libldb-2.8.0-1.el9.x86_64.rpm 697 kB/s | 190 kB 00:00
(18/39): libsss_nss_idmap-2.9.4-6.el9.x86_64.rpm 385 kB/s | 50 kB 00:00
(19/39): libtalloc-2.4.1-1.el9.x86_64.rpm 294 kB/s | 31 kB 00:00
(20/39): libsss_sudo-2.9.4-6.el9.x86_64.rpm 294 kB/s | 39 kB 00:00
(21/39): libtdb-1.4.9-1.el9.x86_64.rpm 397 kB/s | 51 kB 00:00
(22/39): libwbclient-4.19.4-104.el9.x86_64.rpm 342 kB/s | 44 kB 00:00
(23/39): libtevent-0.16.0-1.el9.x86_64.rpm 314 kB/s | 48 kB 00:00
(24/39): lvm2-libs-2.03.23-2.el9.x86_64.rpm 1.7 MB/s | 1.0 MB 00:00
(25/39): samba-common-4.19.4-104.el9.noarch.rpm 1.0 MB/s | 149 kB 00:00
(26/39): lvm2-2.03.23-2.el9.x86_64.rpm 1.9 MB/s | 1.5 MB 00:00
(27/39): samba-common-libs-4.19.4-104.el9.x86_64.rpm 919 kB/s | 101 kB 00:00
(28/39): sssd-2.9.4-6.el9.x86_64.rpm 234 kB/s | 31 kB 00:00
(29/39): sssd-client-2.9.4-6.el9.x86_64.rpm 1.1 MB/s | 172 kB 00:00
(30/39): sssd-ad-2.9.4-6.el9.x86_64.rpm 809 kB/s | 220 kB 00:00
(31/39): sssd-common-pac-2.9.4-6.el9.x86_64.rpm 543 kB/s | 100 kB 00:00
(32/39): sssd-ipa-2.9.4-6.el9.x86_64.rpm 1.4 MB/s | 285 kB 00:00
(33/39): sssd-kcm-2.9.4-6.el9.x86_64.rpm 609 kB/s | 114 kB 00:00
(34/39): sssd-krb5-2.9.4-6.el9.x86_64.rpm 546 kB/s | 77 kB 00:00
(35/39): sssd-krb5-common-2.9.4-6.el9.x86_64.rpm 711 kB/s | 98 kB 00:00
(36/39): sssd-common-2.9.4-6.el9.x86_64.rpm 1.7 MB/s | 1.6 MB 00:00
(37/39): sssd-ldap-2.9.4-6.el9.x86_64.rpm 988 kB/s | 163 kB 00:00
(38/39): sssd-proxy-2.9.4-6.el9.x86_64.rpm 593 kB/s | 77 kB 00:00
(39/39): samba-client-libs-4.19.4-104.el9.x86_64.rpm 1.9 MB/s | 5.1 MB 00:02
-------------------------------------------------------------------------------------------------------------
总计 2.8 MB/s | 13 MB 00:04
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
升级 : libtalloc-2.4.1-1.el9.x86_64 1/70
升级 : libtevent-0.16.0-1.el9.x86_64 2/70
升级 : libtdb-1.4.9-1.el9.x86_64 3/70
升级 : libldb-2.8.0-1.el9.x86_64 4/70
升级 : libsss_idmap-2.9.4-6.el9.x86_64 5/70
升级 : libsss_certmap-2.9.4-6.el9.x86_64 6/70
运行脚本: samba-common-4.19.4-104.el9.noarch 7/70
升级 : samba-common-4.19.4-104.el9.noarch 7/70
运行脚本: samba-common-4.19.4-104.el9.noarch 7/70
运行脚本: libwbclient-4.19.4-104.el9.x86_64 8/70
升级 : libwbclient-4.19.4-104.el9.x86_64 8/70
升级 : samba-common-libs-4.19.4-104.el9.x86_64 9/70
升级 : samba-client-libs-4.19.4-104.el9.x86_64 10/70
升级 : device-mapper-libs-9:1.02.197-2.el9.x86_64 11/70
升级 : device-mapper-9:1.02.197-2.el9.x86_64 12/70
升级 : device-mapper-event-libs-9:1.02.197-2.el9.x86_64 13/70
安装 : libnfsidmap-1:2.5.4-25.el9.x86_64 14/70
安装 : sssd-nfs-idmap-2.9.4-6.el9.x86_64 15/70
升级 : device-mapper-event-9:1.02.197-2.el9.x86_64 16/70
运行脚本: device-mapper-event-9:1.02.197-2.el9.x86_64 16/70
升级 : lvm2-libs-9:2.03.23-2.el9.x86_64 17/70
升级 : libsmbclient-4.19.4-104.el9.x86_64 18/70
升级 : libsss_sudo-2.9.4-6.el9.x86_64 19/70
升级 : libsss_nss_idmap-2.9.4-6.el9.x86_64 20/70
升级 : sssd-client-2.9.4-6.el9.x86_64 21/70
运行脚本: sssd-client-2.9.4-6.el9.x86_64 21/70
运行脚本: sssd-common-2.9.4-6.el9.x86_64 22/70
升级 : sssd-common-2.9.4-6.el9.x86_64 22/70
运行脚本: sssd-common-2.9.4-6.el9.x86_64 22/70
升级 : sssd-krb5-common-2.9.4-6.el9.x86_64 23/70
升级 : sssd-common-pac-2.9.4-6.el9.x86_64 24/70
升级 : sssd-ad-2.9.4-6.el9.x86_64 25/70
升级 : sssd-krb5-2.9.4-6.el9.x86_64 26/70
升级 : sssd-ldap-2.9.4-6.el9.x86_64 27/70
升级 : sssd-proxy-2.9.4-6.el9.x86_64 28/70
升级 : libipa_hbac-2.9.4-6.el9.x86_64 29/70
升级 : sssd-ipa-2.9.4-6.el9.x86_64 30/70
运行脚本: rpcbind-1.2.6-7.el9.x86_64 31/70
安装 : rpcbind-1.2.6-7.el9.x86_64 31/70
运行脚本: rpcbind-1.2.6-7.el9.x86_64 31/70
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /usr/lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /usr/lib/systemd/system/rpcbind.socket.
安装 : libev-4.33-5.el9.x86_64 32/70
安装 : libverto-libev-0.3.2-3.el9.x86_64 33/70
安装 : gssproxy-0.8.4-6.el9.x86_64 34/70
运行脚本: gssproxy-0.8.4-6.el9.x86_64 34/70
安装 : keyutils-1.6.3-1.el9.x86_64 35/70
运行脚本: nfs-utils-1:2.5.4-25.el9.x86_64 36/70
安装 : nfs-utils-1:2.5.4-25.el9.x86_64 36/70
运行脚本: nfs-utils-1:2.5.4-25.el9.x86_64 36/70
升级 : sssd-2.9.4-6.el9.x86_64 37/70
升级 : sssd-kcm-2.9.4-6.el9.x86_64 38/70
运行脚本: sssd-kcm-2.9.4-6.el9.x86_64 38/70
升级 : lvm2-9:2.03.23-2.el9.x86_64 39/70
运行脚本: lvm2-9:2.03.23-2.el9.x86_64 39/70
清理 : sssd-2.9.1-2.el9.x86_64 40/70
清理 : sssd-ipa-2.9.1-2.el9.x86_64 41/70
清理 : sssd-ad-2.9.1-2.el9.x86_64 42/70
清理 : libsmbclient-4.18.6-100.el9.x86_64 43/70
清理 : sssd-common-pac-2.9.1-2.el9.x86_64 44/70
清理 : samba-client-libs-4.18.6-100.el9.x86_64 45/70
清理 : samba-common-libs-4.18.6-100.el9.x86_64 46/70
清理 : libwbclient-4.18.6-100.el9.x86_64 47/70
清理 : sssd-ldap-2.9.1-2.el9.x86_64 48/70
清理 : sssd-proxy-2.9.1-2.el9.x86_64 49/70
清理 : sssd-krb5-2.9.1-2.el9.x86_64 50/70
运行脚本: sssd-kcm-2.9.1-2.el9.x86_64 51/70
清理 : sssd-kcm-2.9.1-2.el9.x86_64 51/70
运行脚本: sssd-kcm-2.9.1-2.el9.x86_64 51/70
清理 : sssd-krb5-common-2.9.1-2.el9.x86_64 52/70
运行脚本: sssd-common-2.9.1-2.el9.x86_64 53/70
清理 : sssd-common-2.9.1-2.el9.x86_64 53/70
运行脚本: sssd-common-2.9.1-2.el9.x86_64 53/70
清理 : libldb-2.7.2-2.el9.x86_64 54/70
运行脚本: sssd-client-2.9.1-2.el9.x86_64 55/70
清理 : sssd-client-2.9.1-2.el9.x86_64 55/70
清理 : libtevent-0.14.1-2.el9.x86_64 56/70
运行脚本: lvm2-9:2.03.21-3.el9.x86_64 57/70
清理 : lvm2-9:2.03.21-3.el9.x86_64 57/70
运行脚本: lvm2-9:2.03.21-3.el9.x86_64 57/70
清理 : samba-common-4.18.6-100.el9.noarch 58/70
清理 : lvm2-libs-9:2.03.21-3.el9.x86_64 59/70
运行脚本: device-mapper-event-9:1.02.195-3.el9.x86_64 60/70
清理 : device-mapper-event-9:1.02.195-3.el9.x86_64 60/70
清理 : device-mapper-event-libs-9:1.02.195-3.el9.x86_64 61/70
清理 : libsss_certmap-2.9.1-2.el9.x86_64 62/70
清理 : device-mapper-libs-9:1.02.195-3.el9.x86_64 63/70
清理 : device-mapper-9:1.02.195-3.el9.x86_64 64/70
清理 : libtalloc-2.4.0-2.el9.x86_64 65/70
清理 : libsss_idmap-2.9.1-2.el9.x86_64 66/70
清理 : libsss_nss_idmap-2.9.1-2.el9.x86_64 67/70
清理 : libtdb-1.4.8-2.el9.x86_64 68/70
清理 : libsss_sudo-2.9.1-2.el9.x86_64 69/70
清理 : libipa_hbac-2.9.1-2.el9.x86_64 70/70
运行脚本: sssd-common-2.9.4-6.el9.x86_64 70/70
运行脚本: libipa_hbac-2.9.1-2.el9.x86_64 70/70
验证 : gssproxy-0.8.4-6.el9.x86_64 1/70
验证 : keyutils-1.6.3-1.el9.x86_64 2/70
验证 : libev-4.33-5.el9.x86_64 3/70
验证 : libnfsidmap-1:2.5.4-25.el9.x86_64 4/70
验证 : libverto-libev-0.3.2-3.el9.x86_64 5/70
验证 : nfs-utils-1:2.5.4-25.el9.x86_64 6/70
验证 : rpcbind-1.2.6-7.el9.x86_64 7/70
验证 : sssd-nfs-idmap-2.9.4-6.el9.x86_64 8/70
验证 : device-mapper-9:1.02.197-2.el9.x86_64 9/70
验证 : device-mapper-9:1.02.195-3.el9.x86_64 10/70
验证 : device-mapper-event-9:1.02.197-2.el9.x86_64 11/70
验证 : device-mapper-event-9:1.02.195-3.el9.x86_64 12/70
验证 : device-mapper-event-libs-9:1.02.197-2.el9.x86_64 13/70
验证 : device-mapper-event-libs-9:1.02.195-3.el9.x86_64 14/70
验证 : device-mapper-libs-9:1.02.197-2.el9.x86_64 15/70
验证 : device-mapper-libs-9:1.02.195-3.el9.x86_64 16/70
验证 : libipa_hbac-2.9.4-6.el9.x86_64 17/70
验证 : libipa_hbac-2.9.1-2.el9.x86_64 18/70
验证 : libldb-2.8.0-1.el9.x86_64 19/70
验证 : libldb-2.7.2-2.el9.x86_64 20/70
验证 : libsmbclient-4.19.4-104.el9.x86_64 21/70
验证 : libsmbclient-4.18.6-100.el9.x86_64 22/70
验证 : libsss_certmap-2.9.4-6.el9.x86_64 23/70
验证 : libsss_certmap-2.9.1-2.el9.x86_64 24/70
验证 : libsss_idmap-2.9.4-6.el9.x86_64 25/70
验证 : libsss_idmap-2.9.1-2.el9.x86_64 26/70
验证 : libsss_nss_idmap-2.9.4-6.el9.x86_64 27/70
验证 : libsss_nss_idmap-2.9.1-2.el9.x86_64 28/70
验证 : libsss_sudo-2.9.4-6.el9.x86_64 29/70
验证 : libsss_sudo-2.9.1-2.el9.x86_64 30/70
验证 : libtalloc-2.4.1-1.el9.x86_64 31/70
验证 : libtalloc-2.4.0-2.el9.x86_64 32/70
验证 : libtdb-1.4.9-1.el9.x86_64 33/70
验证 : libtdb-1.4.8-2.el9.x86_64 34/70
验证 : libtevent-0.16.0-1.el9.x86_64 35/70
验证 : libtevent-0.14.1-2.el9.x86_64 36/70
验证 : libwbclient-4.19.4-104.el9.x86_64 37/70
验证 : libwbclient-4.18.6-100.el9.x86_64 38/70
验证 : lvm2-9:2.03.23-2.el9.x86_64 39/70
验证 : lvm2-9:2.03.21-3.el9.x86_64 40/70
验证 : lvm2-libs-9:2.03.23-2.el9.x86_64 41/70
验证 : lvm2-libs-9:2.03.21-3.el9.x86_64 42/70
验证 : samba-client-libs-4.19.4-104.el9.x86_64 43/70
验证 : samba-client-libs-4.18.6-100.el9.x86_64 44/70
验证 : samba-common-4.19.4-104.el9.noarch 45/70
验证 : samba-common-4.18.6-100.el9.noarch 46/70
验证 : samba-common-libs-4.19.4-104.el9.x86_64 47/70
验证 : samba-common-libs-4.18.6-100.el9.x86_64 48/70
验证 : sssd-2.9.4-6.el9.x86_64 49/70
验证 : sssd-2.9.1-2.el9.x86_64 50/70
验证 : sssd-ad-2.9.4-6.el9.x86_64 51/70
验证 : sssd-ad-2.9.1-2.el9.x86_64 52/70
验证 : sssd-client-2.9.4-6.el9.x86_64 53/70
验证 : sssd-client-2.9.1-2.el9.x86_64 54/70
验证 : sssd-common-2.9.4-6.el9.x86_64 55/70
验证 : sssd-common-2.9.1-2.el9.x86_64 56/70
验证 : sssd-common-pac-2.9.4-6.el9.x86_64 57/70
验证 : sssd-common-pac-2.9.1-2.el9.x86_64 58/70
验证 : sssd-ipa-2.9.4-6.el9.x86_64 59/70
验证 : sssd-ipa-2.9.1-2.el9.x86_64 60/70
验证 : sssd-kcm-2.9.4-6.el9.x86_64 61/70
验证 : sssd-kcm-2.9.1-2.el9.x86_64 62/70
验证 : sssd-krb5-2.9.4-6.el9.x86_64 63/70
验证 : sssd-krb5-2.9.1-2.el9.x86_64 64/70
验证 : sssd-krb5-common-2.9.4-6.el9.x86_64 65/70
验证 : sssd-krb5-common-2.9.1-2.el9.x86_64 66/70
验证 : sssd-ldap-2.9.4-6.el9.x86_64 67/70
验证 : sssd-ldap-2.9.1-2.el9.x86_64 68/70
验证 : sssd-proxy-2.9.4-6.el9.x86_64 69/70
验证 : sssd-proxy-2.9.1-2.el9.x86_64 70/70
已更新安装的产品。
已升级:
device-mapper-9:1.02.197-2.el9.x86_64 device-mapper-event-9:1.02.197-2.el9.x86_64
device-mapper-event-libs-9:1.02.197-2.el9.x86_64 device-mapper-libs-9:1.02.197-2.el9.x86_64
libipa_hbac-2.9.4-6.el9.x86_64 libldb-2.8.0-1.el9.x86_64
libsmbclient-4.19.4-104.el9.x86_64 libsss_certmap-2.9.4-6.el9.x86_64
libsss_idmap-2.9.4-6.el9.x86_64 libsss_nss_idmap-2.9.4-6.el9.x86_64
libsss_sudo-2.9.4-6.el9.x86_64 libtalloc-2.4.1-1.el9.x86_64
libtdb-1.4.9-1.el9.x86_64 libtevent-0.16.0-1.el9.x86_64
libwbclient-4.19.4-104.el9.x86_64 lvm2-9:2.03.23-2.el9.x86_64
lvm2-libs-9:2.03.23-2.el9.x86_64 samba-client-libs-4.19.4-104.el9.x86_64
samba-common-4.19.4-104.el9.noarch samba-common-libs-4.19.4-104.el9.x86_64
sssd-2.9.4-6.el9.x86_64 sssd-ad-2.9.4-6.el9.x86_64
sssd-client-2.9.4-6.el9.x86_64 sssd-common-2.9.4-6.el9.x86_64
sssd-common-pac-2.9.4-6.el9.x86_64 sssd-ipa-2.9.4-6.el9.x86_64
sssd-kcm-2.9.4-6.el9.x86_64 sssd-krb5-2.9.4-6.el9.x86_64
sssd-krb5-common-2.9.4-6.el9.x86_64 sssd-ldap-2.9.4-6.el9.x86_64
sssd-proxy-2.9.4-6.el9.x86_64
已安装:
gssproxy-0.8.4-6.el9.x86_64 keyutils-1.6.3-1.el9.x86_64 libev-4.33-5.el9.x86_64
libnfsidmap-1:2.5.4-25.el9.x86_64 libverto-libev-0.3.2-3.el9.x86_64 nfs-utils-1:2.5.4-25.el9.x86_64
rpcbind-1.2.6-7.el9.x86_64 sssd-nfs-idmap-2.9.4-6.el9.x86_64
完毕!
NFS服务依赖于rpcbind服务来管理远程过程调用(RPC)的绑定和注册
yum install rpcbind -y
如果提示无法安装可以尝试替换yum源
验证是否安装成功
[root@localhost ~]# rpm -qa | grep -i nfs-utils
nfs-utils-2.5.4-25.el9.x86_64
关闭防火墙和selinux(可能需要)
# 关闭防火墙
[root@localhost ~]# systemctl stop firewalld
# 验证防火墙是否关闭 Active: inactive (dead)即为关闭
[root@localhost ~]# systemctl status firewalld
○ firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; preset: enabled)
Active: inactive (dead) since Sat 2024-05-11 17:16:12 CST; 34s ago
Duration: 51min 17.965s
Docs: man:firewalld(1)
Process: 40782 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0>
Main PID: 40782 (code=exited, status=0/SUCCESS)
CPU: 528ms
5月 11 16:24:53 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
5月 11 16:24:54 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
5月 11 17:16:12 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
5月 11 17:16:12 localhost.localdomain systemd[1]: firewalld.service: Deactivated successfully.
5月 11 17:16:12 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
# 关闭selinux
[root@localhost ~]# setenforce 0
# 验证是否关闭-enforcing (执行中)、permissive (不执行但产生警告)、disabled(关闭)
[root@localhost ~]# getenforce
Permissive
配置NFS服务端
配置nfs共享目录
[root@localhost ~]# mkdir /nfsdata
[root@localhost ~]# chmod -Rf 777 /nfsdata
nfs配置文件
vim /etc/exports
/nfsdata *(rw,sync,root_squash)
共享目录 客户端(权限)
客户端,可以识别的客户端
- 指定IP: 192.168.22.1
- 指定网段:192.168.22.0/24 或者 192.168.22.0/255.255.255.0
- 指定主机名:www.linux.com
- 所有主机:*
权限,常用权限
- rw:读写
- ro:只读
- all_ squash:不论登陆是谁,都压缩为匿名用户nfsnobody
- root squash:如果登陆的是root,压缩为nfsnobody
- no_ root_squash:允许root身份登陆{不推荐
- anonuid:把所有的登陆用户,不再压缩为nfsnobody用户,而是压缩为指定uid用户
- sync:将数据同步写入内存缓冲区与磁盘中,效率低,但可以保证数据的一- 致性;
- async:将数据先保存在内存缓冲区中,必要时才写入磁盘
开启NFS服务
[root@localhost ~]# systemctl restart rpcbind && systemctl enable rpcbind
[root@localhost ~]# systemctl restart nfs-server && systemctl enable nfs-server
测试连接与挂载
[root@localhost ~]# showmount -e 192.168.22.143
Export list for 192.168.22.143:
/nfsdata *
[root@localhost ~]# mount -t nfs 192.168.22.143:/nfsdata /mnt
测试
客户端创建文件服务端同步测试
客户端
[root@localhost ~]# cd /mnt
[root@localhost mnt]# ll
总用量 0
[root@localhost mnt]# echo '123' > 1.txt
[root@localhost mnt]# ll
总用量 4
-rw-r--r--. 1 nobody nobody 4 5月 16 11:20 1.txt
[root@localhost mnt]#
服务端
[root@localhost ~]# cd /nfsdata
[root@localhost nfsdata]# ll
总用量 4
-rw-r--r--. 1 nobody nobody 4 5月 16 11:20 1.txt
[root@localhost nfsdata]#
服务端创建文件客户端测试
服务端
[root@localhost nfsdata]# echo '456' > 2.txt
[root@localhost nfsdata]# ll
总用量 8
-rw-r--r--. 1 nobody nobody 4 5月 16 11:20 1.txt
-rw-r--r--. 1 root root 4 5月 16 11:22 2.txt
客户端
[root@localhost mnt]# ll
总用量 8
-rw-r--r--. 1 nobody nobody 4 5月 16 11:20 1.txt
-rw-r--r--. 1 root root 4 5月 16 11:22 2.txt
[root@localhost mnt]# cat 2.txt
456
© 版权声明
THE END
暂无评论内容