- 浏览: 389655 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
iris_1992:
2005年以前,国外开原报表完全碾压国产软件,但是现在国内软件 ...
JasperReport报表设计总结(一)(已完毕) -
水土第一:
在flash显示jasperprintlist的时候,根据下面 ...
JasperReport报表设计总结(三)(已完毕) -
水土第一:
结构分的很清晰。。。加上applet与jasper的东西就更完 ...
JasperReport报表设计总结(三)(已完毕) -
水土第一:
windowshead 写道import cn.com.rea ...
JasperReport报表设计总结(二)(已完毕) -
zwj1533:
下载的附件服务解压!
JasperReport报表设计总结(一)(已完毕)
1、下载proftpd. 地址为: http://proftpd.org
2、编译安装
./configure --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql --with-includes=/usr/local/mysql/include/mysql --with-libraries=/usr/local/mysql/lib/mysql --enable-ctrls --enable-nls --enable-shadow --enable-dso --enable-autoshadow --enable-auth-pam make make install
proftpd默认安装在/usr/local/sbin中,若需要换目录,则在编译时候指定 --prefix=/usr/local/proftpd
3、配置mysql
(1)修改配置,centos中默认mysql的配置地点在/etc/my.cnf,可以加上指定编码为UTF-8
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 character-set-server=UTF8 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [mysql] default-character-set=UTF8
(2)启动数据库
(3)修改数据库ROOT密码
mysqladmin -uroot password 'password' --'password'为你想指定的密码
(4)创建数据库及增加用户
mysql -uroot -ppassword
create database proftpd default charset UTF8; grant all privileges on proftpd.* to proftpd@localhost identified by 'proftpd'
(5)增加数据库表
CREATE TABLE `ftpuser` ( `userid` text NOT NULL, `passwd` text NOT NULL, `uid` int(11) NOT NULL, `gid` int(11) NOT NULL, `homedir` text, `shell` text, `count` int(11) NOT NULL DEFAULT '0', `accessed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' ) CREATE TABLE `ftpgroup` ( `groupname` text NOT NULL, `gid` smallint(6) NOT NULL, `members` text NOT NULL ) CREATE TABLE `quotalimits` ( `quota_name` varchar(30) DEFAULT NULL, `quota_type` enum('user','group','class','all') NOT NULL, `per_session` enum('false','true') NOT NULL, `limit_type` enum('soft','hard') NOT NULL, `bytes_in_avail` float NOT NULL, `bytes_out_avail` float NOT NULL, `bytes_xfer_avail` float NOT NULL, `files_in_avail` int(10) unsigned NOT NULL, `files_out_avail` int(10) unsigned NOT NULL, `files_xfer_avail` int(10) unsigned NOT NULL ) CREATE TABLE `quotatallies` ( `quota_name` varchar(30) NOT NULL, `quota_type` enum('user','group','class','all') NOT NULL, `bytes_in_used` float NOT NULL, `bytes_out_used` float NOT NULL, `bytes_xfer_used` float NOT NULL, `files_in_used` int(10) unsigned NOT NULL, `files_out_used` int(10) unsigned NOT NULL, `files_xfer_used` int(10) unsigned NOT NULL )
4、配置/usr/local/etc/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 "FTP Server in HK" ServerType standalone DefaultServer on # Port 21 is the standard FTP port. Port 21 #UseEncoding UTF-8 GBK # 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 ftpUser Group ftpGroup # 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 # Bar use of SITE CHMOD by default <Limit SITE_CHMOD> DenyAll </Limit> # A basic anonymous configuration, no upload directories. If you do not # want anonymous users, simply delete this entire <Anonymous> section. #<Anonymous ~ftp> # 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 # <Limit WRITE> # DenyAll # </Limit> #</Anonymous> QuotaEngine on QuotaDirectoryTally on QuotaDisplayUnits "Kb" QuotaLog "/usr/local/proftpd/var/quota" QuotaShowQuotas on SQLNamedQuery get-quota-limit SELECT "quota_name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes _xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM quotalimits WHERE quota_name = '%{0}' AND quota_type = '% {1}'" SQLNamedQuery get-quota-tally SELECT "quota_name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM quotatallies WHERE quota_name = '%{0}' AND quota_type = '%{1}'" SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_ xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_ used = files_xfer_used + %{5} WHERE quota_name = '%{6}' AND quota_type = '%{7}'" quotatallies SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies QuotaLimitTable sql:/get-quota-limit QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally SQLConnectInfo proftpd@localhost:3366 proftpd proftpd SQLAuthTypes Backend Plaintext SQLUserInfo ftpuser userid passwd uid gid homedir shell SQLGroupInfo ftpgroup groupname gid members RequireValidShell off SQLAuthenticate users groups usersetfast groupsetfast CreateHome on SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser SQLLog STOR,DELE modified SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser DeferWelcome on RootLogin off
6、创建FTP用的用户和群组,在配置文件中使用的。
groupadd –g 2012 ftpGroup useradd –u 2012 –g ftpGroup –d /data ftpUser
7、插入用户至数据库表中(这是实际使用当中的FTP账号)
INSERT INTO `proftpd`.`ftpuser` (`userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`, `count`, `accessed`, `modified`) VALUES ( 'proftpd', password('proftpd'), 2012, 2012, '/data/ftp/proftpd', '/bin/nologin', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00' ); INSERT INTO `proftpd`.`ftpgroup` (`groupname`, `gid`, `members`) VALUES ( 'ftpGroup', 2012, 'ftpUsers' );
8、启动mysql,proftpd
/etc/init.d/mysqld start /usr/local/sbin/proftpd
9、其它
(1)如何将proftpd加入到服务当中
a. 复制源文件中 contrib/dist/rpm/proftpd.init.d 至 /etc/init.d中
b. 编辑 /etc/init.d/functions中,在path后面加上 /usr/local/sbin
c. 编辑 /etc/init.d/proftpd, 改其中 为 [ -x /usr/local/sbin/proftpd ] || exit 5
d. 将proftpd改为可执行
chmod +x /etc/init.d/proftpd
e. 添加服务
chkconfig --level 35 proftpd on chkconfig --add proftpd
(2)从外面访问不到,要注意防火墙的问题,编辑 /etc/sysconfig/iptables, 是里面加入
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
重新启动
/etc/init.d/iptables restart
(3)如果通过ssh访问的时候,有乱码,可以编辑 /etc/sysconfig/i18n
LANG="zh_CN.UTF-8" SUPPORTED="zh_CN:zh_CN.UTF-8:zh_CN.GBK:zh:en_US.UTF-8:en_US:en" SYSFONT="latarcyrheb-sun16"
(4)对于用户上传下载数量的限制,通过quota来实现,在quota*表中插入数据,具体可以GOOGLE
备注:
1、在/etc/hosts是一定要对于主机名绑定IP,否则无法启动。
如: 127.0.0.1 ftpServer
2、mysql devel必须要安装上,否则无法编译proftpd
3、FTP下的目录的用户与群组必须与创建的对应上。
# chown -R ftpUser:ftpGroup /data/
发表评论
-
基于模板生成的CENTOS网卡无法启动问题
2013-07-29 14:26 1094在vmware虚拟环境中,基于模板生成的centos,如果 ... -
rsync配置
2013-04-17 18:52 23191、通过yum安装 2、确认是否安装了xinetd,未安装 ... -
Samba服务器配置
2012-12-11 12:55 10771、通过Yum安装Samba2、在Service中设置为自启 ... -
CENTOS升级带来的问题
2012-06-07 12:50 923YUM升级了一下系统,结果,怎么也无法启动proftpd服务了 ... -
vnc服务开机启动
2011-10-10 15:11 2003Linux系统开机启动。 1、编辑/etc/sysconfi ... -
CentOS静态IP设置
2011-10-10 14:52 1390出现CentOS服务器启动后,仍然无法ping通的情况,原因在 ... -
Redmine安装
2011-09-29 13:36 1802安装ruby yum install ruby. ... -
linux kmplayer字幕乱码解决
2009-12-29 13:51 3497kmplayer号称是linux下的万能的影音播放器(注意,此 ... -
非常好的Linux知识网站
2009-12-28 17:06 1081ArchLinux : http://wiki.archl ... -
ThinkPad X61安装Cent OS 5.4
2009-12-28 16:49 12491、网卡问题 安装完后,系统可以找到wlan0,但是无法 ... -
为x86_64的CentOS5.4、Redhat5.4添加Fusion
2009-12-28 16:06 1371简单点,直接在线添加。 若为32位系统,直接将x86_64替 ... -
最简单的CentOS中播放音乐的方法
2009-12-28 16:01 1893通过反复的研究,总结的最简单的CentOS播放网页音乐的方法: ... -
CentOS5.4中Firefox播放音乐
2009-12-10 14:06 1507在CentOS中在线听音乐,在网上搜索了半天,都无果,可能是因 ... -
fedora社区应当向ubuntu及windows社区学习
2007-11-18 14:35 1376在“狼人”发布后,马上下了最新的fedora core8,3. ... -
Ubuntu下共享文件夹给Windows用户
2007-11-15 22:25 9442首先当然是要安装samba了,呵呵: sudo apt-g ... -
Linux中的J2EE开发环境
2007-05-06 23:03 3595在linux中配置J2EE开发环境比起windows中复杂多了 ... -
ubuntu下的java开发环境的安装
2007-05-06 23:01 1819参照https://help.ubuntu.com/commu ... -
ubuntu 6.10下的无线网卡
2007-05-06 23:00 1694正准备进行安装无线网卡,不过竟然在ubuntu6.10下无线网 ... -
aMule在linux中的安装
2007-05-06 22:59 4303aMule安装相当困难,是笔者使Linux以来最难对付的一个工 ... -
关于linux下fdisk命令的说明
2007-05-06 22:58 3835在RHEL4中,使用bash时,如果输入fdisk查看磁盘的信 ...
相关推荐
proftpd配置[收集].pdf
提供Linux系统下proftp安装,配置。
教会你怎么利用ProFtpd服务(FTP)
proftpd + mysql + quota配置完全指南proftpd + mysql + quota配置完全指南proftpd + mysql + quota配置完全指南proftpd + mysql + quota配置完全指南
系统用户拥有ProFTPD配置文件。 node['proftpd']['conf_files_group'] 'root' 拥有ProFTPD配置文件的系统组。 node['proftpd']['conf_files_mode'] '00640' ProFTPD配置文件系统文件模式位。 node['proftpd'...
AIX_5L下proftpd安装配置手册
proftpd全称:Professional FTP daemon,是针对Wu-FTP的弱项而开发的,除了改进的安全性,还具备许多Wu-FTP没有的特点,能以Stand-alone、xinetd模式运行等。ProFTP已经成为继Wu-FTP之后最为流行的FTP服务器软件,...
压缩包,包含配置文件和安装文件(proftpd-1.3.4b.tar.gz) 不需要太多的修改,就可以完成ftp的配置。 实现:指定用户访问一个特定的目录,不允许匿名登录
proftpd服务工具,解压后进入proftpd目录,运行 sh init.sh 脚本,输入登陆FTP的密码(用户名为当前登陆的用户名,不能使用root用户)确认默认的8021端口是否被占用,如果占用,修改 etc/proftpd.conf配置里的端口号,...
centos7.9安装编proftpd,带配置文件,添加虚拟用户,配置用户目录权限
Debian 5.0 下的 proftpd + mysql虚拟用户认证配置 详细配置文档,能够正常通过mysql数据库中用户信息登录ftp服务器,测试通过!
绍Linux下proftpd的安装配置与管理方法。
它是原来世界范围使用最广泛的wu-ftpd的改进版,它修正了wu-ftpd的许多缺陷,在许多方面进行了重大的改进,其中一个重要变化就是它学习了Apache 的配置方式,使proftpd的配置和管理更加简单易懂。本文将介绍它在Red ...
1.配置FTP服务器,能够实现要求的功能; a.限制用户上传的速率为30K/s; b.限制每个IP只能用3个进程连接; c.最大支持500用户连接服务器; d.ftp用户只能上传,不能下载,不能删除,不能改名字。 e.teacher用户具有...
在登录阶段动态加载proftpd配置 用法 /etc/proftpd.conf LoadModule mod_dynamic_include.c DynamicIncludePath /etc/proftpd/%u.conf 格式规格 %u user name ( sent by 'USER' command ) 发展 # build && testing ...
proftpd1.2 linux下的ftp服务器软件,安装后可以用作ftp服务器使用,此服务器较为流行,安全性好,配置和apache的配置类似,只要更改相应的配置文件就可以进行配置
ProFTPD是一个高度可配置的FTP守护程序,用于Unix和类似Unix的操作系统。 请参阅README.ports文件,以了解有关已知或认为在其上构建和运行ProFTPD的平台的更多详细信息。 ProFTPD源自对安全和可配置FTP服务器的需求...
proftpd-1.3.7a.tar.gz安装包 。ftp服务器端程序。配置相比,vsftpd简单。 可用于linux下。
NULL 博文链接:https://lgcjava.iteye.com/blog/1992334
[root@chenghy ~]# wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4c.tar.gz [root@chenghy ~]# tar zxvf proftpd-1.3.4c.tar.gz [root@chenghy ~]# cd proftpd-1.3.4c [root@chenghy ~]# ./configure --...