原文地址:http://380531251.blog.51cto.com/7297595/1659865

1.课程目标

  • 了解什么是NFS及其功能;

  • 掌握NFS的配置;

  • 掌握NFS的验证;

  • 能够单独熟练、灵活运用NFS。

2.NFS概述

NFS(Network Files System),网络文件系统是1980年由SUN发展出来在UNIX&Linux系统间实现磁盘文件共享的一种方法。它是一种文件系统协议:支持应用程序在客户端通过网络存取位于服务器磁盘中的数据。NFS的基本原则是让不同的客户端及服务器通过一组RPCs共享相同的文件系统,它独立于操作系统,允许不同硬件及操作系统的系统共同进行文件的共享。

虽然NFS可以在网络中进行文件共享,但NFS在设计时并没有提供数据传输的功能。需要借助RPC(Remote Procedure Calls,远程过程调用)。RPC定义了一种进程间通过网络进行交互通信的机制,它允许客户端进程通过网络向远程服务进程请求服务,而不需要了解服务器底层的通信协议详细信息。

当一个RPC连接建立开始阶段,客户端建立过程调用,将调用参数发送到远程服务器进程,并等待相应。请求到达时,服务器通过客户端请求的服务,调用指定的程序。并将结果返回客户端。当RPC调用结束,客户端程序将继续进行下一步的通信操作。

NFS依赖RPC与外部通信,为保证NFS服务正常工作,其需要在RPC注册相应的服务端口信息,这样客户端向服务器的RPC提交访问某个服务的请求时,服务器才能够正确作出相应。

注册NFS服务时,需要先开启RPC,才能保证NFS注册成功。并且如果RPC服务重新启动,其保存的信息将丢失,需重新启动NFS服务以注册端口信息,否则客户端将无法访问NFS服务器。

3.NFS主配置文件介绍

NFS的主配置文件路径为:/etc/exports。默认为空,需要手动添加配置参数。

主配置文件书写格式:

共享目录     [客户端(参数)]

说明:

  • 共享目录:域共享目录的实际路径(要使用绝对路径);

  • 客户端:定义客户端匹配时可以使用FQDN、IP地址、网段、DNS区域。客户端匹配条件表示方法如下:

NFS客户端匹配

客户端指定方法

示例

满足示例的客户端

IP指定单一主机

客户端IP地址为(192.168.1.1)

指定网段

客户端所在网段为192.168.1.0/24

域名单一主机

Nfs.example.com

客户端FQDN为nfs.example.com

域名指定范围

*.example.com

客户端FQDN的DNS后缀为example.com

所有主机

*

任何访问NFS服务器的客户端

  • 参数:对满足客户端匹配条件的客户端进行相关配置。可用参数如下(其中匿名用户指的是nfsnobody):

NFS参数

参数

说明

ro

设置共享为只读,缺省选项

rw

设置共享为读写

root_squash

当源计算机(NFS客户端)当前用户是root时,将被映射为目标计算机(NFS服务器)的匿名用户

no_root_squash

当源计算机(NFS客户端)当前用户是root时,将被映射为目标计算机(NFS服务器)的root用户

all_squash

将所有用户映射为目标计算机(NFS服务器)的匿名用户,NFS缺省选项

anonuid

设置匿名用户的UID

anongid

设置匿名用户的GID

sync

保持数据同步,同时将数据写入内存和硬盘,缺省选项

async

先将数据保存在内存,然后写入硬盘,效率更高,但可能造成数据丢失

secure

NFS客户端必须使用NFS保留端口(1024以下的端口),缺省选项

insecure

允许NFS客户端不使用保留端口(1024以下的端口)

wdelay

如果NFS服务器怀疑有另一个相关的写请求正在处理或马上就要达到,NFS服务器将延迟提交写请求到磁盘,这就允许使用一个操作提交多个写请求到磁盘,可以改善性能,缺省选项

nowdelay

设置了async时该选项无效,NFS服务器将每次写操作写入磁盘

