Centos7服務(wù)器離線安裝NFS服務(wù)安裝手冊(cè)
10.10.140.10訪問(wèn)10.10.140.11服務(wù)器文件目錄
以下簡(jiǎn)稱服務(wù)器1。
安裝包存儲(chǔ)路徑:/software
NFS文件目錄:/home/Ihelper/uploadPath/upload
以下簡(jiǎn)稱服務(wù)器2。
安裝包存儲(chǔ)路徑:/software
Nfs目錄:/mnt/videoFile
#cat /proc/version
#cat /etc/os-release
https://pkgs.org/download/nfs-utils
具體文件如下:
百度網(wǎng)盤(pán)鏈接:https://pan.baidu.com/s/19XCprb9rJluMu8lqRr-HnQ,提取碼:xzs8
在2臺(tái)服務(wù)器新建目錄/software,將文件拷貝到2臺(tái)服務(wù)器的/software目錄下。
新建目錄指令:
#mkdir software
1)檢查服務(wù)器1(10.10.140.11)是否安裝了nfs服務(wù)
#rpm -qa |grep nfs
2)執(zhí)行命令
下述命令涉及到依賴,需要按順序安裝
#rpm -ivh libbasicobjects-0.1.1-32.el7.x86_64.rpm
# rpm -ivh libcollection-0.7.0-32.el7.x86_64.rpm
# rpm -ivh libref_array-0.1.5-32.el7.x86_64.rpm
# rpm -ivh libverto-0.2.5-4.el7.x86_64.rpm
# rpm -ivh libpath_utils-0.2.1-32.el7.x86_64.rpm
# rpm -ivh libini_config-1.3.1-32.el7.x86_64.rpm
# rpm -ivh libevent-2.0.21-4.el7.x86_64.rpm
# rpm -ivh libverto-libevent-0.2.5-4.el7.x86_64.rpm
# rpm -ivh gssproxy-0.7.0-30.el7_9.x86_64.rpm
# rpm -ivh keyutils-1.5.8-3.el7.x86_64.rpm
# rpm -ivh libnfsidmap-0.25-19.el7.x86_64.rpm
# rpm -ivh nfs-utils-1.3.0-0.68.el7.2.x86_64.rpm
# rpm -qa |grep nfs
至此,nfs文件在服務(wù)器1上安裝完成,進(jìn)入nfs配置階段。
1)檢查服務(wù)器1(10.10.140.10)是否安裝了nfs服務(wù)
#rpm -qa |grep nfs
2)執(zhí)行命令
#rpm -ivh libbasicobjects-0.1.1-32.el7.x86_64.rpm
# rpm -ivh libcollection-0.7.0-32.el7.x86_64.rpm
# rpm -ivh libref_array-0.1.5-32.el7.x86_64.rpm
# rpm -ivh libverto-0.2.5-4.el7.x86_64.rpm
# rpm -ivh libpath_utils-0.2.1-32.el7.x86_64.rpm
# rpm -ivh libini_config-1.3.1-32.el7.x86_64.rpm
# rpm -ivh libevent-2.0.21-4.el7.x86_64.rpm
# rpm -ivh libverto-libevent-0.2.5-4.el7.x86_64.rpm
# rpm -ivh gssproxy-0.7.0-30.el7_9.x86_64.rpm
# rpm -ivh keyutils-1.5.8-3.el7.x86_64.rpm
# rpm -ivh libnfsidmap-0.25-19.el7.x86_64.rpm
3)安裝nfs-utils
# rpm -ivh nfs-utils-1.3.0-0.68.el7.2.x86_64.rpm
在服務(wù)器2上有缺失依賴包,繼續(xù)按提示逐個(gè)下載依賴包,如下:
# rpm -ivh libtirpc-0.2.4-0.16.el7.x86_64.rpm
# rpm -ivh rpcbind-0.2.0-49.el7.x86_64.rpm
# rpm -ivh quota-nls-4.01-19.el7.noarch.rpm
# rpm -ivh tcp_wrappers-7.6-77.el7.x86_64.rpm
# rpm -ivh quota-4.01-19.el7.x86_64.rpm
# rpm -ivh nfs-utils-1.3.0-0.68.el7.2.x86_64.rpm
# rpm -qa |grep nfs
至此,nfs文件在服務(wù)器2上安裝完成,進(jìn)入nfs配置階段。
# vim /etc/exports
增加一行記錄:
/home/Ihelper/uploadPath/upload 10.10.140.10(rw,no_root_squash,async)
# exportfs –arv
#systemctl enable rpcbind.service
#systemctl enable nfs-server.service
#systemctl start rpcbind.service
#systemctl start nfs-server.service
# service rpcbind start
# service nfs start
# chkconfig nfs on
#systemctl enable rpcbind.service
#systemctl enable nfs-server.service
#systemctl start rpcbind.service
#systemctl start nfs-server.service
#showmount -e 10.10.140.11
掛載:
#mount -t nfs 10.10.140.11:/home/Ihelper/uploadPath/upload /mnt/videoFile
開(kāi)機(jī)永久掛載:
#vi /etc/fstab
添加如下行:
10.10.140.11:/home/Ihelper/uploadPath/upload /mnt/videoFile nfs defaults 0 0
查詢本機(jī)nfs共享目錄情況
#showmount -e
查詢本機(jī)共享目錄連接情況
#showmount -a localhost
現(xiàn)象:客戶端 /mnt/videoFile目錄雖然掛載成功NFS服務(wù)端的目錄,但是NFS客戶端掛載目錄里并不顯示NFS服務(wù)端目錄下的內(nèi)容。
解決方案:在NFS客戶端掛載/卸載NFS服務(wù)端目錄的時(shí)候一定要事先退出掛載目錄,退出掛載/卸載目錄之后再進(jìn)入掛載目錄查看結(jié)果。
PDF文件:
entos7服務(wù)器離線安裝NFS服務(wù)器離線安裝手冊(cè).pdf
想了解更多?現(xiàn)在就開(kāi)始免費(fèi)體驗(yàn)