天天看点

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

exportfs命令

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

exportfs命令可以添加共享目录不用重启nfs服务,

测试:首先更改服务器端的nfs配置文件
[root@100xuni1 ~]# vim /etc/exports       ##增加以下内容           
/tmp   192.168.63.101(rw,sync,no_root_squash)              ##共享给192.168.63.101这个ip           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
执行exportfs -arv
[root@100xuni1 ~]# exportfs -arv           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
在客户端挂载
[root@101xuni2 ~]# mount -t nfs 192.168.63.100:/tmp/ /mnt/           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
客户机在mnt下建个文件
[root@101xuni2 ~]# vim /mnt/han.txt           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

NFS客户端问题

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

FTP介绍

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

使用vsftpd搭建ftp服务

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
安装vsftpd
[root@100xuni1 ~]# yum install -y vsftpd               
创建一个普通用户创建的目的是让这些虚拟的用户来做一个映射
[root@100xuni1 ~]# useradd -s /sbin/nologin virftp    ##virftp这个名字可以随意写           
编辑一下虚拟用户的密码文件,在这个文件里需要给他定义用户名和密码
[root@100xuni1 ~]# vim /etc/vsftpd/vsftpd_login
           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
权限的设置
[root@100xuni1 ~]# chmod 600 /etc/vsftpd/vsftpd_login           
把文本的密码文件转换成计算机识别的二进制文件
[root@100xuni1 ~]# db_load -T -t hash -f /etc/vsftpd/vsftpd_login /etc/vsftpd/vsftpd_login.db
           
创建虚拟用户他们配置文件所在的目录。这个目录也是自定义的
[root@100xuni1 ~]# mkdir /etc/vsftpd/vsftpd_user_conf           
进入到/etc/vsftpd/vsftpd_user_conf这个目录里。创建第一个用户的配置文件,这个用户的配置文件名字他需要和用户名字保持一致
[root@100xuni1 vsftpd_user_conf]# vim testuser1           
local_root=/home/virftp/testuser1
anonymous_enable=NO
write_enable=YES
local_umask=022
anon_upload_enable=NO
anon_mkdir_write_enable=NO
idle_session_timeout=600
data_connection_timeout=120
max_clients=10           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
定义完虚拟用户后,再来创建用户的家目录
[root@100xuni1 vsftpd_user_conf]# mkdir /home/virftp/testuser1           
在创建个文件
[root@100xuni1 vsftpd_user_conf]# touch /home/virftp/testuser1/hanshuo.txt           
权限修改
[root@100xuni1 vsftpd_user_conf]# chown -R virftp:virftp /home/virftp
           
定义密码文件在哪里很重要
[root@100xuni1 vsftpd_user_conf]# vim /etc/pam.d/vsftpd    ##这是用来认证的一个文件           
auth sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
account sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
编辑一下vsftpd的主配置文件
[root@100xuni1 vsftpd_user_conf]# vim /etc/vsftpd/vsftpd.conf           
将anonymous_enable=YES 改为 anonymous_enable=NO      ##不允许匿名用户
 将#anon_upload_enable=YES 改为 anon_upload_enable=NO      
 将#anon_mkdir_write_enable=YES 改为 anon_mkdir_write_enable=NO  ##不允许创建用户
  再增加如下内容
chroot_local_user=YES
guest_enable=YES
guest_username=virftp
virtual_use_local_privs=YES
user_config_dir=/etc/vsftpd/vsftpd_user_conf
allow_writeable_chroot=YES
           
启动
[root@100xuni1 vsftpd]# systemctl start vsftpd           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

测试ftp

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

首先在客户端安装个ftp的软件(filezilla软件)这是ftp的开源的免费的,可以搭建服务,同时他也有个客户端软件非常好用

**做测试简单直接安装个linux上的ftp客户端软件,下载
[root@100xuni1 ~]# yum install -y lftp           
lftp用法
[root@101xuni2 vsftpd_user_conf]# lftp [email protected]           
口令:                            ##输入test1的密码
lftp [email protected]:~> ls          
-rw-r--r--    1 1000     1000            0 Aug 28 15:07 hanshuo1.txt
           
get下载
lftp [email protected]:/> get hanshuo1.txt           
lftp [email protected]:/> exit              
[root@101xuni2 vsftpd_user_conf]# ls
hanshuo1.txt  test1
           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

Windows测试需要下载filezilla客户端

xshll实现ftp类似的功能两种方案

第一种新建会话
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

xshell使用xftp传输文件

第二种方法使用xftp这个需要安装插件,可以使用快捷键ctrl+alt+f
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
点击下载xftp
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
安装下载的xftp
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
**安装完成后进入xshll的会话,在快捷键ctrl+alt+f
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

使用pure-ftpd搭建ftp服务

exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务

这个pure-ftpd,更加简单可以使用

安装prue-ftpd
[root@101xuni2 ~]# yum install -y epel-release
[root@101xuni2 ~]# yum install -y pure-ftpd           
安装完更改配置文件
[root@101xuni2 ~]# vim /etc/pure-ftpd/pure-ftpd.conf           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
如果以前配置过vsftpd请关掉
[root@101xuni2 ~]# systemctl stop vsftpd     ##关掉vsftpd           
启动pure-ftpd
[root@101xuni2 ~]# systemctl start pure-ftpd           
exportfs命令、NFS客户端问题、FTP介绍、使用vsftpd搭建ftpexportfs命令NFS客户端问题FTP介绍使用vsftpd搭建ftp服务测试ftpxshll实现ftp类似的功能两种方案xshell使用xftp传输文件使用pure-ftpd搭建ftp服务
创建个测试目录
[root@101xuni2 /]# mkdir /home/ftp      ##用来给pure-ftpd的用户使用           
创建个普通用户
[root@101xuni2 ~]# useradd -u 1020 ftpd           
把/home/ftp属主属组改成ftpd
[root@101xuni2 ~]# chown -R ftpd:ftpd /home/ftp
           
用pure-pw useradd创建一个用户,创建这个用户的时候首先指定用户名ftp_usera,用-u这个选项指定你系统的用户ftpd,然后是用户的家目录
[root@101xuni2 ~]# pure-pw useradd ftp_usera -u ftpd  -d /home/ftp           
Password:                       ##设置他的密码输入两遍
Enter it again:           
生成密码
[root@101xuni2 ~]# pure-pw mkdb