NFS服务器搭建
2014-03-29 15:25
232 查看
创建NFS共享目录,
服务端ip:192.168.1.11 主机名:hate
客户端ip:192.168.1.10 主机名:love
[root@hate ~]# mkdir -p /nfs/backup
[root@hate ~]# chmod -R 777 /nfs
修改/etc/exports
/nfs/backup love(rw,async,nohide,no_subtree_check)
注意:这里的解析名一定要用hostname,否则会出现权限的问题
[root@hate ~]# showmount -e
mount clntudp_create: RPC: Program not registered
遇到这个问题时解决办法
[root@hate ~]# /etc/init.d/nfs restart
[root@hate ~]# showmount -e
Export list for hate:
/nfs/backup love
[root@hate ~]# service nfs restart
[root@hate ~]# chkconfig nfs on
客户端192.168.1.10挂载NFS文件系统
[root@love ~]# mkdir /mynfs
手动挂载
[root@love ~]# mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 hate:/nfs/backup /mynfs
[root@love ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
45G 9.3G 33G 23% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
hate:/nfs/backup 45G 6.5G 36G 16% /mynfs
实现开机自动挂载
[root@love ~]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
添加如下配置:这样还可以支持RMAN备份。
modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
/bin/mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 hate:/nfs/backup /mynfs
重启系统
[root@love ~]# reboot
[root@love ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
45G 9.3G 33G 23% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
192.168.1.11:/nfs/backup 45G 6.5G 36G 16% /mynfs
服务端ip:192.168.1.11 主机名:hate
客户端ip:192.168.1.10 主机名:love
[root@hate ~]# mkdir -p /nfs/backup
[root@hate ~]# chmod -R 777 /nfs
修改/etc/exports
/nfs/backup love(rw,async,nohide,no_subtree_check)
注意:这里的解析名一定要用hostname,否则会出现权限的问题
[root@hate ~]# showmount -e
mount clntudp_create: RPC: Program not registered
遇到这个问题时解决办法
[root@hate ~]# /etc/init.d/nfs restart
[root@hate ~]# showmount -e
Export list for hate:
/nfs/backup love
[root@hate ~]# service nfs restart
[root@hate ~]# chkconfig nfs on
客户端192.168.1.10挂载NFS文件系统
[root@love ~]# mkdir /mynfs
手动挂载
[root@love ~]# mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 hate:/nfs/backup /mynfs
[root@love ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
45G 9.3G 33G 23% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
hate:/nfs/backup 45G 6.5G 36G 16% /mynfs
实现开机自动挂载
[root@love ~]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
添加如下配置:这样还可以支持RMAN备份。
modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
/bin/mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 hate:/nfs/backup /mynfs
重启系统
[root@love ~]# reboot
[root@love ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
45G 9.3G 33G 23% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
192.168.1.11:/nfs/backup 45G 6.5G 36G 16% /mynfs
相关文章推荐
- 搭建nfs服务器
- Centos 6.5 搭建NFS服务器笔记
- RHEL6.4 NFS文件共享服务器搭建
- ubuntu下搭建nfs服务器
- Mac OS X 搭建PXE服务器并无人值守安装Linux系统(基于DHCP TFTP NFS kickstart)
- NFS服务器搭建与使用
- fedora 13,s3c6410开发板 环境下搭建 nfs服务器
- 2-5-RHEL6.5搭建NFS服务器案例分析与总结(Red Hat Enterprise Linux Server6.5)@
- Exynos4412 NFS服务器搭建
- 搭建NFS服务器
- ubuntu 12.04中搭建nfs服务器
- fedora12搭建smb,tftp,nfs服务器
- NFS服务器搭建和配置
- NFS服务器搭建
- 简单NFS服务器的搭建
- [3]_嵌入式开发环境搭建1_在ubuntu16.04.3 安装配置nfs 和 tftp服务器
- 搭建NFS服务器
- NFS服务器搭建 unbuntu
- fedora 9下搭建Tiny6410 的nfs服务器的方法 非常详细(by 星空武哥)
- linux下NFS服务器搭建