4.NFS服务配置

Redhat Linux中,NFS默认是已经安装的,所以在实验中,只需启动服务即可,不用再安装NFS服务。

4.1.服务的启动

查看服务状态

[root@server30 ~]# systemctl status nfs-service.service

nfs-server.service - NFS Server

Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled)

Active: inactive (dead)

缺省没有启动,所以要先启动服务。

[root@server30 ~]# systemctl enable nfs-server.service

//开启下次系统重启自动加载

ln -s '/usr/lib/systemd/system/nfs-server.service' '/etc/systemd/system/nfs.target.wants/nfs-server.service'

[root@server30 ~]# systemctl  restart  nfs-server.service

[root@server30 ~]# systemctl status nfs

nfs-server.service - NFS Server

Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled)

Active: 的权限

[root@server30 ~]# chmod  777 /public

[root@server30 ~]# ls -ld /public

drwxrwxrwx. 2 root root 23 May 18 14:12 /public

接下来客户端挂载验证

[root@desktop30 ~]# mount -t nfs 172.16.30.130:/public /public/

[root@desktop30 ~]# df

Filesystem            1K-blocks    Used Available Use% Mounted on

/dev/mapper/rhel-root   5109760 3021512   2088248  60% /

devtmpfs                 496096       0    496096   0% /dev

tmpfs                    505404      80    505324   1% /dev/shm

tmpfs                    505404    7168    498236   2% /run

tmpfs                    505404       0    505404   0% /sys/fs/cgroup

/dev/sda1                201388  106036     95352  53% /boot

172.16.30.130:/public   5109760 3021824   2087936  60% /public

[root@desktop30 ~]# cd /public/

[root@desktop30 public]# ls

freeit.txt

[root@desktop30 public]# touch gyh.txt

[root@desktop30 public]# ls

freeit.txt  gyh.txt

//创建成功,此时具有写权限。

4.4.用户访问权限

同为文件共享服务,NFS对访问用户的控制没有Samba的功能强大,但是基本也可满足日常工作对NFS的需要。NFS中,与访问用户的控制相关的参数主要有:root_squash、no_root_squash、all_squash、anonuid、anongid。下面看几个例子(本部分实验仍然用上部分的实验环境):

例1:查看客户端登录时服务器缺省映射为那个用户

[root@desktop30 public]# ll

total 0

-rw-r--r--. 1 root      root      0 May 18 14:12 freeit.txt

-rw-r--r--. 1 nfsnobody nfsnobody 0 May 18 16:12 gyh.txt

如上:【可写共享目录】实验中创建的文件gyh.txt默认的用户和组为nfsnobody。此为缺省参数all_squash的作用,也就是说,不管客户端以什么身份登录到自己的系统,缺省都映射为nfsnobody。

例2:no_root_squash参数:客户端以本地root身份登录服务器时,也拥有root用户权限

[root@server30 ~]# vim /etc/exports

/public         172.16.30.30/24(rw,no_root_squash,sync)

~

[root@server30 ~]# systemctl restart nfs-server.service

如上,客户端以本地root用户登录时,服务器在此参数的作用下把其映射为服务器端的root用户。

例3:anonuid&anongid参数:不论客户端以什么身份登录,缺省都映射为指定用户的UID和指定组的GID。

-------------------------------------------------服务器端设置----------------------------------------------

[root@server30 ~]# id user1

uid=1001(user1) gid=1001(user1) groups=1001(user1)

[root@server30 ~]# vim /etc/exports

/public         172.16.30.30/24(rw,anonuid=1001,anongid=1001,sync)

[root@server30 ~]# systemctl restart nfs-server.service

-------------------------------------------------客户端验证------------------------------------------------

[root@desktop30 public]# touch 456.txt

[root@desktop30 public]# ll

total 0

-rw-r--r--. 1 root      root      0 May 18 17:08 123.txt

-rw-r--r--. 1      1001      1001 0 May 18 17:17 456.txt

