centos nfs配置--转载
Be careful with spaces in the file. If there are no spaces between the hostname and the options in parentheses,the options apply only to the hostname. If there is a space between the hostname and the options,the options apply to the rest of the world. For example,examine the following lines: The first line grants users from read-write access and denies all other users. The second line grants users from read-only access (the default) and allows the rest of the world read-write access. Each time you change ,you must inform the NFS daemon of the change,or reload the configuration file with the following command: The host(s) can be in the following forms: Single machine — A fully qualified domain name (that can be resolved by the server),hostname (that can be resolved by the server),or an IP address. Series of machines specified with wildcards — Use the * or ? character to specify a string match. Wildcards are not to be used with IP addresses; however,they may accidentally work if reverse DNS lookups fail. When specifying wildcards in fully qualified domain names,dots (.) are not included in the wildcard. For example, includes one.example.com but does not include one.two.example.com. IP networks — Use a.b.c.d/z,where a.b.c.d is the network and z is the number of bits in the netmask (for example 192.168.0.0/24). Another acceptable format is a.b.c.d/netmask,where a.b.c.d is the network and netmask is the netmask (for example,192.168.100.8/255.255.255.0). Netgroups — In the format @group-name,where group-name is the NIS netgroup name. NFS shares are mounted on the client side using the command. The format of the command is as follows:
Replace Refer to the man page for more details. If accessing an NFS share by manually issuing the command,the file system must be remounted manually after the system is rebooted. Red Hat Enterprise Linux offers two methods for mounting remote file systems automatically at boot time: the file or the service. An alternate way to mount an NFS share from another machine is to add a line to the file. The line must state the hostname of the NFS server,the directory on the server being exported,and the directory on the local machine where the NFS share is to be mounted. You must be root to modify the file. The general syntax for the line in is as follows: (编辑:晋中站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |