<?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[yum安装vsftpd另一例]]></title> 
<author>admin &lt;admin@gsywx.com&gt;</author>
<category><![CDATA[电脑类]]></category>
<pubDate>Thu, 17 Sep 2015 06:58:26 +0000</pubDate> 
<guid>http://www.gsywx.com/read.php/.htm</guid> 
<description>
<![CDATA[ 
	使用yum安装vsftpd，打开所需的日志，并开启被动模式，脚本如下，另存为sh，直接运行即可。<br/><br/>#!/bin/bash<br/><br/>echo "--------------------------------vsftpd 自动安装脚本--------------------------------"<br/>#Disable SeLinux<br/>if [ -s /etc/selinux/config ]; then<br/>sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config<br/>fi<br/>setenforce 0<br/>yum -y install vsftpd<br/>sed -i 's#anonymous_enable=YES#anonymous_enable=NO#'&nbsp;&nbsp;/etc/vsftpd/vsftpd.conf<br/>sed -i 's&#92;xferlog_std_format=YES&#92;#xferlog_std_format=YES&#92;'&nbsp;&nbsp;/etc/vsftpd/vsftpd.conf<br/>echo "chroot_local_user=YES" >>/etc/vsftpd/vsftpd.conf<br/>echo "dual_log_enable=YES" >>/etc/vsftpd/vsftpd.conf<br/>echo "vsftpd_log_file=/var/log/vsftpd.log" >>/etc/vsftpd/vsftpd.conf<br/>echo "listen_port=21" >>/etc/vsftpd/vsftpd.conf<br/>echo "pasv_enable=YES" >>/etc/vsftpd/vsftpd.conf<br/>echo "pasv_min_port=20000" >>/etc/vsftpd/vsftpd.conf<br/>echo "pasv_max_port=20500" >>/etc/vsftpd/vsftpd.conf<br/>mkdir -p /wwwroot/htdocs<br/>groupadd www<br/>useradd www -g www -d /wwwroot/htdocs -s /sbin/nologin<br/>passwd www<br/>chown www.www /wwwroot/htdocs<br/>chkconfig vsftpd on<br/>service vsftpd start<br/>echo "--------------------------------vsftpd 安装说明------------------------------------"<br/>echo "&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;"<br/>echo "&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用户为 www 密码为刚才所设 FTP根目录为/wwwroot/htdocs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;"<br/>echo "&#124; 新增用户样例为(新增用户ktm):useradd ktm -g www -d /wwwroot/ktm -s /sbin/nologin&nbsp;&nbsp;&#124;"<br/>echo "&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service vsftpd restart&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;"<br/>echo "&#124;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#124;"<br/>echo "--------------------------------vsftpd 安装结束!-----------------------------------"<br/>sleep 2<br/><br/>防火墙就不直接更改了，注意另外打开端口20000-20050即可<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[[评论] yum安装vsftpd另一例]]></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>