1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
查看安装软件
[root@lufengcentos ~]# rpm -qa nfs-utils rpcbind
[root@lufengcentos ~]# yum install nfs-utils rpcbind -y
[root@lufengcentos ~]# rpm -qa nfs-utils rpcbind       
rpcbind-0.2.0-12.el6.x86_64
nfs-utils-1.2.3-70.el6_8.2.x86_64
 
 
启动相关服务
[root@lufengcentos ~]# LANG=en
[root@lufengcentos ~]# /etc/init.d/rpcbind status   
rpcbind is stopped
[root@lufengcentos ~]# /etc/init.d/rpcbind start
Starting rpcbind:
[root@lufengcentos ~]# /etc/init.d/rpcbind status
rpcbind (pid  1225) is running...
 
[root@lufengcentos ~]# lsof -i :111
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
rpcbind 1225  rpc    6u  IPv4  11011      0t0  UDP *:sunrpc 
rpcbind 1225  rpc    8u  IPv4  11014      0t0  TCP *:sunrpc (LISTEN)
rpcbind 1225  rpc    9u  IPv6  11016      0t0  UDP *:sunrpc 
rpcbind 1225  rpc   11u  IPv6  11019      0t0  TCP *:sunrpc (LISTEN)
[root@lufengcentos ~]# netstat -lntup|grep rpcbind
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1225/rpcbind        
tcp        0      0 :::111                      :::*                        LISTEN      1225/rpcbind        
udp        0      0 0.0.0.0:976                 0.0.0.0:*                               1225/rpcbind        
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1225/rpcbind        
udp        0      0 :::976                      :::*                                    1225/rpcbind        
udp        0      0 :::111                      :::*                                    1225/rpcbind
[root@lufengcentos ~]# 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@lufengcentos ~]# /etc/init.d/nfs status
rpc.svcgssd 已停
[root@lufengcentos ~]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
正在启动 RPC idmapd:                                      [确定]
[root@lufengcentos ~]# /etc/init.d/nfs status
rpc.svcgssd 已停
rpc.mountd (pid 1318) is running...
nfsd (pid 1334 1333 1332 1331 1330 1329 1328 1327) is running...
rpc.rquotad (pid 1313) is running...
 
 
设置自启动
[root@lufengcentos ~]# chkconfig nfs on
[root@lufengcentos ~]# chkconfig --list rpcbind
rpcbind         0:off   1:off   2:on    3:on    4:on    5:on    6:off
 
[root@nfs-server ~]# tail -3 /etc/rc.local
touch /var/lock/subsys/local
/etc/init.d/rpcbind start
/etc/init.d/nfs start
 
 
服务器配置及挂载
[root@lufengcentos ~]# vi /etc/exports   
"/etc/exports" 1L, 28C written
[root@lufengcentos ~]# cat /etc/exports      
/data 192.1.1.0/24(rw,sync,all_squash)
 
[root@lufengcentos ~]# showmount -e 127.0.0.1
Export list for 127.0.0.1:
/data 192.1.1.0/24
 
[root@lufengcentos ~]# mount -t nfs 192.1.1.8:/data /mnt
[root@lufengcentos ~]# df -h
Filesystem       Size  Used Avail Use% Mounted on
/dev/sda3        7.1G  1.5G  5.3G  22% /
tmpfs            491M     0  491M   0% /dev/shm
/dev/sda1        190M   27M  153M  15% /boot
192.1.1.8:/data  7.1G  1.5G  5.3G  22% /mnt
 
[root@lufengcentos ~]# grep 65534 /etc/passwd
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
[root@lufengcentos ~]# chown -R nfsnobody /data
   
内核优化
cat >>/etc/sysctl.conf<<EOF
net.core.rmmem_default=8388608
net.core.wmmem_default=8388608
net.core.rmmem_max=16777216
net.core.wmmem_max=16777216
EOF
 
挂载优化:
mount -t nfs -o nosuid,noexec,nodev,noatime,nodiratime,rsize=131072,wsize=131072 192.1.1.8:/data/ /mnt

本文出自 “大梦初醒” 博客,请务必保留此出处http://bestlufeng.blog.51cto.com/11790256/1906860

