CentOS 6 NFS的安裝配置
NFS的安裝配置:
centos 5 :
yum install nfs-utils portmap
centos 6 :
yum install nfs-utils rpcbind
本節是使用centos 6的配置過程:
裝置:兩臺 centos6 OS 安裝的時候選擇的是"Basic Server"軟體配置包。
首先,讓兩臺機器都安裝NFS的 軟體包,如下顯示的是伺服器端:
[root@roothomes /home]$ yum install nfs-utils rpcbind
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
Package rpcbind-0.2.0-8.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.2.3-15.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
nfs-utils x86_64 1:1.2.3-15.el6 base 308 k
Transaction Summary
================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)
Total download size: 308 k
Is this ok [y/N]: y
Downloading Packages:
nfs-utils-1.2.3-15.el6.x86_64.rpm | 308 kB 00:10
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
base/gpgkey | 3.3 kB 00:00 ...
Importing GPG key 0xC105B9DE "CentOS-6 Key (CentOS 6 Official Signing Key) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 1:nfs-utils-1.2.3-15.el6.x86_64 1/2
Cleanup : 1:nfs-utils-1.2.2-7.el6.x86_64 2/2
Updated:
nfs-utils.x86_64 1:1.2.3-15.el6
Complete!
[root@roothomes /home]$
伺服器端:
###(建立掛載的目錄,並且掛載目錄。)
[root@roothomes /etc]$ mkdir /opt/centos6
[root@roothomes /etc]$ cd /opt/centos6/
[root@roothomes /opt/centos6]$ mkdir thisISnfsFile
[root@roothomes /opt/centos6]$ ls
thisISnfsFile
[root@roothomes /etc]$ vi /etc/exports
[root@roothomes /opt/centos6]$ cat /etc/exports
/opt/centos6 192.168.1.0/24(ro,no_root_squash)
### 備註:/opt/centos6表示nfs共享的目錄 192.168.1.0-192.168.1.254區間的IP可以訪問,訪問許可權是隻讀,root 使用者
###(啟動對應的服務)
[root@roothomes /opt/centos6]$ chkconfig nfs on
[root@roothomes /opt/centos6]$ /etc/init.d/rpcbind start
[root@roothomes /opt/centos6]$ /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
[root@roothomes /opt/centos6]$ service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
客戶端:
[root@roothomes /home]$ yum install nfs-utils rpcbind
安裝完畢!
[root@vmBS00 ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
###檢視是否能訪問nfs服務
[root@vmBS00 ~]# showmount -e 192.168.1.75
Export list for 192.168.1.75:
/opt/centos6 192.168.1.0/24
[root@vmBS00 ~]# mkdir /opt/centos6
[root@vmBS00 ~]# mount -t nfs 192.168.1.75:/opt/centos6/ /opt/centos6/
[root@vmBS00 ~]# ls /opt/centos6/
thisISnfsFile
###配置開機自動掛載
[root@vmBS00 ~]# vi /etc/fstab
### 新增 #192.168.1.75:/opt/centos6/ /opt/centos6/ nfs nodev,ro,rsize=32768,wsize=32768 0 0
[root@vmBS00 ~]# init 6
[root@vmBS00 ~]#
login as: root
root@192.168.1.116's password:
Last login: Mon Mar 5 17:29:04 2012 from 192.168.1.23
[root@vmBS00 ~]# ls /opt/centos6/
thisISnfsFile
centos 5 :
yum install nfs-utils portmap
centos 6 :
yum install nfs-utils rpcbind
本節是使用centos 6的配置過程:
裝置:兩臺 centos6 OS 安裝的時候選擇的是"Basic Server"軟體配置包。
首先,讓兩臺機器都安裝NFS的 軟體包,如下顯示的是伺服器端:
[root@roothomes /home]$ yum install nfs-utils rpcbind
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
Package rpcbind-0.2.0-8.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.2.3-15.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
nfs-utils x86_64 1:1.2.3-15.el6 base 308 k
Transaction Summary
================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)
Total download size: 308 k
Is this ok [y/N]: y
Downloading Packages:
nfs-utils-1.2.3-15.el6.x86_64.rpm | 308 kB 00:10
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
base/gpgkey | 3.3 kB 00:00 ...
Importing GPG key 0xC105B9DE "CentOS-6 Key (CentOS 6 Official Signing Key) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 1:nfs-utils-1.2.3-15.el6.x86_64 1/2
Cleanup : 1:nfs-utils-1.2.2-7.el6.x86_64 2/2
Updated:
nfs-utils.x86_64 1:1.2.3-15.el6
Complete!
[root@roothomes /home]$
伺服器端:
###(建立掛載的目錄,並且掛載目錄。)
[root@roothomes /etc]$ mkdir /opt/centos6
[root@roothomes /etc]$ cd /opt/centos6/
[root@roothomes /opt/centos6]$ mkdir thisISnfsFile
[root@roothomes /opt/centos6]$ ls
thisISnfsFile
[root@roothomes /etc]$ vi /etc/exports
[root@roothomes /opt/centos6]$ cat /etc/exports
/opt/centos6 192.168.1.0/24(ro,no_root_squash)
### 備註:/opt/centos6表示nfs共享的目錄 192.168.1.0-192.168.1.254區間的IP可以訪問,訪問許可權是隻讀,root 使用者
###(啟動對應的服務)
[root@roothomes /opt/centos6]$ chkconfig nfs on
[root@roothomes /opt/centos6]$ /etc/init.d/rpcbind start
[root@roothomes /opt/centos6]$ /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
[root@roothomes /opt/centos6]$ service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
客戶端:
[root@roothomes /home]$ yum install nfs-utils rpcbind
安裝完畢!
[root@vmBS00 ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
###檢視是否能訪問nfs服務
[root@vmBS00 ~]# showmount -e 192.168.1.75
Export list for 192.168.1.75:
/opt/centos6 192.168.1.0/24
[root@vmBS00 ~]# mkdir /opt/centos6
[root@vmBS00 ~]# mount -t nfs 192.168.1.75:/opt/centos6/ /opt/centos6/
[root@vmBS00 ~]# ls /opt/centos6/
thisISnfsFile
###配置開機自動掛載
[root@vmBS00 ~]# vi /etc/fstab
### 新增 #192.168.1.75:/opt/centos6/ /opt/centos6/ nfs nodev,ro,rsize=32768,wsize=32768 0 0
[root@vmBS00 ~]# init 6
[root@vmBS00 ~]#
login as: root
root@192.168.1.116's password:
Last login: Mon Mar 5 17:29:04 2012 from 192.168.1.23
[root@vmBS00 ~]# ls /opt/centos6/
thisISnfsFile
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29620572/viewspace-1828197/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS 7 安裝配置 NFSCentOSNFS
- Centos7 安裝配置NFSCentOSNFS
- CentOS 6.X 上安裝配置 NFS 目錄共享CentOSNFS
- CentOS6.7安裝配置nfs服務CentOSNFS
- Linux CentOS 檔案共享NFS的安裝配置LinuxCentOSNFS
- CentOS6下mysql的安裝與配置CentOSMySql
- NFS介紹、NFS服務端安裝配置、NFS配置選項NFS服務端
- CentOS 6 安裝MAVEN及系統配置CentOSMaven
- CentOS 6 安裝配置教程【完整版】CentOS
- nfs伺服器安裝配置NFS伺服器
- heartbeat+drbd+nfs安裝配置NFS
- VMware安裝CentOS-6 minimal的網路配置CentOS
- NFS伺服器的安裝與配置NFS伺服器
- SUSE 11 NFS server/client 安裝配置NFSServerclient
- Ubuntu 14.04下NFS安裝配置UbuntuNFS
- CentOS redis安裝配置CentOSRedis
- CentOS安裝配置yumCentOS
- RabbitMQ安裝配置(CentOS)MQCentOS
- CentOS7最小化安裝後要做的事(6):Apache安裝與配置CentOSApache
- centos6 安裝EPELCentOS
- CentOS6 安裝 RedisCentOSRedis
- centos6 下的apache安裝CentOSApache
- Centos安裝與配置RedisCentOSRedis
- CentOS下安裝配置cmakeCentOS
- 【redis】centOS安裝配置redisRedisCentOS
- Centos-redis安裝配置CentOSRedis
- CentOs中mysql的安裝與配置CentOSMySql
- centos 6.x 安裝 gogsCentOSGo
- SQLAdvisor安裝(CentOS 6)SQLCentOS
- CentOS6.x安裝RabbitMQCentOSMQ
- centos6上安裝dockerCentOSDocker
- Centos7-VMware+Centos7安裝配置CentOS
- Centos6安裝配置rsync+inotify實時單向同步CentOS
- 在CentOS6上使用saltstack原始碼安裝配置mysql薦CentOS原始碼MySql
- CentOS:spark-project專案的CentOS 6.4安裝配置CentOSSparkProject
- CentOS下tomcat安裝配置CentOSTomcat
- CentOS Hbase-1.2.0 安裝配置CentOS
- Centos7 安裝配置MysqlCentOSMySql