LINUX搭建FTP服务器
- 使用环境
- 安装步骤
1.环境:
1.1 虚拟机版本:VMware® Workstation 10.0.1 build-1379776
1.2 ftp版本:暂无
1.3 系统版本:Linux version 2.6.32-358.el6.x86_64 【查询版本命令cat /proc/version】
1.4 安装方式:yum命令安装
1.5 安装目的:通过ftp客户端上传相关安装软件、文件到服务器,实现稳定、快速上传工作。
使用用户:admin
2.安装步骤如下:
2.1 检查vsftpd是否安装,检查命令:rpm -qa|grep vsftpd,如果没有安装,则使用yum命令进行安装(需要确保可以连接外网,如ping通www.baidu.com)。
[root@zhaiyl ~]# rpm -qa | grep vsftpd
2.2 使用yum命令安装,具体安装如下:
[root@zhaiyl ~]# yum install vsftpd -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
...
Installed:
vsftpd.x86_64 0:2.2.2-21.el6
Dependency Updated:
openssl.x86_64 0:1.0.1e-48.el6_8.1
Complete!
2.3 安装完成后(yum命令执行后,看到complete后就是安装成功了),启动ftp服务器。ftp启动相关命令:a) service vsftpd restart(ftp服务重新启动) b) service vsftpd start(启动ftp服务) c) service vsftpd stop(关闭ftp服务)
[root@zhaiyl ~]# service vsftpd restart
关闭 vsftpd:[确定]
为 vsftpd 启动 vsftpd:[确定]
2.4 查看ftp服务运行状态:
[root@zhaiyl ~]# service vsftpd status
vsftpd (pid 2885) 正在运行...
[root@zhaiyl ~]#
2.5 使用客户端(FileZilla)连接,如下图:
2.6 设置ftp随机启动,虚拟机每次关机就要关闭,为了避免麻烦将ftp设置为开机启动。
[root@zhaiyl ~]# chkconfig vsftpd on
2.7 重启验证,重启后查看ftp的状态是否仍是启动,如果还是正在运行状态,则证明上一步骤设置生效。