-rw-r--r--. 1 root      root      0 May 18 14:12 freeit.txt

-rw-r--r--. 1 nfsnobody nfsnobody 0 May 18 16:12 gyh.txt

4.5.NFS的kerberos验证

本部分以题目的形式来实验。

题目:

  • 第一部分:主要为server端配置

  • 在Server30上配置NFS,以读写的方式共享/protected,能被example.com内用户访问;

  • 访问/protected需要通过kerberos安全加密,可以使用此链接密钥:http://ldap.example.com/pub/server30.keytea;

  • 目录/protected应该包含名为project拥有人为guest2001的子目录且用户guest2001能以读写方式访问/protected/project;

  • 第二部分:主要为客户端配置

  • 在desktop30上挂载来自于server30的nfs共享,/protected挂载在目录/mnt/nfssecure,并使用安全的方式,密钥链接为:http://ldap.example.com/pub/desktop30.keytab;

  • 挂载为启动时自动挂载;

  • 用户guest2001能在/mnt/nfssecure/project上创建文件。

第一部分:server端的配置

主配置文件添加共享资源

[root@server30 ~]# vim /etc/exports

/public         172.16.30.30/24(rw,anonuid=1001,anongid=1001)

/protected      172.16.30.0/24(rw,sec=krb5p)

~

[root@server30 ~]# mkdir /protected

//创建共享目录

配置kerberos验证,需要添加服务器到ldap域中,使用kerberos服务器验证。kerberos验证也需要安装几个工具,然后做添加到LDAP的操作。如下:

[root@server30 ~]# yum -y install authconfig* sssd* krb5*

Loaded plugins: langpacks, product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

base                                                     | 4.1 kB     00:00

(1/2): base/group_gz                                       | 134 kB   00:00

(2/2): base/primary_db                                     | 3.4 MB   00:00

Package authconfig-6.2.8-8.el7.x86_64 already installed and latest version

Package sssd-client-1.11.2-65.el7.x86_64 already installed and latest version

Package krb5-libs-1.11.3-49.el7.x86_64 already installed and latest version

Resolving Dependencies

[root@server30 ~]# authconfig-gtk

//此命令打开验证配置界面,如下:

①选择[identity*authentication],进行身份验证配置

②选择【ldap】,加入到ldap域进行验证

③填写ldap的DN,

④填写ldap的路径,要以ldap开头,//后面为ldap服务器的主机名

⑤此处要勾选

⑥点击此处,弹出如下界面,填写证书的密钥链接,下载证书

①填写链接:http://ldap.example.com/pub/EXAMPLE-CA.crt

②点击【ok】完成证书链设置

①根据题目要求,这里要选择kerberos验证方式

②填写认证服务的kerberos Realm(域)

③此处的勾选要去掉,否则不能进行下一步操作

④填写认证服务的kerberos KDC

⑤填写认证服务的kerberos Admin Server

⑥点击【Apply】完成认证配置

NFS的版本有许多,Redhat Linux7中的NFS使用版本为4.2,kerberos验证为其特有的验证方式,所以要指明NFS版本,在/etc/sysconfig/nfs配置文件中添加:

[root@server30 ~]# vim /etc/sysconfig/nfs

1 #

2 # Optinal options passed to rquotad

3 RPCRQUOTADOPTS=""

4 #

5 # Optional arguments passed to in-kernel lockd

6 #LOCKDARG=

7 # TCP port rpc.lockd should listen on.

8 #LOCKD_TCPPORT=32803

9 # UDP port rpc.lockd should listen on.

10 #LOCKD_UDPPORT=32769

11 #

12 # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)

13 RPCNFSDARGS="-V 4.2"

14 # Number of nfs server processes to be started.

15 # The default is 8.

16 RPCNFSDCOUNT=8

17 # Set V4 grace period in seconds

18 #NFSD_V4_GRACE=90

19 #

20 # Optional arguments passed to rpc.mountd. See rpc.mountd(8)

21 RPCMOUNTDOPTS=""

