EXPORTFS command:
/TMP/192.168.209.129/24 (Rw,sync,no_root_squash)
- EXPORTFS-ARV//Do not restart the NFS service, the configuration file will take effect = first unload the directory and then mount it again.
- The following actions are in the client
- Mkdir/aminglinux
- Mount-t Nfs-onolock 192.168.209.128:/tmp/aminglinux
- Touch/aminglinux/test.txt
- Ls-l!$
- -oremount,nfsvers=3
Unload mount point on client
The EXPORTFS-ARV command on the server enables the changed configuration file to take effect.
Edit/etc/exports configuration file, add a line of content, save exit
Execute the EXPORTFS-ARV command again
Execute the SHOWMOUNT-E command on the client to see if it takes effect
Client mount, mount the TMP directory to the MNT directory
View the TMP directory on the service side
Client's mnt directory to create files, view files under directory
Server View TMP directory
NFS Client issues:
Method One: Add the option to the client Mount-o nfsvers=3
Method Two: Both client and server need vim/etc/idmapd.conf
Change "#Domain = local.domain.edu" to "Domain = xxx.com" (xxx.com here, as defined here), and then restart the RPCIDMAPD service
FTP Introduction:
FTP (File Transfer Protocol) Files Transfer protocol for controlling two-way transmission of files over the Internet. The primary role of FTP is to have users connect to a remote computer (which runs an FTP server program) to see what files are on the remote computer, and then copy the files from the remote computer to the local computer, or transfer the local files to the remote computer.
Because of the poor security of the FTP service, large enterprises do not use, small enterprises will be used frequently, large enterprises will use automated publishing tools.
Using VSFTPD to build ftp:
Create a new user = FTP can map a number of virtual users
Useradd-s/sbin/nologin virftp--Create a new user
Vim/etc/vsftpd/vsftpd_login--Define the name and password of the virtual user (virtual user can define multiple)
The contents of the virtual user profile are as follows, odd behavior user name, even behavior password, multiple users write multiple lines
TestUser1--User name
Aminglinux--User password
- chmod 600/etc/vsftpd/vsftpd_login --permissions to the password file
- db_load-t-T Hash-f/etc/vsftpd/vsftpd_login/etc/vsftpd/vsftpd_login.db --Convert the text password file to a computer-recognized binary file
- li>
- mkdir/etc/vsftpd/vsftpd_user_conf --Create a directory of virtual user profiles
- cd/etc/vsftpd/vsftpd_user_ Conf --Enter the virtual User Configuration directory
- vim testuser1//Add the following & nbsp --Create a virtual user (the virtual user must be exactly the same as the name of the virtual user above)
#虚拟用户配置文件local_root=/home/virftp/testuser1 #指定虚拟用户的家目录anonymous_enable=NO #是否允许匿名用户anon_upload_enable=NO #是否允许匿名用户上传anon_mkdir_write_enable=NO #是否允许匿名用户创建目录和写idle_session_timeout=600 #连接ftp超时时间(秒)data_connection_timeout=120 #数据传输的超时时间(秒)max_clients=10 #最多允许同时几个终端连接 #创建虚拟用户的家目录,并新建一个文件,修改权限
- Mkdir/home/virftp/testuser1--Create a folder directory for a virtual user
- Touch/home/virftp/testuser1/aming.txt--Create a new file in the Virtual User folder directory
- Chown-r virftp:virftp/home/virftp--folder directory a Read permission
- VIM/ETC/PAM.D/VSFTPD//At the front Plus
auth sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login #最开始二进制定义的密码文件account sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login #最开始二进制定义的密码文件
Note: in CENTOS6 "/lib64/security/pam_userdb.so" The file needs to be differentiated between 32-bit and 64-bit versions
- vim/etc/vsftpd/vsftpd.conf--Edit master configuration file
- Change Anonymous_enable=yes to Anonymous_enable=no
- Change #anon_upload_enable=yes to Anon_upload_enable=no
- Change #anon_mkdir_write_enable=yes to Anon_mkdir_write_enable=no
- Add the following:
#在主配置文件最下面增加的代码chroot_local_user=YESguest_enable=YESguest_username=virftp #告诉服务现在用的虚拟用户virtual_use_local_privs=YES #开启虚拟用户和系统用户的映射user_config_dir=/etc/vsftpd/vsftpd_user_confallow_writeable_chroot=YES
Start the VSFTPD service to view the process and listening ports
FTP Listener is 21 port, 22 port is sshd,23 port is telnet
FTP test
Install an FTP client software on Windows FileZilla client,linux FTP test, install the LFTP package (Linux above for easy installation of LFTP test)
Use the LFTP command as follows, enter the password, and view with LS
? can see which commands to use
Download the Aming.txt file directly to the current directory, press quit to exit, and then view
Using Xshell to implement functions similar to FTP
First scenario: Create a new session, change the Protocol to the SFTP protocol, enter the name, IP, and port number
Then connect, enter the user name and password
After login by default in the root directory, switch to/tmp directory, download files, save the address can also be set
Enter the exit command to exit.
The second option: Press ctrl+alt+f, download xftp and install.
14.4 EXPORTFS Command 14.5 NFS Client Problem 15.1 FTP introduction 15.2/15.3 use VSFTPD to build FTP