<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>零下足迹</title>
	<atom:link href="http://www.5013.org/feed" rel="self" type="application/rss+xml" />
	<link>http://www.5013.org</link>
	<description>朝着黑暗的方向，在黎明中前行……</description>
	<lastBuildDate>Fri, 11 May 2012 04:57:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Another app is currently holding the yum lock;</title>
		<link>http://www.5013.org/archives/356</link>
		<comments>http://www.5013.org/archives/356#comments</comments>
		<pubDate>Fri, 11 May 2012 04:57:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux杂项 | Linux Other]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=356</guid>
		<description><![CDATA[yum被锁定无法使用的解决办法]]></description>
			<content:encoded><![CDATA[<p>yum被锁定无法使用，症状信息截图如下：<br />
<a href="http://www.5013.org/wp-content/uploads/2012/05/yum-error.png"><img src="http://www.5013.org/wp-content/uploads/2012/05/yum-error.png" alt="" title="yum-error" width="650" height="456" class="aligncenter size-full wp-image-357" /></a><br />
解决方法：<br />
rm -rf /var/run/yum.pid 来强行解除锁定，然后你的yum就可以运行了</p>
<p>转自：http://m114.org/system/linux/another-app-is-currently-holding-the-yum-lock-waiting-for-it-to-exit.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/356/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZBlog编辑器出现后门文件影响网站安全</title>
		<link>http://www.5013.org/archives/354</link>
		<comments>http://www.5013.org/archives/354#comments</comments>
		<pubDate>Thu, 23 Feb 2012 03:51:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[工作相关 | Work-related]]></category>
		<category><![CDATA[spellchecker]]></category>
		<category><![CDATA[ZBlog]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=354</guid>
		<description><![CDATA[近日，公司某服务器出现安全问题，部门网站首页出现被挂链接的情况，检查的最终结果出自于Zblog，在此记录下，如果有用Zblog用来做网站的朋友也可以检查下是否存在这问题；]]></description>
			<content:encoded><![CDATA[<p>近日，公司某服务器出现安全问题，部门网站首页出现被挂链接的情况，检查的最终结果出自于Zblog，在此记录下，如果有用Zblog用来做网站的朋友也可以检查下是否存在这问题；<br />
安全隐患文件：<br />
ADMIN\FCKeditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.php<br />
删除掉spellchecker.php即可解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/354/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pptpd一键安装包两分钟助你畅游互联网</title>
		<link>http://www.5013.org/archives/351</link>
		<comments>http://www.5013.org/archives/351#comments</comments>
		<pubDate>Wed, 22 Feb 2012 07:35:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux杂项 | Linux Other]]></category>
		<category><![CDATA[pptpd]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=351</guid>
		<description><![CDATA[一键安装PPTP,简单设置畅游互联网。]]></description>
			<content:encoded><![CDATA[<p>安装方法非常简单，参照下面的步骤一步一步跟着做就好了。</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p351code1'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3511"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p351code1"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.suoyine.com<span style="color: #000000; font-weight: bold;">/</span>down<span style="color: #000000; font-weight: bold;">/</span>pptpd.sh
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x pptpd.sh
.<span style="color: #000000; font-weight: bold;">/</span>pptpd.sh</pre></td></tr></table></div>

<p>整个过程只需2分钟，安装完成后VPN帐号是vpn，密码随机生成。</p>
<p>去掉PPTP加密方法:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p351code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3512"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p351code2"><pre class="bash" style="font-family:monospace;">require-mschap-v2
require-mppe-<span style="color: #000000;">128</span></pre></td></tr></table></div>

<p>运行vi /etc/ppp/options.pptpd把上面的这2行去掉即可</p>
<p>添加VPN用户命令如下<br />
echo ‘username pptpd password *’ >> /etc/ppp/chap-secrets</p>
<p>删除VPN用户命令如下<br />
sed -i ‘/^username\ /d’ /etc/ppp/chap-secrets</p>
<p>修改VPN用户密码<br />
sed -i -e ‘s/^\(username pptpd \).*\( \*\)$/\1newpassword\2/g’ /etc/ppp/chap-secrets</p>
<p>编辑VPN用户修改文件<br />
vi /etc/ppp/chap-secrets</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/351/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dedecms各种数字统计SQL语句，包括评论条数，总文档数等</title>
		<link>http://www.5013.org/archives/348</link>
		<comments>http://www.5013.org/archives/348#comments</comments>
		<pubDate>Sun, 29 Jan 2012 03:56:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[建站手记 | Notes Jianzhan]]></category>
		<category><![CDATA[DEDECMS]]></category>
		<category><![CDATA[统计]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=348</guid>
		<description><![CDATA[Dedecms技巧：dedecms各种数字统计SQL语句，今日更新：多少篇，共有图集：多少个，共有软件：多少个，共有多少文档。]]></description>
			<content:encoded><![CDATA[<p>Dedecms技巧：dedecms各种数字统计SQL语句，今日更新：多少篇，共有图集：多少个，共有软件：多少个，共有多少文档</p>
<p>共有评论：多少条<br />
{dede:SQL SQL=”select count(ID) as c from dede_feedback”}·共有评论：[field:c /]条{/dede:SQL}<br />
<span id="more-348"></span><br />
共有会员：多少名<br />
{dede:SQL SQL=”select count(ID) as c from dede_member “}·共有会员：[field:c /]名{/dede:SQL}</p>
<p>文章阅读：多少人次<br />
{dede:SQL SQL=”select sum(click) as c from dede_archives”}文章阅读：[field:c /]人次{/dede:SQL}</p>
<p>今日更新：多少篇<br />
{dede:SQL SQL=”SELECT count( ID ) AS c FROM dede_archives WHERE pubdate > UNIX_TIMESTAMP( CURDATE( ) ) “}今日更新：[field:c /]篇{/dede:SQL}</p>
<p>共有图集：多少个<br />
{dede:SQL SQL=”select count(ID) as c from dede_archives where channel=2&#8243;}·共有图集：[field:c /]个{/dede:SQL}</p>
<p>共有软件：多少个<br />
{dede:SQL SQL=”select count(ID) as c from dede_archives where channel=3&#8243;}·共有软件：[field:c /]个{/dede:SQL}<br />
统计某个栏目下所有文档总数<br />
{dede:SQL SQL=”select count(ID) as c from dede_archives where typid=1&#8243;}·共有文章：[field:c / /]篇{/dede:SQL}</p>
<p>其中的typeid替换成需要统计的栏目id</p>
<p>转载自：http://www.lianghou.com/post/6.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/348/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DEDECMS安全设置指南</title>
		<link>http://www.5013.org/archives/346</link>
		<comments>http://www.5013.org/archives/346#comments</comments>
		<pubDate>Thu, 26 Jan 2012 11:50:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[建站手记 | Notes Jianzhan]]></category>
		<category><![CDATA[DEDECMS]]></category>
		<category><![CDATA[安全设置]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=346</guid>
		<description><![CDATA[DEDECMS 这名词细想起来，我还是有一份特殊的感情的，当初做网站的时候，最早用的动易CMS2006，后来转PHP后，一直用的DEDECMS，只是现今不在用了而已，可以说，它造就了很多中小站长，是中小站长的福音。
下面就DEDECMS的安全设置，简单记录下。]]></description>
			<content:encoded><![CDATA[<p>DEDECMS 这名词细想起来，我还是有一份特殊的感情的，当初做网站的时候，最早用的动易CMS2006，后来转PHP后，一直用的DEDECMS，只是现今不在用了而已，可以说，它造就了很多中小站长，是中小站长的福音。<br />
<span id="more-346"></span><br />
下面就DEDECMS的安全设置，简单记录下。<br />
1、尽量使用纯PHP的主机空间，如果非要使用WINDOWS，最好关闭非所有PHP支持；<br />
2、更改默认的www.xxx.com/dede/类管理地址；<br />
3、给默认的admin管理帐号分配没有权限的用户组；<br />
4、data/common.inc.php文件属性（Linux/Unix）设置为644或（Windows NT）设置为只读；<br />
5、Linux主机针对uploads、data、templets 三个目录做执行php脚本限制；WINDOWS取消这三个目录的脚本运行权限；<br />
6、及时关注官方补丁并及时打上补丁；<br />
7、非必要，请关闭会员系统并删除member文件夹，实在要用一定要设置 是否允许会员上传非图片附件 设置为否 对用户进行严格限制；</p>
<p>下面介绍下如何针对uploads、data、templets做PHP脚本限制：<br />
对uploads、data、templets 三个目录做执行php脚本限制，就算被上传了木马文件到这些文件夹，也是无法运行的所以这一步很重要一定要设置。<br />
在配置前需要确认你的空间是否支持.htaccess和rewrite，该方法基于.htaccess文件中使用rewrite来达到禁止指定脚本的运行效果。</p>
<p>Apache环境规则内容如下：Apache执行php脚本限制 把这些规则添加到.htaccess文件中</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p346code3'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3463"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p346code3"><pre class="bash" style="font-family:monospace;">RewriteEngine on RewriteCond <span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">!</span>^$
RewriteRule uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #7a0874; font-weight: bold;">&#40;</span>php<span style="color: #7a0874; font-weight: bold;">&#41;</span>$ – <span style="color: #7a0874; font-weight: bold;">&#91;</span>F<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteRule data<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #7a0874; font-weight: bold;">&#40;</span>php<span style="color: #7a0874; font-weight: bold;">&#41;</span>$ – <span style="color: #7a0874; font-weight: bold;">&#91;</span>F<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteRule templets<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #7a0874; font-weight: bold;">&#40;</span>php<span style="color: #7a0874; font-weight: bold;">&#41;</span>$ –<span style="color: #7a0874; font-weight: bold;">&#91;</span>F<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

<p>nginx环境规则内容如下：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p346code4'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3464"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p346code4"><pre class="bash" style="font-family:monospace;">location ~ <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>data<span style="color: #000000; font-weight: bold;">|</span>uploads<span style="color: #000000; font-weight: bold;">|</span>templets<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>\.<span style="color: #7a0874; font-weight: bold;">&#40;</span>php<span style="color: #000000; font-weight: bold;">|</span>php5<span style="color: #7a0874; font-weight: bold;">&#41;</span>?$ <span style="color: #7a0874; font-weight: bold;">&#123;</span>
deny all;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>DEDE官方针对安全也专门发表了一篇文章，大家可以去搜搜看看；</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/346/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>godaddy 新注册优惠码 godaddy续费优惠码</title>
		<link>http://www.5013.org/archives/341</link>
		<comments>http://www.5013.org/archives/341#comments</comments>
		<pubDate>Sat, 17 Dec 2011 14:53:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[建站手记 | Notes Jianzhan]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[优惠码]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=341</guid>
		<description><![CDATA[godaddy 新注册优惠码 godaddy 续费优惠码]]></description>
			<content:encoded><![CDATA[<p>今儿给一朋友注册域名，在网络上找了半天的优惠码，终于找到了，发帖记录下：</p>
<p>    <strong>godaddy 新注册优惠码：</strong><br />
    godaddy .net域名优惠码 net优惠码：cjctld749   ，7.49美元/年，长期有效<br />
    godaddy .org域名优惠码 org优惠码：cjctld749 ，7.49美元/年，长期有效。<br />
    godaddy .biz域名优惠码 biz优惠码：cjctld749 ，7.49美元/年，长期有效<br />
<span id="more-341"></span><br />
    <strong>godaddy 续费优惠码：</strong><br />
    godaddy com域名续费优惠码：OK412 7.48美元+0.18美元税<br />
    Godaddy net域名续费优惠码： gdbb776 7.5 美元+0.18美元税<br />
    Godaddy .org 续费优惠码：SCAM14 7.49美元+0.18美元税<br />
    godaddy info续费优惠码：GDBBREN8 Info域名续费$6.99  有效期：未知</p>
<p>    <strong>godaddy 大单优惠码说明：</strong><br />
    100美元或者以上，使用gdz127dc  优惠30%<br />
    90美元或者以上，使用gdz127cc  优惠20%<br />
    70美元或者以上，使用gdz127bc  优惠15%</p>
<p>    <strong>综合型godaddy 优惠码 ：</strong><br />
    购买任意型号虚拟主机优惠20%，优惠码：cjcshare20<br />
    购买任意型号VPS主机优惠20%，优惠码：cjcvps20<br />
    购买任意型号独立服务器优惠20%，优惠码：cjcded20<br />
    购买任意非域名产品优惠10%，优惠码：cjcsave10<br />
    一次购买不少于30美元非域名产品优惠5美元，优惠码：ggndeal01<br />
    一次购买不少于50美元非域名产品优惠10美元，优惠码：ggndeal02<br />
    一次购买不少于100美元非域名产品优惠20美元，优惠码：cjc20hun</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/341/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux让程序后台运行命令之screen与nohup</title>
		<link>http://www.5013.org/archives/338</link>
		<comments>http://www.5013.org/archives/338#comments</comments>
		<pubDate>Sat, 29 Oct 2011 03:27:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux杂项 | Linux Other]]></category>
		<category><![CDATA[nohup]]></category>
		<category><![CDATA[screen]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=338</guid>
		<description><![CDATA[很多朋友可能在实际的linux服务器管理工作中，经常会为一些长时间运行的任务而头疼，当有事离开我们关掉了连接终端断开SSH后，刚才运行着的程序也自动被中断。下面就介绍下如何让我们的程序在断开SSH后继续在后行运行的方法。]]></description>
			<content:encoded><![CDATA[<p>很多朋友可能在实际的linux服务器管理工作中，经常会为一些长时间运行的任务而头疼，当有事离开我们关掉了连接终端断开SSH后，刚才运行着的程序也自动被中断。下面就介绍下如何让我们的程序在断开SSH后继续在后行运行的方法。<br />
一、使用nohup让程序在后台继续运行<br />
常用命令：nohup ./home/nginx.sh &#038;<br />
* 如果运行成功刚默认会将标准输出重定向到当前目录的nohup.out文件中，查看此文件，可以了解运行的进度；</p>
<p>二、使用screen让程序在后台执行<br />
screen是一个可以在多个进程之间多路利用一个物理终端的窗口管理器。Screen中有会话的概念，用户可以在一个screen会话中创建多个screen窗口，在每一个screen窗口中就像操作一个真实的telnet/SSH连接窗口那样。<span id="more-338"></span><br />
1、安装screen<br />
yum install screen<br />
2、创建screen会话<br />
screen -S wordname<br />
3、暂时离开，保留screen会话中的任务或程序<br />
当需要临时离开时（会话中的程序不会关闭，仍在运行）可以用快捷键Ctrl+a d(即按住Ctrl，依次再按a,d)<br />
4、恢复screen会话<br />
当回来时可以再执行执行：screen -r wordname 即可恢复到离开前创建的lnmp会话的工作界面。<br />
如果忘记或者刚开始没有指定会话名，执行screen -ls列出当前的会话列表；</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p338code5'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3385"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p338code5"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>LF ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># screen -ls</span>
There are screens on:
         <span style="color: #000000;">12738</span>.wordname    <span style="color: #7a0874; font-weight: bold;">&#40;</span>Detached<span style="color: #7a0874; font-weight: bold;">&#41;</span>
         <span style="color: #000000;">12839</span>.hte1           <span style="color: #7a0874; font-weight: bold;">&#40;</span>Detached<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000;">2</span> Sockets <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>screen<span style="color: #000000; font-weight: bold;">/</span>S-root</pre></td></tr></table></div>

<p>12738.wordname即为即才screen创建的会话，恢复回话：screen -r 12738<br />
5、关闭screen会话<br />
执行:exit<br />
6、远程演示<br />
首先在服务器上执行screen -S test创建一个screen的会话，观众可以链接到 远程服务器执行screen -x test 这样观众的屏幕上就会出现和演示者同步的内容。<br />
7、常用的快捷键<br />
Ctrl + a c  在当前screen会话中创建窗口<br />
Ctrl + a w 窗口列表<br />
Ctrl + a n 下一个窗口<br />
Ctrl + a p 上一个窗口<br />
Ctrl + a 0-9 在第0个窗口和第9个窗口之间切换</p>
<p>摘取于：http://www.vpser.net/manage/screen.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/338/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>利用Linux自带的iptables工具减缓CC攻击</title>
		<link>http://www.5013.org/archives/336</link>
		<comments>http://www.5013.org/archives/336#comments</comments>
		<pubDate>Sun, 25 Sep 2011 13:34:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[系统安全 | System Security]]></category>
		<category><![CDATA[CC攻击]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=336</guid>
		<description><![CDATA[CC攻击和DDOS攻击可以说是攻击中最没有技术含量的了，但是，也是最让人郁闷的，软硬不吃。借用无意中看到一个BLOG所说的思路，利用iptables减缓CC攻击有一定的效果。]]></description>
			<content:encoded><![CDATA[<p>CC攻击和DDOS攻击可以说是攻击中最没有技术含量的了，但是，也是最让人郁闷的，软硬不吃。借用无意中看到一个BLOG所说的思路，利用iptables减缓CC攻击有一定的效果。<br />
首先：得安装iptables<br />
yum install iptables<br />
然后：设置规则：<br />
iptables -I INPUT -p tcp –dport 80 -m connlimit –connlimit-above <span style="color: #ff0000;">10</span> -j DROP<br />
参数：10  代表只允许同一IP只能开10线程，多余丢弃。参数可以根据CC攻击的量大量小来灵活调整。<br />
最后：iptables-save > /etc/noddos</p>
<p>记得在/etc/rc.local里输入<br />
iptables-restore /etc/noddos</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/336/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下mysql忘记root密码的简单解决办法</title>
		<link>http://www.5013.org/archives/334</link>
		<comments>http://www.5013.org/archives/334#comments</comments>
		<pubDate>Wed, 07 Sep 2011 23:03:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux杂项 | Linux Other]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=334</guid>
		<description><![CDATA[在密码多如牛毛的今天，很多时候，管理员会出现忘记各种各样的密码，针对mysql中root密码的忘记情况，可以采用以下步骤重新设置root管理密码。]]></description>
			<content:encoded><![CDATA[<p>在密码多如牛毛的今天，很多时候，管理员会出现忘记各种各样的密码，针对mysql中root密码的忘记情况，可以采用以下步骤重新设置root管理密码。<br />
1、修改mysql的配置文件：<br />
#vi /etc/my.cnf<br />
在[mysqld]中加上一句：skip-grant-tables<br />
保存退出；<br />
<span id="more-334"></span><br />
2、重新启动mysql<br />
# /etc/init.d/mysql restart</p>
<p>3、登录并修改mysql的root密码<br />
#/usr/local/mysql/bin/mysql<br />
mysql>use mysql;<br />
mysql>UPDATE user SET Password = password ( &#8216;you-passwd&#8217; ) WHERE User = &#8216;root&#8217;;<br />
mysql>flush privileges;<br />
mysql>quit</p>
<p>4、将第一步修改的my.conf修改回来<br />
# vi /etc/my.cnf<br />
将刚才在[mysqld]的段中加上的skip-grant-tables删除，保存退出；</p>
<p>5、重新启动mysql即可</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/334/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>分享：snmp一键安装脚本</title>
		<link>http://www.5013.org/archives/331</link>
		<comments>http://www.5013.org/archives/331#comments</comments>
		<pubDate>Fri, 02 Sep 2011 04:44:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[系统监控 | Nagios Cacti]]></category>
		<category><![CDATA[snmpd]]></category>

		<guid isPermaLink="false">http://www.5013.org/?p=331</guid>
		<description><![CDATA[傻瓜式安装snmpd]]></description>
			<content:encoded><![CDATA[<p>1、新建snmp.sh，输入以下代码：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p331code6'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3316"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code" id="p331code6"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;
####################################################
#                                                  #
# This is a Shell-Based tool of SNMP installation  #
#                                                  #
####################################################
&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Command is running, please wait.....&quot;</span>
yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> gcc-c++ openssl openssl-devel
<span style="color: #007800;">myusername</span>=<span style="color: #ff0000;">&quot;yishanhome&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Please Your UserName:&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;(Default : yishanhome):&quot;</span> myusername
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$myusername</span>&quot;</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">myusername</span>=<span style="color: #ff0000;">&quot;yishanhome&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">myuserpws</span>=<span style="color: #ff0000;">&quot;yishanpws&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Please input myuserpws(Less than 8 characters):&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;(Default UserPassword: yishanpws):&quot;</span> myuserpws
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$myuserpws</span>&quot;</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">myuserpws</span>=<span style="color: #ff0000;">&quot;yishanpws&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">myip</span>=<span style="color: #ff0000;">&quot;60.195.249.83&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Please input Authorized IP:&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;(Default Authorized IP: 60.195.249.83):&quot;</span> myip
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$myip</span>&quot;</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">myip</span>=<span style="color: #ff0000;">&quot;60.195.249.83&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">clear</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>lnmpsh.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>net-snmp-5.6.1.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf  net-snmp-5.6.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> net-snmp-5.6.1
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>snmp <span style="color: #660033;">--with-openssl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--with-mib-modules</span>=ucd-snmp<span style="color: #000000; font-weight: bold;">/</span>diskio
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;rouser <span style="color: #007800;">$myusername</span> auth&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;createUser <span style="color: #007800;">$myusername</span> MD5 <span style="color: #007800;">$myuserpws</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>snmpd.conf
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> eth0 <span style="color: #660033;">-p</span> udp <span style="color: #660033;">-s</span> <span style="color: #007800;">$myip</span> <span style="color: #660033;">--dport</span> <span style="color: #000000;">161</span> <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>snmp<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>snmpd
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Your Authorized UserName:<span style="color: #007800;">$myusername</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Your Authorized Password:<span style="color: #007800;">$myuserpws</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Your Authorized IP:<span style="color: #007800;">$myip</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;/usr/local/snmp/sbin/snmpd&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.local</pre></td></tr></table></div>

<p>执行并进行相关设置：<br />
chmod 777 snmp.sh<br />
./snmp.sh</p>
<p>代码转载于：http://www.yishanhome.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.5013.org/archives/331/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

