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