CentOS 6 NFS的安装配置
$ sudo umount /mnt/
/mnt was not found in /proc/mounts
/mnt was not found in /proc/mounts
解决:
umount 时使用 -l 命令。
$ sudo umount -l /mnt/
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) <cent os-6-key@centos.org="">" 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
[root@vmBS00 ~]#
CentOS 6 NFS的安装配置的更多相关文章
- CentOS 6.3 NFS的安装配置、启动及mount挂载方法
一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置: centos 5 : yum -y install ...
- CentOS NFS的安装配置、启动及mount挂载方法
一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置:centos 5 : yum -y install n ...
- CentOS5、6 NFS的安装配置及mount方法
一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置:centos 5 : yum -y install n ...
- Centos 7环境下安装配置Hadoop 3.0 Beta1简记
前言 由于以前已经写过一篇Centos 7环境下安装配置2.8的随笔,因此这篇写得精简些,只挑选一些重要环节记录一下. 安装环境为:两台主机均为Centos 7.*操作系统,两台机器配置分别为: 主机 ...
- 阿里云服务器 ECS 部署lamp:centos+apache+mysql+php安装配置方法 (centos7)
阿里云服务器 ECS 部署lamp:centos+apache+mysql+php安装配置方法 (centos7) 1.效果图 1 2. 部署步骤 1 1. mysql安装附加(centos7) 7 ...
- Windows和Centos下Docker的安装配置
Windows和Centos下Docker的安装配置 windows环境下的安装(win10) 在Windows系统上需要利用toolbox来安装Docker,现在 Docker 有专门的 Win10 ...
- CentOS下使用yum安装配置和使用svn
安装说明 系统环境:CentOS-6.3安装方式:yum install (源码安装容易产生版本兼容的问题)安装软件:系统自动下载SVN软件 检查已安装版本 ? 1 2 3 4 5 6 7 8 9 1 ...
- CentOS 7 Xinetd服务安装配置
CentOS 7 Xinetd服务安装配置 目录 CentOS 7 Xinetd服务安装配置 一.Linux守护进程与初始化进程 1. 什么是守护进程 2. 什么是初始化 二.Linux独立启动进程和 ...
- CentOS 6.5 yum安装配置lnmp服务器(Nginx+PHP+MySQL)
以下全部转载于 http://blog.csdn.net/lane_l/article/details/20235909 本人于今晚按照该文章使用centos 6.7 64bit安装成功,做个备份, ...
随机推荐
- Stu Website
GIT: 分支的新建与合并 https://git-scm.com/book/zh/v2/Git-分支-分支的新建与合并 分支的管理 https://git-scm.com/book/zh/v1/Gi ...
- linq中first() firstordefault() last() lastOrDefault() single() singleOrDeafult
一.firstordefault() 和 first() class Program { static void Main(string[] args) { List<Emp> list ...
- Validation of viewstate MAC failed machinekey生成、使用方法
前段时间公司为了减轻服务器压力,对网页做了集群,分布在多台服务器,通过DNS轮回解析到各台服务器,结果页面只要打开停留到DNS解析到下一个地址,就会出现出下错误信息. Validation of vi ...
- typeof判断类型(数组类型得用instanceof)
var a= 1; console.log(typeof a); var b= '1'; console.log(typeof b); var c; console.log(typeof c); va ...
- regress
#! /bin/ksh ############### ### UAT ### ############### export ENVS=/test/change/env/env_test.sq ...
- [maven] 新建项目一直提示loading archetype list
Maven's JRE is running out of memory. Under Build > Build Tools > Maven > Importing, set &q ...
- C++对文件进行加密解密
1. 起因: 需要对游戏资源进行加密 2. 解决方案: 通过网络查询,xxtea是一款轻量级的加密工具,使用简单方便 3. 加密解密 xxtea只有两个函数,加密:xxtea_encrypt 解密:x ...
- Singleton ——运行时全局唯一对象
Singleton 运行时全局唯一对象 Singleton模式只解决一个问题,如何做到运行时创建一个全局唯一的对象? 1:隐藏类的实例化操作,即将构造函数声明为private或protected.任何 ...
- 在win7/8/10鼠标右键添加按下SHIFT键时弹出的“在此处打开命令窗口”
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Drive\shell\cmd]@="@shell32.dll,-8506&q ...
- [转]SSL协议详解
背景介绍 最近在看<密码学与网络安全>相关的书籍,这篇文章主要详细介绍一下著名的网络安全协议SSL. 在开始SSl介绍之前,先给大家介绍几个密码学的概念和相关的知识. 1.密 ...