nfs

[root@flymaster ~]# rpm -qa nfs-utils rpcbind
nfs-utils-1.2.3-75.el6.x86_64
rpcbind-0.2.0-13.el6_9.1.x86_64
[root@flymaster ~]#
[root@flymaster ~]# /etc/init.d/rpcbind status
rpcbind 已停
[root@flymaster ~]# /etc/init.d/rpcbind start
Starting rpcbind: [ OK ]
[root@flymaster ~]# /etc/init.d/rpcbind status
rpcbind (pid 1632) is running...
[root@flymaster ~]# lsof -i :111
-bash: lsof: command not found
[root@flymaster ~]# yum install -y lsof
[root@flymaster ~]# lsof -i :111
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rpcbind 1632 rpc 6u IPv4 13600 0t0 UDP *:sunrpc
rpcbind 1632 rpc 8u IPv4 13603 0t0 TCP *:sunrpc (LISTEN)
rpcbind 1632 rpc 9u IPv6 13605 0t0 UDP *:sunrpc
rpcbind 1632 rpc 11u IPv6 13608 0t0 TCP *:sunrpc (LISTEN)
[root@flymaster ~]# netstat -lnup|grep rpcbind
udp 0 0 0.0.0.0:959 0.0.0.0:* 1632/rpcbind
udp 0 0 0.0.0.0:111 0.0.0.0:* 1632/rpcbind
udp 0 0 :::959 :::* 1632/rpcbind
udp 0 0 :::111 :::* 1632/rpcbind
[root@flymaster ~]# chkconfig --list rpcbind
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@flymaster ~]#
[root@flymaster ~]# rpcinfo -p localhost
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
[root@flymaster ~]# /etc/init.d/nfs status
rpc.svcgssd 已停
rpc.mountd is stopped
nfsd is stopped
[root@flymaster ~]# /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
正在启动 RPC idmapd: [确定]
[root@flymaster ~]# netstat -lntup|grep 2049
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 :::2049 :::* LISTEN -
udp 0 0 0.0.0.0:2049 0.0.0.0:* -
udp 0 0 :::2049 :::*
[root@flymaster ~]# rpcinfo -p localhost
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100005 1 udp 32888 mountd
100005 1 tcp 34816 mountd
100005 2 udp 60305 mountd
100005 2 tcp 53106 mountd
100005 3 udp 60915 mountd
100005 3 tcp 43298 mountd
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100021 1 udp 50673 nlockmgr
100021 3 udp 50673 nlockmgr
100021 4 udp 50673 nlockmgr
100021 1 tcp 60233 nlockmgr
100021 3 tcp 60233 nlockmgr
100021 4 tcp 60233 nlockmgr
[root@flymaster ~]# less /etc/init.d/nfs
#!/bin/sh
#
# nfs This shell script takes care of starting and stopping
# the NFS services.
#
# chkconfig: - 30 60
# description: NFS is a popular protocol for file sharing across networks.
# This service provides NFS server functionality, which is \
# configured via the /etc/exports file.
# probe: true
# config: /etc/sysconfig/nfs

