Configure and enable a file server in Linux

Source: Internet
Author: User
In Linux, configure and enable the file server-Linux Enterprise Application-Linux server application information. The following is a detailed description. For a real running environment, it is necessary to configure and enable the file server. The security of important data is obviously much more reliable than that of distributed storage. Therefore, it is recommended that the system administrator configure and enable the file server as the basic management policy.

According to the usage, there are three types of file servers: ftp Server (ftp/tftp), Samba server, and NFS server. Ftp customers can be any platform, samba is for windows customers, and NFS is for linux/unix users. The following is a comparison of the three servers:

Server Name User client platform use range service port

FTP, Windows, linux, unix, macOS, and other websites, file sharing, Tcp/21

Samba Windows File Sharing (network neighbor) Tcp/445, tcp/139

NFS Linux/unix website released, file sharing (mount) Tcp/2049

Next we will configure and run these servers one by one.

   NFS server

NFS is a Network File System developed by SUN Microsystem. It is a Distributed File System Architecture Based on Remote Procedure Call (RPC. Compared with Samba, NFS has stronger data throughput.

1. Run the command # rpm? Qa | grep nfs check whether the software package NFS is installed. If no output is provided, it indicates that the package is not installed. install it on your own.

2. Configure the NFS server. Use any text editor configuration file/etc/exports to determine the directory to be shared with the customer. Its basic format is Directory Host (options) # comments. These three fields/columns must be in one row. There must be a gap between directory and host (options). # comments can be dispensable. The host option mainly gives the attached user the permissions. Directory indicates the directory to be shared. It is worth noting that the system administrator should be careful before the NFS service is enabled, such as accidentally sharing the root directory /, it is very bad to grant the user the read and write permissions. Therefore, try to share as few directories as possible and grant smaller access permissions. Host is a flexible project, which can be a single host name (obtained by/etc/hosts), host IP address, host name resolved by Domain Name Server, IP network-the network number and subnet mask are connected with "/", NIC, etc. The following is an example.
CODE:/home/sery (r, w) # share the directory/home/sery with the host sery, and the host has read and write permissions on the directory #/home/sery

/Tmp 192.168.100.18 (ro) # host 192.168.100.18 has read-only permission for the directory/tmp #

/Media/cdrom 192.168.100.0/255.255.255.0 (r, o) # The entire network has been read and mounted to NFS.

# Read Permission for the optical drive disc on the server
Related Article

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.