CentOS 5 64bit 编译安装Pure-FTPd 笔记

最后更新日期:2010年12月05日
现在版本已经到了1.0.28了,可谓神速啊,不过--with-cork 参数取消了。

~~~~
更新日期:2009年11月4日
Pure-FTPd
http://www.pureftpd.org/project/pure-ftpd
pure-ftpd-1.0.22四月份发布,3年多了才更新一次。
10月份又发布了1.0.23才隔一天又发布了紧急安全更新1.0.24版,囧。
这次最大参数的变动,对于大文件的支持改为默认支持,没有啥必要就不要管他了。

--with-largefile
取消。
变更为:
--disable-largefile

但是这个参数是取消大文件的支持,呵呵。

需要mysql的支持,前置准备。

# yum install mysql-server.x86_64 mysql-devel.x86_64 pam-devel.x86_64
# cd /usr/lib64
# ln -s /usr/lib64/mysql/libmysqlclient.so

使用下面的参数进行编译

./configure \
--prefix=/opt/pureftpd \
--with-mysql \
--with-paranoidmsg \
--with-capabilities \
--with-privsep \
--with-pam \
--with-puredb \
--with-sendfile \
--with-altlog \
--with-cookie \
--with-diraliases \
--with-throttling \
--with-ratios \
--with-quotas \
--with-ftpwho \
--with-welcomemsg \
--with-uploadscript \
--with-peruserlimits \
--with-virtualhosts \
--with-virtualchroot \
--without-bonjour \
--with-rfc2640 \

继续
# make
# make check
# make install
# groupadd ftpusers -g 2000        //为匿名用户准备
# useradd -u 2000 -g ftpusers -s /sbin/nologin -d /var/ftp ftp       //为匿名用户准备

# chmod 755 configuration-file/pure-config.pl
# cp configuration-file/pure-config.pl /opt/pureftpd/sbin/
# mkdir /opt/pureftpd/etc/
# cp configuration-file/pure-ftpd.conf /opt/pureftpd/etc/
# cp pureftpd-mysql.conf /opt/pureftpd/etc/pureftpd-mysql.conf
# 注册为系统服务 并设置为开机启动
# cp contrib/redhat.init /etc/init.d/pureftpd
# chmod 755 /etc/init.d/pureftpd
# chown root:root /etc/init.d/pureftpd
# chkconfig --add pureftpd
# chkconfig pureftpd on

# vim /etc/init.d/pureftpd
prog=pure-config.pl
fullpath=/opt/pureftpd/sbin/$prog                  //修改
pureftpwho=/opt/pureftpd/sbin/pure-ftpwho          //修改

start() {
echo -n $"Starting $prog: "
$fullpath /opt/pureftpd/etc/pure-ftpd.conf --daemonize      //修改
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
echo
}

编辑/opt/pureftpd/sbin/pure-config.pl

# vim  /opt/pureftpd/sbin/pure-config.pl

#! /usr/bin/perl

# (C) 2001-2009 Aristotle Pagaltzis
# derived from code (C) 2001-2002 Frank Denis and Matthias Andree

use strict;

my ($conffile, @flg) = @ARGV;

my $PUREFTPD;
-x && ($PUREFTPD=$_, last) for qw(
        ${exec_prefix}/sbin/pure-ftpd
        /usr/local/pure-ftpd/sbin/pure-ftpd
        /usr/local/pureftpd/sbin/pure-ftpd
        /usr/local/sbin/pure-ftpd
        /usr/sbin/pure-ftpd
        /opt/pureftpd/sbin/pure-ftpd      //增加
);

OK搞定

php控制程序
http://machiel.generaal.net/index.php?subject=user_manager_pureftpd
附件包含程序和中文语言包

附件大小
ftp_v2.1.tar.gz97.2 KB
simplified_chinese.tar.gz1.26 KB

评论

这是非常好,而且内

这是非常好,而且内容丰富的文章中,我阅读此博客,并取得这么多的知识与到CentOS,是这么多的帮助,特别是对学生,我赞扬的精彩文章的作者,我也对博客的开发工作(pakistani issues & water war of pakistan),检查,检讨,是不是更好?