### BEGIN INIT INFO
# Provides: nfs
# Required-Start: $local_fs $network $syslog $rpcbind
# Required-Stop: $local_fs $network $syslog $rpcbind
# Default-Stop: 0 1 6
# Short-Description: Start up the NFS server sevice
# Description: NFS is a popular protocol for file sharing across networks \
# This service provides NFS server functionality, \
# which is configured via the /etc/exports file.
### END INIT INFO
[root@flymaster ~]# ps -ef|egrep "rpc|nfs"
root 1734 2 0 15:23 ? 00:00:00 [rpciod/0]
root 1943 1 0 15:27 ? 00:00:00 rpc.mountd
root 1950 2 0 15:27 ? 00:00:00 [nfsd4]
root 1951 2 0 15:27 ? 00:00:00 [nfsd4_callbacks]
root 1952 2 0 15:27 ? 00:00:00 [nfsd]
root 1953 2 0 15:27 ? 00:00:00 [nfsd]
root 1954 2 0 15:27 ? 00:00:00 [nfsd]
root 1955 2 0 15:27 ? 00:00:00 [nfsd]
root 1956 2 0 15:27 ? 00:00:00 [nfsd]
root 1957 2 0 15:27 ? 00:00:00 [nfsd]
root 1958 2 0 15:27 ? 00:00:00 [nfsd]
root 1959 2 0 15:27 ? 00:00:00 [nfsd]
root 1986 1 0 15:27 ? 00:00:00 rpc.idmapd
rpc 2077 1 0 15:32 ? 00:00:00 rpcbind
root 2132 1445 0 15:55 pts/0 00:00:00 egrep rpc|nfs
[root@flymaster ~]# ls -l /etc/exports (nfs配置文件)
-rw-r--r--. 1 root root 0 Jan 12 2010 /etc/exports
echo "/data 192.168.1.*(insecure,rw,sync,no_root_squash)" >/etc/exports
[root@nfs-server101 ~]# mkdir /data
[root@nfs-server101 ~]# /etc/init.d/nfs reload(平滑生效)
[root@nfs-server101 ~]# exportfs -rv
exporting 192.168.1.*:/data
[root@nfs-server101 ~]# showmount -e 127.0.0.1
Export list for 127.0.0.1:
/data 192.168.1.*
[root@nfs-server101 ~]# mount -t nfs 192.168.70.101:/data /mnt
[root@nfs-server101 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_flymaster-lv_root
18G 977M 16G 6% /
tmpfs 495M 0 495M 0% /dev/shm
/dev/sda1 477M 28M 425M 6% /boot
192.168.70.101:/data 18G 977M 16G 6% /mnt
[root@nfs-server101 ~]# touch /data/fly.txt
[root@nfs-server101 ~]# cd /mnt/
[root@nfs-server101 mnt]# ls
fly.txt
Export list for 192.168.70.101:
/data 192.168.70.*
[root@lamp102 /]# mount -t nfs 192.168.70.101:/data /mnt
[root@lamp102 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_flymaster-lv_root
18G 976M 16G 6% /
tmpfs 495M 0 495M 0% /dev/shm
/dev/sda1 477M 28M 425M 6% /boot
192.168.70.101:/data 18G 977M 16G 6% /mnt
[root@lamp102 mnt]# grep 65534 /etc/passwd
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
[root@lamp102 mnt]#

【NFS】nfs安装调优的更多相关文章

  1. 在Oracle数据库中使用NFS,怎样调优?

    MOS上有好多文章,基本上都跑不了以下三点: Setup can make a big difference 1. Network topology and load 2. NFS mount opt ...

  2. NATS_07:NATS之top工具监控以及测量调优工具

    概述 你可以使用 nats-top 来实现类似于 linux 中 top 命令的实时监控 nats 服务: 可以使用 nats 提供的工具来进行针对性的调优. 安装nats-top $ go get ...

  3. 开源服务专题之------sshd服务安装管理及配置文件理解和安全调优

    本专题我将讨论一下开源服务,随着开源社区的日趋丰富,开源软件.开源服务,已经成为人类的一种公共资源,发展势头可谓一日千里,所以不可不知.SSHD服务,在我们的linux服务器上经常用到,很重要,涉及到 ...

  4. CentOS 6.3 NFS的安装配置、启动及mount挂载方法

    一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置: centos 5 : yum -y install ...

  5. Nginx源码安装及调优配置

    导读 由于Nginx本身的一些优点,轻量,开源,易用,越来越多的公司使用nginx作为自己公司的web应用服务器,本文详细介绍nginx源码安装的同时并对nginx进行优化配置. Nginx编译前的优 ...

  6. Linux下安装、配置、授权、调优Mysql

    以前在linux已经安装了很多次的Mysql,但是时间间隔长了以后,安装步骤总是会遗漏,趁这次安装,做一下安装记录. 检查系统是否已经安装Mysql rpm -qa|grep -i mysql Mys ...

  7. CentOS NFS的安装配置、启动及mount挂载方法

    一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置:centos 5 : yum -y install n ...

  8. CentOS5、6 NFS的安装配置及mount方法

    一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置:centos 5 : yum -y install n ...

  9. Centos6.4 NFS的安装与配置

    NFS,是Network File System的简写,即网络文件系统.网络文件系统是FreeBSD支持的文件系统中的一种,也被称为NFS. NFS允许一个系统在网络上与他人共享目录和文件.通过使用N ...

随机推荐

  1. Codewars练习

    记录一下比较聪明的codewars练习题解决方案,不得转载. 2017/12/19 You will be given a string and you task is to check if it ...

  2. Android 进程间通信

    什么鬼!单例居然失效了,一个地方设置值,另个地方居然取不到,这怎么可能?没道理啊!排查半天,发现这两就不在一个进程里,才恍然大悟-- 什么是进程 按照操作系统中的描述:进程一般指一个执行单元,在 PC ...

  3. mac下更新自带的PHP版本到5.6

    OS X 10.11自带的PHP版本是PHP 5.5.x,如果我们想更新PHP的版本到5.6或者是7.0该怎么办呢? 下载和安装PHP 5.6 打开终端并且运行如下命令: curl -s http:/ ...

  4. 解决CXF的java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-soap.xml] cannot be opened because it does not exist

    以下是错误信息 九月 25, 2017 8:22:04 下午 org.springframework.web.context.support.XmlWebApplicationContext prep ...

  5. Python自动化--语言基础8--接口请求及封装

    基于http协议,最常用的是GET和POST两种方法. 接口文档需要包含哪些信息: 接口名称接口功能接口地址支持格式 json/xml请求方式请求示例请求参数(是否必填.数据类型.传递参数格式)返回参 ...

  6. 微信小程序初识

    http://lib.csdn.net/article/wechat/46742 微信小程序的前途和定位有什么疑惑?点进去 简单先记几个印象名词:流量入口,线下是重点,“即用即走”适合低频工具类产品. ...

  7. solr6.6教程-从mysql数据库中导入数据(三)

    整理多半天的solr6.6,终于算是把solr6.6中配置数据库弄出来了,网上的文章千篇一律,各说个的,没有一篇统一覆盖solr6.6版本配置的 帖子,本章节我会把配置的一些注意事项一一列举,由于时间 ...

  8. java中try catch块的使用

    对于关流操作的时候,最好采用如下语句块: InputStream in=......; try{ try{ //some statemenet }finally{ //close stream in. ...

  9. .NET中的按需加载/延迟加载 Lazy<T>

    业务场景: 在项目开发中,经常会遇到特定的对象使用的加载问题,有的实例对象我们创建之后并非需要使用,只是根据业务场景来调用,所以可能会导致很多无效的实例加载 延迟初始化出现于.NET 4.0,主要用于 ...

  10. thinkpad E480 用户初体验

    梦寐以求的E480终于到手了,经过几天使用之后,也该写一下用户体验了,也算是对这些天的调研的一个总结吧. 首先是外形,从外形上来看E480的外形的确是相对以前的塑料外壳,改进了不少,全金属的机身,磨砂 ...