RedHat AS4.6 下如何安装Proftpd

2023-04-12 02:05:00 redhat 安装 AS4

RedHat AS4.6 下安装Proftpd的方法如下:

1.下载安装包

下载地址:ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5a.tar.gz

2.解压安装包

tar zxvf proftpd-1.3.5a.tar.gz

3.进入解压目录

cd proftpd-1.3.5a

4.配置安装

./configure --prefix=/usr/local/proftpd --with-modules=mod_sql:mod_sql_mysql:mod_vroot

5.编译安装

make && make install

6.创建配置文件目录

mkdir /usr/local/proftpd/etc

7.复制配置文件

cp /etc/proftpd.conf /usr/local/proftpd/etc/

8.修改配置文件

vi /usr/local/proftpd/etc/proftpd.conf

修改如下:

ServerName "ProFTPD Default Installation"

ServerType standalone

DefaultServer on

# Port 21 is the standard FTP port.

Port 21

# 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

# Normally, we want files to be overwriteable.

AllowOverwrite on

# A basic anonymous configuration, no upload directories. If you do not

# want anonymous users, simply delete this entire section.

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 10

# 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

DenyAll

9.启动服务

/usr/local/proftpd/sbin/proftpd

10.设置开机启动

echo "/usr/local/proftpd/sbin/proftpd" >> /etc/rc.local

11.添加用户

useradd ftpuser

12.设置用户密码

passwd ftpuser

13.创建用户目录

mkdir /home/ftpuser

14.修改目录权限

chmod 777 /home/ftpuser

15.重启服务

/usr/local/proftpd/sbin/proftpd restart

安装完成,就可以使用ftpuser用户登录ftp服务器了。

相关文章