深度Linux安装部署nfs-server共享文件-创新互联

安装nfs-server

创新互联是一家专业提供炎陵企业网站建设,专注与成都网站设计、成都网站建设、H5建站、小程序制作等业务。10年已为炎陵众多企业、政府机构等服务。创新互联专业网站制作公司优惠进行中。
sudo apt install nfs-kernel-server

安装日志

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  apache2-bin apache2-data chromium-common chromium-sandbox deepin-wine-helper:i386 deepin-wine-runtime deepin-wine6-stable fonts-cantarell
  game-data-packager glx-alternative-mesa initramfs-tools-core klibc-utils libaprutil1-dbd-sqlite3 libaprutil1-ldap libjsoncpp1 libklibc
  libnvidia-egl-wayland1 libnvidia-eglcore libnvidia-glcore libnvidia-ptxjitcompiler1 libnvidia-ptxjitcompiler1:i386 libopenshot-audio6
  libopenshot16 libportmidi0 libre2-5 mame-data puredata-dev puredata-doc puredata-extra puredata-utils python3-openshot python3-pyqt5.qtsvg
  python3-pyqt5.qtwebkit python3-zmq update-glx
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
  keyutils libnfsidmap2 nfs-common rpcbind
建议安装:
  open-iscsi watchdog
下列【新】软件包将被安装:
  keyutils libnfsidmap2 nfs-common nfs-kernel-server rpcbind
升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 436 个软件包未被升级。
需要下载 479 kB 的归档。
解压缩后会消耗 1,503 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 https://community-packages.deepin.com/deepin apricot/main amd64 libnfsidmap2 amd64 0.25-5.1+apricot [32.6 kB]
获取:2 https://community-packages.deepin.com/deepin apricot/main amd64 keyutils amd64 1.6-6 [51.7 kB]
获取:3 https://community-packages.deepin.com/deepin apricot/main amd64 rpcbind amd64 1.2.5-0.3+deb10u1 [47.1 kB]
获取:4 https://community-packages.deepin.com/deepin apricot/main amd64 nfs-common amd64 1:1.3.4-2.5+deb10u1+rebuild [226 kB]
获取:5 https://community-packages.deepin.com/deepin apricot/main amd64 nfs-kernel-server amd64 1:1.3.4-2.5+deb10u1+rebuild [122 kB]
已下载 479 kB,耗时 1秒 (488 kB/s)          
正在选中未选择的软件包 libnfsidmap2:amd64。
(正在读取数据库 ... 系统当前共安装有 469485 个文件和目录。)
准备解压 .../libnfsidmap2_0.25-5.1+apricot_amd64.deb  ...
正在解压 libnfsidmap2:amd64 (0.25-5.1+apricot) ...
正在选中未选择的软件包 keyutils。
准备解压 .../keyutils_1.6-6_amd64.deb  ...
正在解压 keyutils (1.6-6) ...
正在选中未选择的软件包 rpcbind。
准备解压 .../rpcbind_1.2.5-0.3+deb10u1_amd64.deb  ...
正在解压 rpcbind (1.2.5-0.3+deb10u1) ...
正在选中未选择的软件包 nfs-common。
准备解压 .../nfs-common_1%3a1.3.4-2.5+deb10u1+rebuild_amd64.deb  ...
正在解压 nfs-common (1:1.3.4-2.5+deb10u1+rebuild) ...
正在选中未选择的软件包 nfs-kernel-server。
准备解压 .../nfs-kernel-server_1%3a1.3.4-2.5+deb10u1+rebuild_amd64.deb  ...
正在解压 nfs-kernel-server (1:1.3.4-2.5+deb10u1+rebuild) ...
正在设置 rpcbind (1.2.5-0.3+deb10u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /lib/systemd/system/rpcbind.socket.
正在设置 keyutils (1.6-6) ...
正在设置 libnfsidmap2:amd64 (0.25-5.1+apricot) ...
正在设置 nfs-common (1:1.3.4-2.5+deb10u1+rebuild) ...

Creating config file /etc/idmapd.conf with new version
正在添加系统用户"statd" (UID 129)...
正在将新用户"statd" (UID 129)添加到组"nogroup"...
无法创建主目录"/var/lib/nfs"。
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-client.target → /lib/systemd/system/nfs-client.target.
Created symlink /etc/systemd/system/remote-fs.target.wants/nfs-client.target → /lib/systemd/system/nfs-client.target.
nfs-utils.service is a disabled or a static unit, not starting it.
正在设置 nfs-kernel-server (1:1.3.4-2.5+deb10u1+rebuild) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-server.service → /lib/systemd/system/nfs-server.service.
Job for nfs-server.service canceled.

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
正在处理用于 man-db (2.8.5-2) 的触发器 ...
正在处理用于 libc-bin (2.28.21-1+deepin-1) 的触发器 ...
Scanning processes...                                                                                                                         
Scanning candidates...                                                                                                                        
Scanning processor microcode...                                                                                                               
Scanning linux images...                                                                                                                      

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

User sessions running outdated binaries:
 yeqiang @ session #32: chrome[225643,225681], kwin_no_scale[17918]

配置exports

sudo vim /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/home/yeqiang/Downloads 192.168.1.*(ro,sync,no_subtree_check)

重启nfs-server服务

端口查看

nfs-server端防火墙(连不上时做如下操作,暂时没明白细节)

iptables -F
systemctl restart firewalld

nfs-client

mount -t nfs 192.168.1.5:/home/yeqiang/Downloads /mnt/yeqiang-nfs/

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


当前标题:深度Linux安装部署nfs-server共享文件-创新互联
网站URL:http://scyanting.com/article/ccisdd.html