22 #

23 # Optional arguments passed to rpc.statd. See rpc.statd(8)

24 STATDARG=""

25 #

26 # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)

27 RPCIDMAPDARGS=""

28 #

29 # Optional arguments passed to rpc.gssd. See rpc.gssd(8)

30 RPCGSSDARGS=""

31 # Enable usage of gssproxy. See gssproxy-mech(8).

32 GSS_USE_PROXY="no"

33 #

34 # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)

35 RPCSVCGSSDARGS=""

36 #

37 # Optional arguments passed to blkmapd. See blkmapd(8)

38 BLKMAPDARGS=""

如上:只需在第13行添加-V 4.2即可。

Kerberos验证,需要服务器和客户端的时间上不能有太大的差距,所以,为了保证时间准确,还要指定NTP服务器,如下:

[root@server30 ~]# vim /etc/chrony.conf

1 # Use public servers from the pool.ntp.org project.

2 # Please consider joining the pool (http://www.pool.ntp.org/join.html).

3 #server 0.rhel.pool.ntp.org iburst

4 #server 1.rhel.pool.ntp.org iburst

5 #server 2.rhel.pool.ntp.org iburst

6 #server 3.rhel.pool.ntp.org iburst

7 server ldap.example.com iburst

……

 

[root@server30 ~]# systemctl restart chronyd.service

如上,将原有的第4、5、6行注释掉,然后添加第7行内容,指定NTP服务器。最后不要忘记重启chronyd.service服务。

下载用于kerberos验证的密钥

[root@server30 ~]# wget -O /etc/krb5.keytab http://ldap.example.com/pub/server30.keytab

--2015-05-18 18:31:57--  http://ldap.example.com/pub/server30.keytab

Resolving ldap.example.com (ldap.example.com)... 172.16.30.254

Connecting to ldap.example.com (ldap.example.com)|172.16.30.254|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 3026 (3.0K)

Saving to: ‘/etc/krb5.keytab’

100%[======================================>] 3,026       --.-K/s   in 0s

2015-05-18 18:31:57 (230 MB/s) - ‘/etc/krb5.keytab’ saved [3026/3026]

[root@server30 ~]# ls /etc/krb5.keytab

/etc/krb5.keytab

根据题目要求,在共享资源下创建project目录,并设置guest2001为其拥有者

[root@server30 ~]# mkdir /protected/project

[root@server30 ~]# id guest2001

uid=2001(guest2001) gid=2001(guest2001) groups=2001(guest2001)

[root@server30 ~]# chown guest2001 /protected/project/

[root@server30 ~]# ll /protected/

total 0

drwxr-xr-x. 2 guest2001 root 6 May 18 18:34 project

注:guest2001是加入ldap域后获取的用户,默认本地没有。

最后,对于服务的重启,不仅要重启nfs服务,同时也要重启nfs的另外两个用于安全验证的服务,如下:

[root@server30 ~]# systemctl enable  nfs-server.service nfs-secure-server.service  nfs-secure.service

ln -s '/usr/lib/systemd/system/nfs-secure-server.service' '/etc/systemd/system/nfs.target.wants/nfs-secure-server.service'

ln -s '/usr/lib/systemd/system/nfs-secure.service' '/etc/systemd/system/nfs.target.wants/nfs-secure.service'

[root@server30 ~]# systemctl restart  nfs-server.service nfs-secure-server.service  nfs-secure.service

[root@server30 ~]# systemctl status  nfs-server.service nfs-secure-server.service  nfs-secure.service

nfs-server.service - NFS Server

Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled)

Active: active (exited) since Mon 2015-05-18 18:43:23 CST; 14s ago

Process: 5695 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)

Process: 5692 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)

Process: 5705 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT (code=exited, status=0/SUCCESS)

Process: 5703 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)

Process: 5701 ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)

Main PID: 5705 (code=exited, status=0/SUCCESS)

CGroup: /system.slice/nfs-server.service

