The difference between Ftp server, Samba server and NFS server

Ftp, Samba, NFS server comparison

According to the way of use, it can be divided into 3 categories of file servers: ftp server (ftp/tftp), Samba server, NFS server.

1: FTP clients can be any platform

2: Samba is specifically for windows clients

3: NFS is for linux/unix users

Here are three types of servers The comparison of:

Configuration of each server

~NFS server: NFS is a network file system developed by SUN Microsystem, it It is a distributed file system architecture based on remote procedure call (RPC). Compared with Samba, NFS has stronger data throughput capacity.

1. Use the command rpm –qa | grep nfs to check whether the package NFS is installed. If there is no output, it means that it is not installed. Please install it yourself. 2, configure the NFS server. Use any text editor configuration file /etc/exports to determine the directories that need to be shared with customers. Its basic format is Directory Host(options) comments, these 3 fields/columns must be on one line, there must be a gap between directory and host(options), and comments are optional. The host option is mainly to give the user what kind of authority to connect. The directory directory indicates the directory to be shared. It is worth noting that the system administrator should be careful before enabling the NFS service. For example, if the root directory / is accidentally shared, and the user is given read and write permissions, this is a very bad problem. . Therefore, share as few directories as possible and give smaller access permissions. The host name host is a very flexible project. It can be a single host name (obtained from /etc/hosts), host ip address, host name resolved by a domain name server, IP network—network number and subnet mask with "/ "Connect, NIC, etc." Here is an example. /data/skyboy skyboy(rw) Share the directory /data/skyboy with the host skyboy, and the host has read and write permissions for the directory /home/skyboy /tmp 192.168.222.129(ro) The host 192.168.222.129 is for the directory/ tmp has read-only sharing permission /media/cdrom 192.168.222.0/255.255.255.0(ro) The entire network has the read permission to read the CD-ROM mounted on the NFS server 3, enable NFS service. There are two steps: first enable portmap, then enable NFS service. service portmap start; Note the method used in the old version service nfs start. The function of portmap is to enable remote procedure calls. Sometimes enabling NFS cannot be successful. You may wish to check whether the portmap service is started (ps aux | grep portmap). 4. Mount the NFS shared directory on the client. First create a mount point on the client, such as mkdir /mnt/nfs, and then use the command to mount the directory shared by the nfs server. Take the share in step 2 as an example, we mount the directory /tmp, mount -t nfs 192.168.222.129:/tmp /mnt/nfs //Assuming the ip address of the nfs server is 192.168.222.129. 5. Access NFS shared resources. Continue to the previous step, change the file directorycd/mnt/nfs conveniently realizes the remote access to the nfs server directory/tmp. 6. Unmount the NFS file system. Execute the command umount/mnt/nfs on the client to unmount the NFS file system mounted in step 4. ~Samba Server This world is neither linux/unix nor microsoft windows dominating the world. Perhaps because of the fact that Linux/Unix and Windows both compete and coexist, people have developed Samba, a tool for Linux to provide file sharing to Windows users. This should be regarded as the open spirit of Linux!

1. Check whether the samba software package is installed. rpm -qa | grep smb, if not, install samba by yourself. 2. Modify the configuration file /etc/samba/smb.conf. The security option "security=share" of the configuration file smb.conf of the early Linux version is a security risk. However, the default value of the security option of the popular Linux version is "security=user". If you only want the user to have read-only access to his directory, change the option "writeable=yes" to "read only=yes". Other options can be changed according to your requirements. For general applications, there is basically no need to modify this file. 3. Add system account. Since the smb access is carried out using the system account, adding an account is essential. This is relatively simple. Use the commands useradd sery and passwd sery to add several system accounts in turn. 4. Create a Samba user password file. Although the samba user is a system user, for security reasons, the password of the samba user is not the user password set when the system user is created. In order to generate the password required for smb, the following operations should be performed: smbpasswd -a skyboy //Set the smb password for the system user 5, enable the Samba server. service smb start 6. The windows client accesses the shared directory of the Samba server. In the windows environment, right-click the "Network Neighborhood" icon, then left-click "Search Computer", fill in the Samba server's IP address in the "Computer Name" search box, and click Search Now. After finding it, double-click the icon and enter the user name and password preset on the Samba server to legally access the shared resources set by the Samba server. For ease of use, you can map the shared directory provided by the Samba server to a local drive. 7, others. For the samba server configured above, the user's access shared directory is the home directory of the system account. To set the shared directory to another location, modify the Samba configuration file /etc/samba/smb.conf file. ~FTP server In the Linux environment, there are three main FTP servers: vsftpd, proftpd and wu-ftpd. For security reasons, vsftpd has now firmly occupied the dominant position. Literally we can understand the main feature of vsftpd-very secure (very secure ftp).

data shows: 1. Use ASCII mode to download files, the download speed can reach 86M/s on 1G Ethernet. 2. vsftpd can support the access of 15,000 concurrent users.

1. Check whether the vsftp package is installed. rpm –qa | grep vsftpd. If not, install it. 2, modify the configuration file. VsThe configuration file of ftpd is /etc/vsftpd/vsftpd.conf. If you do not intend to provide anonymous access, you need to modify the configuration file /etc/vsftpd/vsftpd.conf entry "anonymous_enable=Yes" to "anonymous_enable=No". 3, enable vsftpd service. service vsftpdstart. 4. Client connection access. It can be a dedicated ftp client tool or a browser. Using tools to access the vsftpd server is much faster than using a browser. 5, the user of the vsftpd server. The Vsftpd server supports three types of support: local users (with system accounts), virtual users (guest), and anonymous accounts; the system administrator should determine the user access policy of the vsftpd server according to security requirements