Build an nfs server under Fedora

Source: Internet
Author: User

Build an nfs server under Fedora

Fedora19 installing NFS and connecting to Development Board zyl-1014-5-6

Install and start the NFS service
Install NFS service # yum install nfs-utils * # yum install portmap

Disable the default firewall of Fedora, # systemctl stop firewalld
Enable NFS service # systemctl enable nfs-server.service
Ln-s '/lib/systemd/system/nfs-server.service'/etc/systemd/system/multi-user.target.wants/nfs-server.service'
Check whether the NFS service is enabled
# Systemctl is-enabled nfs-server.service
Enabled

Configure the file to be exported from nfs:

# Vi/etc/exports

/Root/rootfs * (rw, sync, no_root_squash)
Start NFS service # systemctl start nfs-server.service
Or use the service command # service nfs-server restart
Redirectingto/bin/systemctl restart nfs-server.service
View NFS service status # systemctl status nfs-server.service
Nfs-server.service-NFS Server
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled)
Active: active (running) since Sun, 29 Apr 2012 11:08:59 + 0800; 1 min 46 s ago

Local test # showmount-e 192.168.0.117 Test Result:
# Mount-t 192.168.0.117:/root/rootfs/mnt/nfs

Error 1:

For the last error: mount. nfs: access denied by server whilemounting

192.168.0.117:/root/Work, based on the URL:

Http://liuzhigong.blog.163.com/blog/static/17827237520115305226932/

Modify configuration file/Etc/exports, JoinInsecureOption

/Root/rootfs * (insecure, rw, sync, no_root_squash)

# Mount-t nfs192.168.0.117:/root/rootfs/mnt

Error: mount. nfs: Connection timed out

Slove: http://bbs.chinaunix.net/thread-4121859-1-1.html:disable Firewall

Http://bbs.csdn.net/topics/360017569

Disable the default firewall of Fedora, # systemctl stop firewalld:

Use ## mount-t nfs-o tcp192.168.0.117:/root/rootfs/mnt/nfs

# Mount-t nfs-onolock 192.168.1.104:/root/rootfs/mnt/nfs

View the information through df-h:

Reference: http://my.oschina.net/davisqi/blog/76124

Http://blog.chinaunix.net/uid-9679478-id-4145508.html

Uninstall:

# Umount/mnt

Note: restart the NFS service every time you modify the/etc/exports file. After local showmount test, remount.

Set Development Board:

To enable network sharing between the ARM Development Board and PC, you must connect the ARM development board to the PC through a network cable.

And set the ARM Development Board and PC in the same network segment, we can use the following command to view and modify the ARM development board

IP Address:

Ifconfig // view the Ethernet IP address,

Ifconfig eth0 (Port name) (ip address 1) // the ip address 1 must be in the same network segment as the PC ip address.

Test: ping the IP address of a PC to check whether the ping is successful.

Note: 1, # systemctlstop firewalld

2. Enable the nfs service.

3. Test nfs

2. Test on the host

3. mount

Mount the Arm Development Board and PC:

Run the following command:

Mount-t nfs-o nolock192.168.1.104:/root/rootfs/mnt/nfs

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.