首先安装vsftpd
,vsftpd
是very secure FTP daemon
的缩写,是一个彻底免费的、开放源代码的ftp服务器软件。php
yum - y install vsftpd
安装完后,会有/etc/vsftpd/vsftpd.conf
文件,而且新建了一个ftp用户和ftp的组linux
cat /etc/passwd|grep ftp ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
默认的ftp服务是没有启动的,执行sudo service vsftpd start
启动服务器
安装ftp
客户端组件,phpstorm
yum -y install ftp
尝试登录ftp localhost
,输入用户名,密码随意(容许匿名登录) 咱们就能够登录到ftp
上了tcp
开放21端口开放源代码
systemctl
命令是系统服务管理器命令,它实际上将service
和chkconfig
这两个命令组合到一块儿。rest
systemctl stop firewalld systemctl mask firewalld
安装iptables-service
code
yum install iptables-services
启用iptables
orm
systemctl enable iptables
管理iptablse
服务server
systemctl [stop|start|restart] iptables
关闭selinux
,修改/etc/sysconfig/selinux
文件
SELINUX=disabled SELINUXTYPE=targeted
添加21端口在/etc/sysconfig/iptables
下
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
重启iptables
sudo service iptables restart
在phpstorm设置ftp方式上传or下载代码
进入Tools->Deployment->configruation
新建一个server 填写host
用户名称密码,映射目录等便可