linux服务器安装:VSFTPd自架Linux网络安装服务器来源: 发布时间:星期四, 2009年2月12日 浏览:35次 评论:0
约定: 1本帖操作环境是Redhat 9.0,vsFTPd版本是Redhat 9.0所带vsftpd-1.1.3-8.i386.rpm在安装盘第 3张中 2vsFTPd实现最基本目:用系统中存在真实用户能登入FTP能用匿名访问 3本帖中vsFTPd运行模式是在standalone模式下运行也就是说本帖中vsFTPd所有功能都是在standalone模式下运行至于有些功能是否能在xinetd模式下运行您就得测试了不能照搬照抄有些功能是必须运行在特定模式下 3IP和和DNS设定 第块网卡 IP:192.168.0.1 子掩码:255.255.255.0 网关不设置: 第 2块网卡: IP:192.168.0.2 子掩码:255.255.255.0 网关不设置 我操作环境是个小型局域网所以其它机器IP都是在192.168.0这个网段上ADSL是接在第个网卡上服务器第 2个网卡是接集线器其它客户机都是接在集线器上为了能让ADSL访问ernet自己手动设置了IP所以DNS也要自己来设置DNS如下: 202.96.134.133 202.96.168.68 设置工具是: [root@sir001 root]# redhat-config-network 相应参考资料:vsFTPd官方文档: http://www.sir.com/bbs/showthr...;threadid=43451 用vsFTPd来架设FTP服务器vsFTPd服务器是目前最好FTP服务器软件Software优点是体积小可定制强效率高 1查看是否安装了vsFTPd软件Software [root@linuxsir001 root]# rpm -qa | grep vsftpd 如果没有任何显示介绍说明没有把vsFTPd安装上如果出现是下面这样提示就证明已经安装上了 [root@linuxsir001 root]# rpm -qa | grep vsftpd vsftpd-1.1.3-8 我以Redhat 9.0以其自带vsFTPd包vsftpd-1.1.3-8版本来为本帖约定 [root@linuxsir001 root]# rpm -ivh vsftpd*.rpm 2打开vsFTPd服务器 [root@linuxsir001 root]# ntsysv 把vsftpd服务器打开也就是在运行 ntsysv命令后把vsftpd服务选中 [*] vsftpd 3运行/etc/init.d/vsftpd start [root@linuxsir001 root]# /etc/init.d/vsftpd start 为 vsftpd 启动 vsftpd: [ 确定 ] [root@linuxsir001 root]# 4配制vsFTPdvsFTPd运行有两种模式种是standalone "initd"模式另外种是xinetd模式上面我们所说就是standalone "initd"运行模式两种模式运行机制不是相同stardard initd模式适合专业FTP且FTP总是直有人访问占用资源也是比较大如果您FTP总是有人访问和登入就要用这种模式如果您FTP访问人数比较小建议您用xinetd模式xinetd模式是当用户请求时vsFTPd才会启动 区别环境当然得用区别启动模式 如果想了解更多请在本帖后面跟帖我会慢慢补充xinetd模式以及虚拟用户如何设置方面问题 1]我们主要把vsFTPd配制文件改下就行了配制文件在/etc/vsftpd/vsftpd.conf用您喜欢编辑器打开请参考下面配制文件 # Example config file /etc/vsftpd.conf # # The default compiled in tings are very paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # # Allow anonymous FTP? anonymous_enable=YES # # Uncomment this to allow local users to log in. local_enable=YES # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # your users expect that (022 is used by most other ftpd's) local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This _disibledevent=> # # Uncomment this you want the anonymous FTP user to be able to create # directories. #anon_mkdir_write_enable=YES # # Activate directory messages - messages given to remote users when they # go o a certain directory. dirmessage_enable=YES # # Activate logging of uploads/downloads. xferlog_enable=YES # # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES # # If you want, you can arrange for uploaded anonymous files to be owned by # a dferent user. Note! Using "root" for uploaded files is not # recommended! #chown_uploads=YES #chown_username=whoever # # You may override where the log file goes you like. The default is shown # below. #xferlog_file=/var/log/vsftpd.log # # If you want, you can have your log file in standard ftpd xferlog format xferlog_std_format=YES # # You may change the default value for timing out an idle session. #idle_session_timeout=600 # # You may change the default value for timing out a data connection. #data_connection_timeout=120 # # It is recommended that you _disibledevent=> # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients. #async_abor_enable=YES # # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn _disibledevent=> #ascii_download_enable=YES # # You may fully customise the login banner : #ftpd_banner=Welcome to blah FTP service. # # You may specy a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd.banned_emails # # You may specy an explicit list of local users to chroot to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot. #chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd.chroot_list # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O _disibledevent=> pam_service_name=vsftpd userlist_enable=YES #enable for standalone mode listen=YES tcp_wrappers=YES 2]更改完配制文件后我们可以用下面命令来重启vsFTPd服务器 [root@linuxsir001 root]# /etc/init.d/vsftpd restart 关闭 vsftpd: [ 确定 ] 为 vsftpd 启动 vsftpd: [ 确定 ] [root@linuxsir001 root]# 3]以匿名方式来访问测试在text模式下: 注意:在text模式下要用用户名ftp密码ftp来访问这才是在text中匿名访问FTP看如下操作: [root@linuxsir001 root]# ftp 192.168.0.1 Connected to 192.168.0.1. 220 (vsFTPd 1.1.3) 530 Please login with USER and PASS. 530 Please login 0
相关文章读者评论发表评论 |