May 18 18:43:23 server30.example.com systemd[1]: Starting NFS Server...

May 18 18:43:23 server30.example.com systemd[1]: Started NFS Server.

nfs-secure-server.service - Secure NFS Server

Loaded: loaded (/usr/lib/systemd/system/nfs-secure-server.service; enabled)

Active: active (running) since Mon 2015-05-18 18:43:23 CST; 14s ago

Process: 5723 ExecStart=/usr/sbin/rpc.svcgssd $RPCSVCGSSDARGS (code=exited, status=0/SUCCESS)

Main PID: 5725 (rpc.svcgssd)

CGroup: /system.slice/nfs-secure-server.service

└─5725 /usr/sbin/rpc.svcgssd

May 18 18:43:23 server30.example.com systemd[1]: Started Secure NFS Server.

nfs-secure.service - Secure NFS

Loaded: loaded (/usr/lib/systemd/system/nfs-secure.service; enabled)

Active: active (running) since Mon 2015-05-18 18:43:23 CST; 14s ago

Process: 5691 ExecStart=/usr/sbin/rpc.gssd $RPCGSSDARGS (code=exited, status=0/SUCCESS)

Main PID: 5693 (rpc.gssd)

CGroup: /system.slice/nfs-secure.service

└─5693 /usr/sbin/rpc.gssd

第二部分:客户端配置

创建本地挂载目录/mnt/nfssecure

[root@desktop30 ~]# mkdir /mnt/nfssecure

[root@desktop30 ~]# ls /mnt/

nfssecure

要进行安全的挂载,也就是使用kerberos验证,所以,客户端同样也要加入到ldap域中,方式与服务器端一样,需要安装三个工具并打开验证配置界面。此处不再赘述。略过。

然后指定NTP服务器,同步时间

[root@desktop30 ~]# vim /etc/chrony.conf

1 # Use public servers from the pool.ntp.org project.

2 # Please consider joining the pool (http://www.pool.ntp.org/join.html).

3 #server 0.rhel.pool.ntp.org iburst

4 #server 1.rhel.pool.ntp.org iburst

5 #server 2.rhel.pool.ntp.org iburst

6 #server 3.rhel.pool.ntp.org iburst

7 server ldap.example.com iburst

 

[root@desktop30 ~]# systemctl restart chronyd.service

下载密钥

[root@desktop30 ~]# wget -O /etc/krb5.keytab http://ldap.example.com/pub/desktop30.keytab

--2015-05-18 18:50:00--  http://ldap.example.com/pub/desktop30.keytab

Resolving ldap.example.com (ldap.example.com)... 172.16.30.254

Connecting to ldap.example.com (ldap.example.com)|172.16.30.254|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 3026 (3.0K)

Saving to: ‘/etc/krb5.keytab’

100%[======================================>] 3,026       --.-K/s   in 0s

2015-05-18 18:50:01 (263 MB/s) - ‘/etc/krb5.keytab’ saved [3026/3026]

[root@desktop30 ~]# ls /etc/krb5.keytab

/etc/krb5.keytab

同样,客户端也需要启动nfs的安全验证服务

[root@desktop30 ~]# systemctl enable nfs-secure.service nfs-secure-server.service

ln -s '/usr/lib/systemd/system/nfs-secure.service' '/etc/systemd/system/nfs.target.wants/nfs-secure.service'

ln -s '/usr/lib/systemd/system/nfs-secure-server.service' '/etc/systemd/system/nfs.target.wants/nfs-secure-server.service'

[root@desktop30 ~]# systemctl restart nfs-secure.service nfs-secure-server.service

自动挂载配置

[root@desktop30 ~]# vim /etc/fstab

#

# /etc/fstab

# Created by anaconda on Thu May  7 11:59:00 2015

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

/dev/mapper/rhel-root   /                       xfs     defaults        1 1

UUID=bb4bc6a9-f7da-423d-a332-401d21d8d781 /boot                   xfs     defaul

ts        1 2

