免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 964 | 回复: 0
打印 上一主题 下一主题

Debian下手动编译安装pure-ftpd [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-30 14:00 |只看该作者 |倒序浏览
先从
pure-ftpd
网站上下载软件包,格式为tar.gz或tar.bz2,以pure-ftpd-1.0.21.tar.gz版本为例.

debian:/# tar -zxvf pure-ftpd-1.0.21.tar.gz           #在软件包所在目录下解压软件包.
debian:/# cd pure-ftpd-1.0.21                         #进入解压后的目录.
debian:/# ./configure --prefix=/usr/local/pureftpd    #指定安装路径.debian:/# make                                        #编译文件.
debian:/# make install                                #编译文件后安装.
debian:/# cd /pure-ftpd-1.0.21/configuration-file     #进入configuration-file目录
debian:/# cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl #复制文件
debian:/# cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf  #复制文件
debian:/# mkdir /etc/rc.boot                         #新建rc.boot目录
debian:/# touch /etc/rc.boot/pureftpd.sh             #新建pureftpd.sh文件   
debian:/# cat /etc/rc.boot/pureftpd.sh               #添加以下内容.
#!/bin/sh
/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf

debian:/# chmod 755 /etc/rc.boot/pureftpd.sh                    #增加文件可执行权限.
debian:/# ln -s /etc/rc.boot/pureftpd.sh /etc/rc2.d/S88pureftpd #加入开机启动.
debian:/# ./etc/rc.boot/pureftpd.sh                             #执行文件或重启都行!


pure-ftpd日志记录设置/var/log/pureftpd.log

1)建立文件/var/log/pureftpd.log
2)修改/etc/rsyslog.conf

1>在这行的cron.none后面添加 ;ftp.none 使ftp的日志信息成私有
*.info;mail.none;authpriv.none;cron.none /var/log/messages

*.info;mail.none;authpriv.none;cron.none;ftp.none    /var/log/messages
2>在/etc/rsyslog.conf文件最后加上
#pureftp日志
ftp.* -/var/log/pureftpd.log
注意: 不要去掉/var前面的-号,否则日志会在/var/log/messages与/var/log/purefpd.log里各记录一份. 添加了-号,就只会记录在/var/log/purefptd.log内
3)使/etc/rsyslog.conf生效
[test@www.cnscn.org ]# killall -HUP syslogd
到现在设置完毕,重启下pure-ftpd,现在在客户端登陆ftp试下
=============[附我的rsyslog.conf]==========================
#*.=info;*.=notice;*.=warn;\
        auth,authpriv.none;\
        cron,daemon.none;\
        mail,news.none;ftp.none -/var/log/messages
#
# Emergencies are sent to everybody logged in.
#
*.emerg                         *
#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
#       news.=crit;news.=err;news.=notice;\
#       *.=debug;*.=info;\
#       *.=notice;*.=warn       /dev/tty8
# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
#
#    $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
#      busy site..
#
daemon.*;mail.*;\
        news.err;\
        *.=debug;*.=info;\
        *.=notice;*.=warn       |/dev/xconsole
#pure-ftpd log
ftp.*                         -/var/log/pureftpd.log


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/59646/showart_1915199.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP