CentOS 7下安装配置proftpd搭建ftp服务器

proftpd全称:Professional FTP daemon,是针对Wu-FTP的弱项而开发的,除了改进的安全性,还具备许多Wu-FTP没有的特点,能以Stand-alone、xinetd模式运行等。ProFTP已经成为继Wu-FTP之后最为流行的FTP服务器软件,越来越多的站点选用它构筑安全高效的FTP站点,ProFTP配置方便,并有MySQL和Quota模块可供选择,利用它们的完美结合可以实现非系统账号的管理和用户磁盘的限制。<摘抄百度百科>

本章通过下载源码的方式安装,可以到官网下载最新版本:http://www.proftpd.org/

1、首先安装lrzsz方便拷贝文件到要搭建服务器的linux路径下

yum install lrzsz

2、上传文件解压

将下载完成的proftpd-1.3.6.tar.gz文件上传到指定路径,使用tar zxvf proftpd-1.3.6.tar.gz解压

3、由于使用源码安装,所以需要安装gcc编译环境

yum install gcc gcc-c++ autoconf automake

3、配置并制定安装和配置文件路径

./configure --prefix=/usr/local/proftpd --sysconfdir=/usr/local/proftpd

4、安装

make&make install

5、修改配置文件,限制匿名用户可以上传下载,但是不能删除(本章暂不详细描述权限控制部分内容)

vi /usr/local/proftpd/proftpd.conf

# This is a basic ProFTPD configuration file (rename it to
# ‘proftpd.conf‘ for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName                      "Welcome to FTP Server"
ServerType                      standalone
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21

# Don‘t use IPv6 support by default.
UseIPv6                         off

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                    30

# Set the user and group under which the server will run.
User                            nobody
Group                           nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite          on

IdentLookups            off
UseReverseDNS           off

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  AllowAll
</Limit>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous /home>
  User                          ftp
  Group                         ftp

  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous ftp

  # Limit the maximum number of anonymous logins
  MaxClients                    50

  # We want ‘welcome.msg‘ displayed at login, and ‘.message‘ displayed
  # in each newly chdired directory.
  DisplayLogin                  welcome.msg
  DisplayChdir                  .message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit DELE RMD>
    DenyAll
  </Limit>
</Anonymous>

6、关闭防火墙

systemctl stop firewalld.service

systemctl disable firewalld.service

7、启动服务器

/usr/local/proftpd/sbin/proftpd

查看进程是否已经启动

[[email protected] ~]# ps -ef |grep proftpd
nobody    1140     1  0 12:13 ?        00:00:00 proftpd: (accepting connections)
root      3182  2270  0 12:50 pts/0    00:00:00 grep --color=auto proftpd  

8、添加到启动项避免每次重启后都需要手动启动

vi /etc/rc.d/rc.local

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run ‘chmod +x /etc/rc.d/rc.local‘ to ensure
# that this script will be executed during boot.

touch /var/lock/subsys/local
/usr/local/proftpd/sbin/proftpd

由于在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要加上可执行的权限:

chmod +x /etc/rc.d/rc.local

时间: 2024-08-30 03:39:52

CentOS 7下安装配置proftpd搭建ftp服务器的相关文章

Kali Linux下安装配置ProFTPD实例

1,安装ProFTPD 在ftp://ftp.proftpd.org/下可以找到官方发布的各个ProFTPD版本,本人使用ftp://ftp.proftpd.org/historic/source/proftpd-1.3.0a.tar.gz [email protected]:~# wget ftp://ftp.proftpd.org/historic/source/proftpd-1.3.0a.tar.gz [email protected]:~# tar –xf proftpd-1.3.0a

CentOS系统下安装配置ftp服务

安装配置步骤: rpm -ivh /opt/bak/vsftpd-2.2.2-11.el6.x86_64.rpm --本地安装vsftpd ll /etc/vsftpd/  --查看vsftpd的配置文件 里面一共有四个配置文件: vsftpd.conf 为主配置文件, ftpusers为黑名单用户配置文件,通常我们的系统用户还有根用户都是放在这个配置文件里面的,因为这些用户的权限很大,如果使用ftp服务可能造成一些问题, user_list为用户列表文件(可以通过在配置文件vsftpd.con

centos 7下安装配置zookeeper

一.安装好java 二.配置 zookeeper: 1.创建 /usr/local/services/zookeeper 文件夹:     mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/services/zookeeper 目录中:     cd /usr/local/services/zookeeper 3.下载 zookeeper-3.4.9.tar.gz:     wget https://mirrors.tuna.tsin

windows 下使用 Filezilla server 搭建 ftp 服务器

1. Filezilla server 免费,开源, ftp 服务端 2. 下载安装, windows  https://filezilla-project.org/ 3. 安装完成之后,在桌面点击 filezilla server 图标,打开管理器,,登陆,默认ip 127.0.0.1,端口,默认14147: 密码,默认无 4. 在管理中心配置 访问用户,ftp主目录,权限,即可 5. 在本机测试ftp访问, 浏览器 ftp://127.0.0.1  输入上面管理中心添加的用户名和密码,即可访

CentOS 7下安装配置FTP

安装vsftpd yum install -y vsftpd 编辑ftp配置文件 vi /etc/vsftpd/vsftpd.conf anonymous_enable=NO #anonymous_enable=YES chroot_local_user=YES #去掉前面的注释 #chroot_list_enable=YES #chroot_list_file=/etc/vsftpd/chroot_list #不受限制的用户列表,用不用都OK allow_writeable_chroot=YE

centos 7下安装配置nginx

安装所需环境 Nginx 是 C语言 开发,建议在 Linux 上运行,当然,也可以安装 Windows 版本,本篇则使用 CentOS 7 作为安装环境. 一. gcc 安装安装 nginx 需要先将官网下载的源码进行编译,编译依赖 gcc 环境,如果没有 gcc 环境,则需要安装: yum install gcc-c++ 二. PCRE pcre-devel 安装PCRE(Perl Compatible Regular Expressions) 是一个Perl库,包括 perl 兼容的正则表

centos 7下安装配置dubbo-admin

1.安装好tomcat之后, 下载并且编译最新的dubbo-admin 如图: 1.修改WEB-INF中的dubbo.properties dubbo.registry.address=zookeeper://192.168.1.87:2181//zookeeper的地址 dubbo.admin.root.password=rootdubbo.admin.guest.password=guest 2.删除原tomcat/webapps/ROOT目录下的所有文件,同时复制dubbo-admin解压

Linux下5分钟搭建ftp服务器

本文讲的是linux下简单快速的搭建ftp服务器环境. 1.SSH登陆服务器(本人使用的是Xshell) 2.yum安装vsftpd 执行命令:yum install vsftpd 3.修改配置.增加开机启动 修改配置:vi /etc/vsftpd/vsftpd.conf 将anonymous_enable=YES的值设置为NO,不准匿名用户登录, 增加开机启动,命令:chkconfig –level 35 vsftpd on 4.增加FTP用户.并设置密码 命令:useradd Sunne -

CentOS 下搭建FTP服务器

vsftpd是Linux下比较著名的FTP服务器,搭建FTP服务器当然首选这个.本文介绍了在CentOS 6 4下安装vsftpd.配置虚拟用户登录FTP的过程.正 vsftpd是Linux下比较著名的FTP服务器,搭建FTP服务器当然首选这个. 本文介绍了在CentOS 6.4下安装vsftpd.配置虚拟用户登录FTP的过程. 正文: 一:安装vsftpd 查看是否已经安装vsftpd 1 2 3 4 rpm -qa | grep vsftpd #如果没有,就安装,并设置开机启动 yum -y