Chinaunix首页 | 论坛 | 博客
  • 博客访问: 174933
  • 博文数量: 29
  • 博客积分: 2110
  • 博客等级: 大尉
  • 技术积分: 325
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-01 11:32
文章分类

全部博文(29)

文章存档

2012年(3)

2010年(4)

2009年(5)

2007年(16)

2006年(1)

我的朋友

分类: LINUX

2007-03-26 15:16:09

    一直想在linux下把常用的服务器配置起来,最近BOSS突然想用Linux系统了,正好有实战的机会。今天先把vsftpd的安装配置文档写出来吧^_^
  
    一.软件说明:
     软件版本:vsftpd-2.0.5
     下载地址:
     操作系统版本:Linux AS U4  2.6.9-42
   二.安装说明:
     1.解压缩下载软件
       tar -zxvf vsftpd-2.0.5.tar.gz
     2.进入解压缩文件目录 vsftpd-2.0.5
       cd vsftpd-2.0.5
     3.根据INSTALL文档 step by step 安装
       This file details how to build and install / run vsftpd from the vsftpd
         distribution .tar.gz file.
         Step 1) Build vsftpd.
         Switch to the directory created when you unpacked the vsftpd .tar.gz file.
         e.g.:
         cd vsftpd-1.1.2
         edit "builddefs.h" to handle compile-time settings (tcp_wrappers build,
         etc).
         Just type "make" (and mail me to fix it if it doesn't build ;-).
         This should produce you a vsftpd binary. You can test for this, e.g.:
         [chris@localhost vsftpd]$ ls -l vsftpd
         -rwxrwxr-x    1 chris    chris       61748 Sep 27 00:26 vsftpd
         Step 2) Satisfy vsftpd pre-requisites
         2a) vsftpd needs the user "nobody" in the default configuration. Add this
         user in case it does not already exist. e.g.:
         [root@localhost root]# useradd nobody
          useradd: user nobody exists
         2b) vsftpd needs the (empty) directory /usr/share/empty in the default
         configuration. Add this directory in case it does not already exist. e.g.:
         [root@localhost root]# mkdir /usr/share/empty/
         mkdir: cannot create directory `/usr/share/empty': File exists
         2c) For anonymous FTP, you will need the user "ftp" to exist, and have a
         valid home directory (which is NOT owned or writable by the user "ftp").
         The following commands could be used to set up the user "ftp" if you do   not have one:
         [root@localhost root]# mkdir /var/ftp/
         [root@localhost root]# useradd -d /var/ftp ftp
         (the next two are useful to run even if the user "ftp" already exists).
         [root@localhost root]# chown root.root /var/ftp
         [root@localhost root]# chmod og-w /var/ftp
         Step 3) Install vsftpd config file, executable, man page, etc.
         Running "make install" will try to copy the binary, man pages, etc. to
         somewhere sensible.
         Or you might want to copy these things by hand, e.g.:
         cp vsftpd /usr/local/sbin/vsftpd
         cp vsftpd.conf.5 /usr/local/man/man5
         cp vsftpd.8 /usr/local/man/man8
#####如主机上没有man5 man8 文件夹,会提示不能安装,手动创建一下:)
     mkdir -p /usr/local/man/man5
     mkdir -p /usr/local/man/man8
         "make install" doesn't copy the sample config file. It is recommended you
do this:
         cp vsftpd.conf /etc
         Step 4) Smoke test (without an inetd).
         vsftpd can run standalone or via an inetd (such as inetd or xinetd). You  will typically get more control running vsftpd from an inetd. But first we will run
it without, so we can check things are going well so far.
         Edit /etc/vsftpd.conf, and add this line at the bottom:
         listen=YES
         This tells vsftpd it will NOT be running from inetd.
         Right, now let's try and run it!
         Log in as root.
         Make sure you are not running other FTP servers (or vsftpd will not be able to use the FTP port, 21).
         Run the binary from wherever you put it, e.g.:
         [root@localhost root]# /usr/local/sbin/vsftpd
4.编辑vsftpd.conf 配置文件
     需求:内部用户上传、下载文件,匿名用户,不需密码。
     anonymous 上传、下载、创建目录权限,删除权限无
vi vsftpd.conf
   添加如下行:
    listen=YES
    anonymous_enable=YES
    write_enable=YES
    anon_umask=077
    anon_upload_enable=YES
    anon_mkdir_write_enable=YES
    no_anon_password=YES
    connect_from_port_20=YES
5.添加上传目录:
   mkdir -p /var/ftp/upload
   chmod 777 /var/ftp/upload

 
阅读(1991) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~