NFS安装及优化过程--centos6.6的更多相关文章

  1. Linux系统CentOS6.2版本下安装JDK7详细过程

    Linux系统CentOS6.2版本下安装JDK7详细过程 分类: Linux 2014-08-25 09:17 1933人阅读 评论(0) 收藏 举报 前言:        java 是一种可以撰写 ...

  2. Centos6.9 安装zabbix3.4 过程

    Centos6.9 安装zabbix3.4 过程 1.安装apache httpd 一开始忘记截图(略...) # yun install httpd 完成后,启动httpd服务 # service ...

  3. 【Oracle 集群】11G RAC 知识图文详细教程之RAC在LINUX上使用NFS安装前准备(六)

    RAC在LINUX上使用NFS安装前准备(六) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇 ...

  4. (原创)LAMP教程4-用VirtualBox安装64位的centos6.4

    (原创)LAMP教程4-用VirtualBox安装64位的centos6.4 好的,今天就要开始正式的讲一些有营养的东西了,是的,没有错就是讲如何用VirtualBox安装64位的centos6.4 ...

  5. VMware workstation12 pro安装Ubuntu14.04LTS过程笔记

    由于近期需要加强自己在Linux/C++编程方面的需要,把原来的CentOS6.5格了....在windows8.1系统上重新安装了VMware和Ubuntu... VMware安装Ubuntu的过程 ...

  6. CentOS 6.3下NFS安装配置

    CentOS 6.3下NFS安装配置 一.环境介绍   NFS服务器:CentOS6.3 192.168.8.20 NFS客户端:CentOS6.5 192.168.8.39 二.服务器端安装配置   ...

  7. NFS生产场景优化

    1.硬件上多块网卡bond,增加吞吐量,至少千兆.sas/ssd磁盘组raid5或raid10 2.服务端配置:/data 172.16.1.0/24(rw,sync,all_squash,anonu ...

  8. 转载:【Oracle 集群】RAC知识图文详细教程(六)--RAC在LINUX上使用NFS安装前准备

    文章导航 集群概念介绍(一) ORACLE集群概念和原理(二) RAC 工作原理和相关组件(三) 缓存融合技术(四) RAC 特殊问题和实战经验(五) ORACLE 11 G版本2 RAC在LINUX ...

  9. mac air上archlinux的安装及优化

    前言 最近总感觉跑了两年多ubuntu系统的MacBookAir6,2越来越不行了,内存总是亮红灯,软件效率也低了不少.最直接的解决方法当然是换电脑,购买一台配置更好的,比如2017款xps,不过在我 ...

随机推荐

  1. C++ 学习路线和看法

    C++ 学习路线和看法 原文地址:http://shundacao.blog.163.com/blog/static/1340404812010101982751101/     C++大体分为C++ ...

  2. NLP资源

    http://www.cs.columbia.edu/~mcollins/notes-spring2013.html http://web.stanford.edu/class/cs224n/syll ...

  3. capwap学习笔记——初识capwap(四)

    2.5.7 CAPWAP传输机制 WTP和AC之间使用标准的UDP客户端/服务器模式来建立通讯. CAPWAP协议支持UDP和UDP-Lite [RFC3828]. ¢ 在IPv4上,CAPWAP控制 ...

  4. unity中使用自定义shader进行光照贴图烘培无法出现透明度的坑爹问题

    最近开发中在对场景进行光照贴图烘焙时发现一个坑爹问题,在使用自定义shader的时候,shader命名中必须包含Transparent路径,否则烘焙的时候不对alpha通道进行计算,烘焙出来都是狗皮膏 ...

  5. 未能加载文件或程序集“Microsoft.SqlServer.Sqm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”或它的某一个依赖项。系统找不到指定的文件。 (SqlMgmt)

    解决方法: Copy this file "Microsoft.SqlServer.Sqm.dll" in the forder "C:/Program Files/Mi ...

  6. 【转】ionic2 返回按钮

    首先可以在 app.module.ts 文件中配置. @NgModule 中的 imports 属性的 IonicModule.forRoot 第二个参数,如下: IonicModule.forRoo ...

  7. 【视频教学】如何利用高德地图IOS SDK进行开发?

    Step1:使用IOS SDK可以做什么高德地图 iOS SDK 是一套基于 iOS 5.1.1 及以上版本的地图应用程序开发接口.通过该接口,用户可使用高德地图数据和服务轻松构建功能丰富.交互性强的 ...

  8. IE6.0 PNG背景透明图片插件

    <!--[if lte IE 6]><script src="http://xian.qq.com/js/2013js/2013index/DD_belatedPNG_0. ...

  9. WCF服务引用之后自动生成的泛型代理类名称太长的解决方案

    问题:WCF服务引用之后会将原来的泛型类自动生成一个代理类,但是有时候名称太长怎么办? 解决方案: 1.方案一: 调用客户端同样也引用这个泛型类的类库. 2.方案二: 找到这个泛型类,然后在上面的[D ...

  10. hibernate调用mysql存储过程

    在mysql中创建两个存储过程,如下: 1.根据id查找某条数据: )) begin select * from emp where empId=id; end; 2.根据id查找某个字段,并返回 ) ...