centos7 在线安装及离线安装ftp文件服务器及浏览器通过ip+port+路径访问上传图片及文件

一、安装前准备1、关闭默认firewallsystemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)2、开启iptablesyum -y install iptables-services #安装iptables systemctl
摘要由CSDN通过智能技术生成

一、安装前准备

1、关闭默认firewall

systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

2、开启iptables

yum -y install iptables-services #安装

iptables systemctl enable iptables #设置开机自启

systemctl enable iptables.service #两个都执行

二、安装vsftpd

1、安装vsftpd并设置开机自启

在线安装

yum -y install vsftpd #安装

离线安装

1)安装包下载 ftp百度网盘下载

2)如果网盘失效可以找一台有网络的linux服务器

#下载vsftpd的rpm包,/home/mjb/soft/vsftpd是rpm下载路径

sudo yum install --downloadonly --downloaddir=/home/mjb/soft/vsftpd vsftpd

3)安装vsftpd的rpm包

#通过sftp工具下载并上传至离线服务器,使用下部命令安装vsftp
#其中i表示安装,v表示显示安装过程,h表示显示进度

rpm -ivh ***.rpm

启动

vsftpd systemctl start vsftpd.service #启动

设置vsftpd开机自启动

vsftpd systemctl enable vsftpd.service #设置vsftpd开机自启动

2、编辑/etc/vsftpd/vsftpd.conf文件(可直接替换)

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
userlist_deny=NO
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=077
#
# Uncomment this to allow the anonymous FTP user to upload files. This
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值