/dev/mapper/rhel-swap   swap                    swap    defaults        0 0

172.16.30.130:/protected        /mnt/nfssecure  nfs     defaults,v4.2,sec=krb5p

0 0

~

[root@desktop30 ~]# mount -a

mount.nfs: access denied by server while mounting 172.16.30.130:/protected

//挂载失败

为什么挂载失败呢?

因为共享资源那里给的是rw权限,但是共享资源本身目录/protected是没有w权限的,所以还要回服务器为共享资源目录本身添加权限

[root@server30 ~]# ll -d /protected/

drwxr-xr-x. 3 root root 20 May 18 18:34 /protected/

[root@server30 ~]# chmod 777 /protected/

[root@server30 ~]# ll -d /protected/

drwxrwxrwx. 3 root root 20 May 18 18:34 /protected/

客户端再次挂载

[root@desktop30 ~]# mount -a

[root@desktop30 ~]# df

Filesystem               1K-blocks    Used Available Use% Mounted on

/dev/mapper/rhel-root      5109760 3111836   1997924  61% /

devtmpfs                    496096       0    496096   0% /dev

tmpfs                       505404      80    505324   1% /dev/shm

tmpfs                       505404    7172    498232   2% /run

tmpfs                       505404       0    505404   0% /sys/fs/cgroup

/dev/sda1                   201388  106036     95352  53% /boot

172.16.30.130:/protected   5109760 3112064   1997696  61% /mnt/nfssecure

如上:挂载成功。

最后,验证用户guest2001是否能在/mnt/nfssecure/project下创建文件。

查看本地是否有此用户

[root@desktop30 ~]# id guest2001

uid=2001(guest2001) gid=2001(guest2001) groups=2001(guest2001)

因为客户端加入了ldap域,所以获取到LDAP的用户。

连接guest2001用户验证

[root@desktop30 ~]# ssh guest2001@localhost

The authenticity of host 'localhost (::1)' can't be established.

ECDSA key fingerprint is 36:09:b0:56:df:c7:b7:62:5d:66:ea:77:fa:34:64:f0.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.

guest2001@localhost's password:

Could not chdir to home directory /rhome/guest2001: No such file or directory

mkdir: cannot create directory ‘/rhome’: Permission denied

-bash-4.2$ cd /mnt/nfssecure/project/

-bash-4.2$ touch abc

-bash-4.2$ ls

Abc

//创建成功,证明有写权限。

注:

  • 连接guest2001时没有家目录,如果要让其有家目录,要使用autofs挂载此用户家目录到本地;

  • 验证guest2001具有写权限时,不能直接su到此用户,因为这样服务器会在缺省参数all_squash的作用下把其当成nfsnobody用户。

本文出自 “我就是天使” 博客,请务必保留此出处http://380531251.blog.51cto.com/7297595/1659865

