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. BZOJ 1434: [ZJOI2009]染色游戏

    一开始想这不$SG$裸题...然后发现100组数据...然后发现连通块是任意的求$SG$貌似要暴力枚举.... 然后想了一下1维,手动打表,每次就是队当前所有异或后缀和求$mex$,好像就是$lowb ...

  2. 微信小程序中不同页面间的参数传递

    从样式页面WXML向逻辑页面JS传递点击事件的响应函数中传递参数 <!--此为样式页面--> <block wx:for="{{postList}}" wx:fo ...

  3. Ubuntu16.04+Apache虚拟主机配置详解

    在window下,Apache的配置文件是httpd.conf,但在Linux下安装了Apache后发现其配置并不像window下那么简单,Linux下Apache将各个设置项分在了不同的配置文件中, ...

  4. 【转】APACHE RewriteEngine用途

    首先要学会怎么设置 httpd.conf 的设置, 什么 ALL 就不用用说了 要看你的 httpd.conf 是否设置正确了,很简单,只要你在 .htaccess  里随便录入一些 比如 adbas ...

  5. MathJax使用指南

    MathJax使用指南 SublimePrettyJson Github CSDN-Markdown语法集锦 LaTex 简明教程 在Markdown中输入数学公式(MathJax) MathJax ...

  6. 微信小程序AES加密解密

    微信小程序  其实在调用一些第三方 js的时候 其实没有大家想的那么复杂,无非就是把原生js调用方式   改为微信小程序 js调用方式 废话不多说直接贴代码 其实就是将原生function 或者 对象 ...

  7. 机器学习之Adaboost (自适应增强)算法

    注:本篇博文是根据其他优秀博文编写的,我只是对其改变了知识的排序,另外代码是<机器学习实战>中的.转载请标明出处及参考资料. 1 Adaboost 算法实现过程 1.1 什么是 Adabo ...

  8. iOS中的定时器

    据我所知,iOS中的定时器有两种.一个叫NSTimer,一个叫CADisplayLink.还有一种是使用GCD,不常用,这里就不介绍了. 下边说下两个定时器分别得用法: =============== ...

  9. Java--JDBC连接与Django--DATABASES设置

    JDBC 简介 JDBC(Java Data Base Connectivity,java 数据库连接)是一种用于执行 SQL 语句的 JavaAPI,可以为多种关系 数据库提供统一访问,它由一组用 ...

  10. [Code] 递归函数在函数式 Java 中的实现

    这里以阶乘函数为例,对于阶乘函数 fact :: Integer -> Integer fact 0 = 1 fact n = n * fact (n - 1) 在函数式 Java 中可以使用 ...