NFS: Provide network shares suitable for group collaboration.

Share this link

Install the NFS packages:

# yum groupinstall -y "NFS file server"

Add new rules to the firewall:

# iptables -I INPUT -m state --state NEW -m udp -p udp --dport 111 -j ACCEPT
# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT
# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT

Save the firewall configuration:

# service iptables save

Activate the nfs services at boot:

# chkconfig rpcbind on
# chkconfig nfs on
# chkconfig nfslock on

Start the nfs services:

# service rpcbind start
# service nfs start
# service nfslock start

Create a directory to export:

# mkdir /shared

Create a dedicated group:

# groupadd -g 60000 sharedgrp

Assign this group to the new directory:

# chgrp sharedgrp /shared

Define permissions:

# chmod 2770 /shared

Edit the /etc/exports file and add the following lines with the name (or IP address) of the client(s):

/shared client(rw,no_root_squash)

Export the directories:

# exportfs -avr

Note: the client needs to have access to the same group (via LDAP) and be a member of this group.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz

Upcoming Events (CET)

There are no events.

RHCSA7: Task of the day

Allowed time: 5 minutes.
Create a new user account called "bob" with password "redhat" and set expiration in one week.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a default secure MariaDB database called maria with a user named muser with all privileges.

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...