[转]RHEL7上配置NFS服务的更多相关文章

  1. [转]Ubuntu下配置NFS服务

    [转]Ubuntu下配置NFS服务  http://blog.163.com/liu8821031%40126/blog/static/111782570200921021253516/ Table ...

  2. CentOS 6.5配置nfs服务

    CentOS 6.5配置nfs服务 网络文件系统(Network File System,NFS),一种使用于分散式文件系统的协议,由升阳公司开发,于1984年向外公布.功能是通过网络让不同的机器.不 ...

  3. 配置NFS服务与tftp服务

    在VMware在安装ubuntu的图解 链接:http://pan.baidu.com/s/1jIofvYu 密码:da72 图解里已经解压安装了VMware Tools,接下来必须要安装的就是NFS ...

  4. 如何在RHEL7上搭建Samba服务实现Windows与Linux之间的文件共享

    如何在RHEL7上搭建Samba服务实现Windows与Linux之间的文件共享 实现环境:VMware workstations.RHEL7.0 第一步:配置网卡IP及yum软件仓库 命令:vim ...

  5. rhce 第十题 配置NFS服务

    配置NFS服务 在system1配置NFS服务,要求如下: 以只读的方式共享目录/public,同时只能被group8.example.com域中的系统访问 以读写的方式共享目录/protected, ...

  6. CentOS7系列--3.1CentOS7中配置NFS服务

    CentOS7配置NFS服务 1. 配置NFS服务器端 1.1. 安装nfs-utils软件 [root@server1 ~]# yum install -y nfs-utils Loaded plu ...

  7. (转)Centos7安装配置NFS服务和挂载

    Centos7安装配置NFS服务和挂载 原文:https://www.u22e.com/601.html NFS简介 NFS(Network File System)即网络文件系统,是FreeBSD支 ...

  8. Linux 笔记 - 第二十一章 配置 NFS 服务

    一.前言 NFS(Network File System,网络文件系统),主要功能是通过网络(一般是局域网)让不同的主机系统之间可以共享文件或目录.NFS 客户端(一般为应用服务器,例如web)可以通 ...

  9. RHEL5.8配置NFS服务

    机器配置:4C+16GB 操作系统:RedHat Enterprise Linux 5.8 NFS基础 NFS(Network File System)是Linux系统之间使用最为广泛的文件共享协议, ...

随机推荐

  1. centOS如何灵活管理服务进程

     1.将程序跑起来,且关闭会话时程序仍在运行. nohup node index.js & (头部加了nohup,表示在你退出帐户或关闭终端之后继续运行相应的进程;尾部的&表示在后台执 ...

  2. SpringCloud(七):springcloud-config统一管理配置中心

    前言: Spring Cloud Config组件是独立的,不需要注册到eureka.config工作原理是把读取目标到配置拉取到本地缓存一份然后供给其他客户端使用,所以一旦config启动成功,可以 ...

  3. 【C#】学习笔记(4) 值类型和引用类型相关(Null相关)

    Reference and Value Types Value Types(值类型): struct(结构体) 独立的实例或者是拷贝 值的改变不会影响其它拷贝 值就是它所代表的信息 没有引用,所以不可 ...

  4. 转战物联网·基础篇07-深入理解MQTT协议之控制报文(数据包)格式

      在MQTT协议中,一个控制报文(数据包)的结构按照前后顺序分如下三部分: 结构名 中文名 解释说明 Fixed header 固定报头 报文的最开始部分,所有报文都包含这个部分 Variable ...

  5. CSAPP 2-1 - 信息的存储

    目录 0 基础概念及摘要 1 信息存储 1.1 十六进制表示法 1.2 字数据大小 1.3 寻址和字节顺序 0 基础概念及摘要 (1) 基础概念: 现代计算机存储和处理的信息以二进制信号表示 -- 0 ...

  6. 读书笔记_python网络编程3_(3)

    3.TCP:传输控制协议 第一个版本在1974年定义,建立在网际层协议(IP)提供的数据包传输技术之上.TCP使程序可以使用连续的数据流进行相互通信. 除非网络原因导致连接中断/冻结,TCP都能保证将 ...

  7. CheckBoxList选中某项,获取其它项是否是选中

    <div class="formControls col-xs-8 col-sm-9" style="margin-top:-15px;" id=&quo ...

  8. IOR and mdtest - measure parallel file system I/O performance at both the POSIX and MPI-IO level.

    This parallel program performs writes and reads to/from files under several sets of conditions and r ...

  9. fork函数的一些小结

    今天遇到一个这样的问题,假设父进程有一个变量S,fork后,子进程中的变量S地址是否和父进程中的变量S 是相同的? 再学操作系统的时候,知道fork是采用的写时复制,所以如果子进程或者父进程不对变量S ...

  10. 四、排序算法总结二(归并排序)(C++版本)

    一.什么是归并排序? 归并排序是基于分而治之的思想建立起来的. 所谓的分而治之,也就是将一个数据规模为N的数据集,分解为两个规模大小差不多的数据集(n/2),然而分别处理这两个更小的问题,就相当于解决 ...