Linux-配置共享目錄
找到相關rpm包
執行以及錯誤解決**
rpm -ivh tcp_wrappers-7.6-34.i386.rpm
rpm -ivh portmap-4.0-54.i386.rpm
rpm -ivh nfs-utls.1.0.1-2.9..i386.rpm
rpm -ivh tcp_wrappers-7.6-34.i386.rpm
ERROR: libc.so.6 is needed by ......
SOLUTION:
libc.so.6的軟體庫為glibc
yum list glibc*
發現沒有安裝glibc.i686,使用yum install glibc.i686時出現新的錯誤,即Protected multilib versions,下載了nss-softokn-freebl-3.14.3-22.el6_6.i686.rpm
找到並下載了與系統中glibc版本相同的glibc-2.12-1.132.el6.i686.rpm,發現還是同樣的libc.so.6 is needed by ......,,將兩個rpm包一起執行
rpm -ivh glibc-2.12-1.132.el6.i686.rpm nss-softokn-freebl-3.14.3-22.el6_6.i686.rpm
rpm -ivh portmap-4.0-54.i386.rpm
ERROR: libwrap.so.0 is needed by ......
RESOLUTION: 少安裝了tcp_wrappers-libs-7.6-57.el6.i686.rpm,下載,安裝
rpm -ivh nfs-utls.1.0.1-2.9..i386.rpm
ERROR: nfs-utils < 1.0.7-12 conflicts with kernel-2.6.32-431.el6.x86_64
RESOLUTION:
版本過低,重新下載了nfs-utils-1.2.3-39.el6.x86_64.rpm,下載,安裝
啟動埠對映:
/etc/rc.d/init.d/portmap start
執行如下命令啟動NFS服務,此時NFS會啟用守護程序,然後就開始監聽Client端的請求:
/etc/rc.d/init.d/nfs start
配置共享配置檔案
/etc/exports
/ds_data為安裝了nfs的伺服器上的共享目錄資料夾,10.120.131.236為即將訪問共享目錄的伺服器
重新啟動nfs服務
到伺服器上上掛載
建立資料夾
mkdir /opt/test
掛載
mount -t nfs 10.120.131.245:/ds_data /opt/test
檢視
cd /opt/test
ll