手机
当前位置:查字典教程网 >操作系统 >RedHat/Centos >CentOS下安装使用FTP服务器端程序ProFTPd的教程
CentOS下安装使用FTP服务器端程序ProFTPd的教程
摘要:安装:安装EPEL软件包rpm-Uvhhttp://download.fedora.redhat.com/pub/epel/5/i386/e...

安装:

安装EPEL软件包

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

YUM安装ProFTPd

yum install proftpd

PS:编译安装ProFTPd的方法

wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.proftpd.net/distrib/source/proftpd-1.3.1.tar.gz

tar xzvf proftpd-1.3.1.tar.gz

cd proftpd-1.3.1

./configure --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql

--with-includes=/usr/include/mysql

--with-libraries=/usr/lib/mysql

make && make install

设置开机启动

chkconfig --level 3 proftpd on

ProFTPd管理:

启动

proftpd:service proftpd start

停止

proftpd:service proftpd stop

重启

proftpd:service proftpd restart

重载

proftpd:service proftpd reload

配置文件/etc/proftpd.conf,可以通过proftpd -t6指令检测语法是否正确。

添加ftp用户和用户组

groupadd -g 5500 ftpgroup

adduser -u 5500 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuser

添加虚拟用户

首先我们需要设置配置文件/etc/proftpd.conf。

添加下面代码进配置文件:

AuthUserFile /etc/ftpd.passwd

AuthGroupFile /etc/ftpd.group

关闭检测/etc/shells:

RequireValidShell off

设置仅使用虚拟用户认证:

AuthOrder mod_auth_file.c

禁止PAM认证:

PersistentPasswd off

AuthPAM off

限制改变根目录:

DefaulRoot ~

按照上面的要求设置好配置文件后,我们使用ftpasswd工具来添加虚拟用户,首先下载这个工具。

cd /usr/sbin/

wget http://www.castaglia.org/proftpd/contrib/ftpasswd

chmod +x ftpasswd

ftpasswd工具的格式如下:

# ftpasswd --passwd --name {username} --file /etc/ftpd.passwd --uid {5000} --gid {5000} --home /var/ftp/username-home/ --shell /bin/false

# ftpasswd --group --name group1 –file /etc/ftpd.group --gid 5000 --member username

【CentOS下安装使用FTP服务器端程序ProFTPd的教程】相关文章:

在CentOS系统上简单安装配置XRDP服务器

在CentOS中安装和配置Xen虚拟机的教程

centos安装svn服务器详细步骤

CentOS系统上搭建Git版本控制服务器的教程

Linux下的安装和配置DNS服务器

在CentOS上搭建Chroot 的Bind DNS服务器的方法

CentOS服务器端配置SSH远程连接的教程

CentOS安装中文支持包的方法

在CentOS系统上安装部署iSCSI客户端的教程

CentOS 6.4使用脚本自动关闭触控板的方法

精品推荐
分类导航