NFS Service under Linux (Specify WWW user)

Source: Internet
Author: User

1th ChapterBuildNfsService (SpecifyWwwusers)

1.1Service-side operations(in theNfs01Service Side) 1.1.1installationNfsService

Rpm-qa nfs-utils Rpcbind

Yum Install nfs-utils rpcbind-y

Rpm-qa nfs-utils Rpcbind

1.1.2Start the service

/etc/init.d/rpcbind start

/etc/init.d/nfs start

Rpcinfo-p localhost

Chkconfig NFS On

Chkconfig Rpcbind on

1.1.3Configuration

Mkdir/data-p

Useradd www-s/sbin/nologin-m-u 888

ID www

Chown-r Www.www/data

Ls-ld/data

[[email protected] data]# vim/etc/exports # # # Edit configuration file

#----------time by Oldboy for Kaifa.

/DATA172.16.1.0/24 (rw,sync,all_squash,anonuid=888,anongid=888)

[Email protected] data]# Cat/etc/exports

[Email protected] data]# EXPORTFS-RV # # #使配置生效

### or use/etc/init.d/nfs Reload # # #平滑重启

1.1.4Test

SHOWMOUNT-E 172.16.1.31

Mount-t NFS 172.16.1.31:/data/mnt

Df-h

Umount/mnt # # # If uninstall is not removed, use UMOUNT-LF/MNT force unload (data is not lost)

1.2Client1operation (inBackupclient)1.2.1installationNfsRelated Service Packs

Rpm-qa nfs-utils Rpcbind

Yum Install nfs-utils rpcbind-y

Rpm-qa nfs-utils Rpcbind

1.2.2Start the service

/etc/init.d/rpcbind start

Chkconfig Rpcbind on

1.2.3Configuration

Useradd www-s/sbin/nologin-m-u 888

ID www

1.2.4Mount Test

[[email protected] ~]# Ping 172.16.1.31

[[Email protected] ~]# Telnet 172.16.1.31 111

SHOWMOUNT-E 172.16.1.31

Mount-t NFS 172.16.1.31:/data/mnt

Df-h

Cat/proc/mounts

Touch/mnt/oldboy.txt

1.3Client2operation (inWeb01client)1.3.1installationNfsRelated Service Packs

Rpm-qa nfs-utils Rpcbind

Yum Install nfs-utils rpcbind-y

Rpm-qa nfs-utils Rpcbind

1.3.2Start the service

/etc/init.d/rpcbind start

Chkconfig Rpcbind on

1.3.3Configuration

Useradd www-s/sbin/nologin-m-u 888

ID www

1.3.4Mount Test

[[email protected] ~]# Ping 172.16.1.31

[[Email protected] ~]# Telnet 172.16.1.31 111

SHOWMOUNT-E 172.16.1.31

Mount-t NFS 172.16.1.31:/data/mnt

Df-h

Cat/proc/mounts

Touch/mnt/oldgirl.txt


This article is from the "11942277" blog, please be sure to keep this source http://11952277.blog.51cto.com/11942277/1895555

NFS Service under Linux (Specify WWW user)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.