文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>在RHEL5下以xinetd的方式启动vsftpd

在RHEL5下以xinetd的方式启动vsftpd

时间:2010-08-16  来源:flycentos

在RHEL5下以xinetd的方式启动vsftpd

首先配置vsftp,在配置之前呢,肯定是要先安装VSFTP软件包的。安装方式RPM方式,YUM方式随便你自己咯。那个方便用哪个。我比较喜欢偷懒我就用了YUM方式。

  第一步:先安装软件按包:

[root@rhca /]# yum install vsftpd-*  -y    

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package vsftpd.i386 0:2.0.5-16.el5_4.1 set to be updated

--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================

 Package                    Arch                     Version                               Repository                   Size

=============================================================================================================================

Updating:

 vsftpd   i386   2.0.5-16.el5_4.1                updates                     140 k

2      查看vsftpd安装包 #rrpm -ql vsftpd 这里我价格管道过滤一下,只看有用的部分。
[root@rhca ~]# rpm -ql vsftpd | grep xinetd  

/usr/share/doc/vsftpd-2.0.5/EXAMPLE/INTERNET_SITE/vsftpd.xinetd

/usr/share/doc/vsftpd-2.0.5/EXAMPLE/INTERNET_SITE/vsftpd.xinetd.dir

/usr/share/doc/vsftpd-2.0.5/vsftpd.xinetd

3   修改/etc/vsftpd/vsftpd.conf  下的linsten=YES 改为listen=NO,关闭独立模式启动,

 

大约在109行把 listen=YES改成listen=NO或者直接用#注释掉。我就直接注释掉了。

默认 tcp_wrappers=YES ,支持xinetd方式启动。

4 复制 /usr/share/doc/vsftpd-2.0.5/vsftpd.xinetd 到 /etc/xinetd.d/

#cp  /usr/share/doc/vsftpd-2.0.5/vsftpd.xinetd  /etc/xinetd.d/vsftpd

5 编辑 /etc/xinetd.d/vsftpd

# default: off

# description: The vsftpd FTP server serves FTP connections. It uses \

#       normal, unencrypted usernames and passwords for authentication.

service ftp

{

        socket_type              = stream

        wait                     = no

        user                     = root

        server                   = /usr/sbin/vsftpd

        server_args               = /etc/vsftpd/vsftpd.conf

        nice                     = 10

        disable                  = no

        flags                    = IPv4

        access_times             = 9:00-18:30  ;限制访问时间
        only_from               =192.168.1.211 ;限制访问地址
        no_access               = 1.1.1.1     ;拒绝访问
}

更多选项可以man  /etc/xinetd.conf

6 重新启动xinetd服务  service xinetd restart

7 查看ftp :netstat  -an |grep  :21
其实还可以通过 /etc/hosts.allow 和 /etc/hosts.deny 来限制客户端对ftp的访问。

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载