一 安装proftpd软件
下载后到你所下载的目录中这里以Download文件夹为例;
使用命令:
cp proftpd-1.3.0.tar.bz2 /home/temp //将源文件复制到home文件夹中工作
然后解压缩该temp 用命令:
tar vxf proftpd-1.3.0.tar.bz2
得到一个叫 proftpd-1.3.0 然后换个简单的名字用命令:
mv proftpd-1.3.0 proftpd
然后进入该目录工作用命令:
cd proftpd
这个时候你可以打开文件INSTALL看一下他的安装说明,其实其中已经很详细的说了怎样安装了。我只是翻译了一下而已
然后设置一下配置文件用命令:(注意该步骤很重要不然你需要手工转移)
./configure --prefix=/usr --sysconfdir=/etc // 配置安装到/usr 配置文件放到 // /etc下
然后编译安装用2条命令:
make
make install
好了将该软件安装好了;为了验证是否安装好你 可以看到 /usr/sbin/proftpd 了,而在/etc下也会有proftpd.conf这个主配置文件 。如果有说明好了如果没有可以重来
二 配置该软件
进到目录 etc/里用命令:
cd /etc
打开配置文件proftpd.conf用命令:
vim 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.
ServerType standalone
DefaultServer on
Port 21
# from being group and world writable.
Umask 022
RequireValidShell off
#Serverldent off
# 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
User nobody
Group nobody //该处原本是nogroup你需要该成nobody因为这里没有这个组
# directory, uncomment this line.
#DefaultRoot ~
AllowOverwrite on
<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
<Limit READE>
AllowALL
</Limit>
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
MaxClients 10
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
#Serverldent off
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
AllowAll
</Limit>
</Anonymous>
相关解释我就不说了。因为上面带有“#”的行都是对下面的解释。相信懂英文的都知道了。好啦配置好了。接下来需要打开服务用命令:
/etc/rc.d/init.d/proftpd start
这个时候你可以看到确定两个字说明已经启动了。但是当你用命令:ftp 你自己的IP时你用户名是 ftp 密码是ftp 你会发现它报告错误说没有给匿名用户权限。请注意:以下配置
你需要将/etc/passwd中的用户名为ftp的目录改为/home/ftp ,并在/home 下创建一个文件夹ftp用命令:
好了你现在可以在你自己的机子上测试了,可以用用户名和密码都为 ftp 你可以看到你提示说你被授权(Anonymous access granted, restrictions apply)好了配置成功了!
未知 2007-11-10