<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[歌声与微笑]]></title> 
<link>http://www.gsywx.com/index.php</link> 
<description><![CDATA[歌声与微笑]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[歌声与微笑]]></copyright>
<item>
<link>http://www.gsywx.com/read.php/.htm</link>
<title><![CDATA[vsftpd2.3.4 源码安装脚本]]></title> 
<author>admin &lt;admin@gsywx.com&gt;</author>
<category><![CDATA[电脑类]]></category>
<pubDate>Fri, 01 Apr 2011 13:06:16 +0000</pubDate> 
<guid>http://www.gsywx.com/read.php/.htm</guid> 
<description>
<![CDATA[ 
	本内容为原创内容，转载请注明：<br/>本文来自http://blog.gsywx.com<br/><br/><a href="attachment.php?fid=47">点击这里下载文件</a><br/><br/><br/>本安装为vsftpd2.3.4源码包安装，安装环境为centos5.5 32位，安装过程中创建ftp用户为：www，密码为：123654，并打开日志，日志为：/var/log/vsftpd.log 和 ：/var/log/xferlog<br/><br/>下面为安装脚本，也可以直接下载附件包上传后进行安装。<br/><br/><div class="code"><br/>#!/bin/bash<br/>clear<br/>echo &quot;----------------源码安装vsftpd安装程序，按任意键继续----------------&quot;&nbsp;&nbsp;<br/>get_char()<br/>&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;SAVEDSTTY=`stty -g`<br/>&nbsp;&nbsp;stty -echo<br/>&nbsp;&nbsp;stty cbreak<br/>&nbsp;&nbsp;dd if=/dev/tty bs=1 count=1 2&gt; /dev/null<br/>&nbsp;&nbsp;stty -raw<br/>&nbsp;&nbsp;stty echo<br/>&nbsp;&nbsp;stty $SAVEDSTTY<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;echo &quot;&quot;<br/>&nbsp;&nbsp;echo &quot;本安装为本地用户登录FTP，并开启日志，请按任意键继续......&quot;<br/>&nbsp;&nbsp;char=`get_char`<br/><br/>mkdir -p /usr/local/man/man8/<br/>mkdir -p /usr/local/man/man5/<br/><br/>tar zxvf vsftpd-2.3.4.tar.gz <br/>cd vsftpd-2.3.4<br/>make<br/>make install<br/><br/>cp vsftpd.conf /etc/<br/>#touch /etc/vsftpd.chroot_list<br/>touch /etc/ftpusers<br/>cat &gt;&gt;/etc/ftpusers&lt;&lt;EOF<br/>root<br/>bin<br/>daemon<br/>adm<br/>lp<br/>sync<br/>shutdown<br/>halt<br/>mail<br/>news<br/>uucp<br/>operator<br/>games<br/>nobody<br/>mysql<br/>EOF<br/><br/>touch /var/log/vsftpd.log<br/>cp RedHat/vsftpd.pam /etc/pam.d/vsftpd<br/>cp ../vsftpd /etc/rc.d/init.d/<br/>chmod 755 /etc/rc.d/init.d/vsftpd<br/>chkconfig --add vsftpd<br/>chkconfig&nbsp;&nbsp;vsftpd on<br/><br/>sed -i &#039;s#anonymous_enable=YES#anonymous_enable=NO#&#039;&nbsp;&nbsp;/etc/vsftpd.conf<br/>sed -i &#039;s&#92;#local_enable=YES&#92;local_enable=YES&#92;g&#039;&nbsp;&nbsp;/etc/vsftpd.conf<br/>sed -i &#039;s&#92;#write_enable=YES&#92;write_enable=YES&#92;g&#039;&nbsp;&nbsp;/etc/vsftpd.conf<br/>sed -i &#039;s&#92;#local_umask=022&#92;local_umask=022&#92;g&#039;&nbsp;&nbsp;/etc/vsftpd.conf<br/>sed -i &#039;s&#92;#ftpd_banner=Welcome to blah FTP service.&#92;ftpd_banner=Welcome to xiaoyuwxzs FTP service.&#92;g&#039; /etc/vsftpd.conf<br/>sed -i &#039;s&#92;dirmessage_enable=YES&#92;#dirmessage_enable=YES&#92;g&#039; /etc/vsftpd.conf<br/>sed -i &#039;s&#92;xferlog_enable=YES&#92;#xferlog_enable=YES&#92;g&#039; /etc/vsftpd.conf<br/>echo &quot;dual_log_enable=YES&quot; &gt;&gt;/etc/vsftpd.conf<br/>echo &quot;vsftpd_log_file=/var/log/vsftpd.log&quot; &gt;&gt;/etc/vsftpd.conf<br/>sed -i &#039;s&#92;connect_from_port_20=YES&#92;#connect_from_port_20=YES&#92;g&#039; /etc/vsftpd.conf<br/>echo &quot;pam_service_name=vsftpd&quot; &gt;&gt;/etc/vsftpd.conf<br/>echo &quot;chroot_local_user=YES&quot; &gt;&gt;/etc/vsftpd.conf<br/>echo &quot;增加www用户组，并增加www用户，www家目录设为/home/wwwroot/&quot;<br/>sleep2 <br/>groupadd www<br/>useradd www -g www -d /home/wwwroot/ -s /sbin/nologin<br/>echo &quot;123654&quot; &#124; passwd --stdin www<br/>chown www.www /home/wwwroot/<br/>service vsftpd start<br/>sleep 1<br/>echo &quot;删除安装临时文件..............&quot;<br/>rm -Rf vsftpd-2.3.4<br/>echo <br/>echo<br/>echo &quot; ------------------- 如需增加新用户，请使用以下命令 -------------------&quot;<br/>echo &quot;&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;useradd 用户名 -g 用户组 -d 用户家目录 -s /sbin/nologin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&quot;<br/>echo &quot;&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如需禁用用户，增加用户名到 /etc/ftpusers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;&quot;<br/>sleep 1 <br/>echo &quot; -------------------------- vsftpd 安装结束! --------------------------&quot;<br/>echo <br/></div><br/>Tags - <a href="http://www.gsywx.com/go.php/tags/vsftpd/" rel="tag">vsftpd</a>
]]>
</description>
</item><item>
<link>http://www.gsywx.com/read.php/.htm#blogcomment</link>
<title><![CDATA[[评论] vsftpd2.3.4 源码安装脚本]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.gsywx.com/read.php/.htm#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>