<?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>Herbert Yang &#187; Linux</title>
	<atom:link href="http://www.herbertyang.com/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.herbertyang.com</link>
	<description></description>
	<lastBuildDate>Wed, 13 Jul 2011 07:02:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>世界上的开源许可证</title>
		<link>http://www.herbertyang.com/2011/05/03/the-world-of-open-source-licenses.html</link>
		<comments>http://www.herbertyang.com/2011/05/03/the-world-of-open-source-licenses.html#comments</comments>
		<pubDate>Tue, 03 May 2011 02:14:26 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=711</guid>
		<description><![CDATA[世界上的开源许可证，大概有上百种。很少有人搞得清楚它们的区别。用一个简单的决策树图来告诉你如何选择开源许可证。]]></description>
			<content:encoded><![CDATA[<p>世界上的开源许可证，大概有上百种。很少有人搞得清楚它们的区别。用一个简单的决策树图来告诉你如何选择开源许可证。<br />
<a href="http://www.herbertyang.com/wp-content/uploads/2011/05/free_software_licenses.jpg"><img class="alignleft size-large wp-image-715" title="free_software_licenses" src="http://www.herbertyang.com/wp-content/uploads/2011/05/free_software_licenses-1024x640.jpg" alt="" width="574" height="358" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2011/05/03/the-world-of-open-source-licenses.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>脚步清理memcached缓存</title>
		<link>http://www.herbertyang.com/2011/03/22/clear-memcached-cache-footsteps.html</link>
		<comments>http://www.herbertyang.com/2011/03/22/clear-memcached-cache-footsteps.html#comments</comments>
		<pubDate>Tue, 22 Mar 2011 09:50:30 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://herbertyang.gotoip55.com/herbertyang/?p=708</guid>
		<description><![CDATA[printf "flush_all\r\nquit\r\n" &#124;nc afs-3.photo.163.org 11211]]></description>
			<content:encoded><![CDATA[<p><code>printf "flush_all\r\nquit\r\n" |nc afs-3.photo.163.org 11211</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2011/03/22/clear-memcached-cache-footsteps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu系统内核出错后修复</title>
		<link>http://www.herbertyang.com/2010/12/11/ubuntu-kernel-fix-mistakes.html</link>
		<comments>http://www.herbertyang.com/2010/12/11/ubuntu-kernel-fix-mistakes.html#comments</comments>
		<pubDate>Sat, 11 Dec 2010 07:25:03 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=687</guid>
		<description><![CDATA[这样的情况一般发生在系统升级时，编译了新的内核时出错导致的。 我由于一时手贱，在升级内核的时候，关闭了机器，导致系统无法系统，这时该怎么办能，想了好些办法，都由于种种原因失败了，不过最后更改了内核后，成功启动。 1、如果你启动系统时，可以看到GRUB的内核列表，选择一个老一点的列表进入系统，然后重新升级系统可以搞定。 2、如果1方法无效，此时需要LiveCD（安装光盘） 光盘启动系统 提升权限 “sudo -i” 使用查看磁盘“ fdisk -l”命令，得到root 和 boot的磁盘。（我自己的电脑把boot分区独立了出来） 挂靠磁盘 mkdir /mnt/newroot mount /dev/sda1/ /mnt/newroot mount /dev/sda5/ /mnt/newroot/boot chroot /mnt/newroot 最后，更改启动内核 update-initramfs -u -k 2.6.32-25-generic OK，重启就可以进入系统了。]]></description>
			<content:encoded><![CDATA[<p>这样的情况一般发生在系统升级时，编译了新的内核时出错导致的。<br />
我由于一时手贱，在升级内核的时候，关闭了机器，导致系统无法系统，这时该怎么办能，想了好些办法，都由于种种原因失败了，不过最后更改了内核后，成功启动。</p>
<p>1、如果你启动系统时，可以看到GRUB的内核列表，选择一个老一点的列表进入系统，然后重新升级系统可以搞定。</p>
<p>2、如果1方法无效，此时需要LiveCD（安装光盘）</p>
<ul>
<li>光盘启动系统</li>
<li>提升权限 “sudo -i”</li>
<li>使用查看磁盘“ fdisk -l”命令，得到root 和 boot的磁盘。（我自己的电脑把boot分区独立了出来）</li>
<li>挂靠磁盘
<pre class="brush: bash; title: ;">

mkdir /mnt/newroot

mount /dev/sda1/ /mnt/newroot

mount /dev/sda5/ /mnt/newroot/boot

chroot /mnt/newroot
</pre>
</li>
<li>最后，更改启动内核
<pre class="brush: bash; title: ;">

update-initramfs -u -k 2.6.32-25-generic
</pre>
</li>
</ul>
<p>OK，重启就可以进入系统了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/12/11/ubuntu-kernel-fix-mistakes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu报boot空间不足怎么办？</title>
		<link>http://www.herbertyang.com/2010/11/07/ubuntu-boot-space-reported-how-to-do.html</link>
		<comments>http://www.herbertyang.com/2010/11/07/ubuntu-boot-space-reported-how-to-do.html#comments</comments>
		<pubDate>Sun, 07 Nov 2010 11:56:00 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=676</guid>
		<description><![CDATA[Ubuntu升级N次后，更新了多次内核，最近一次更新完后，系统就报“boot空间不足”的警告。 如何解决这个问题呢？ 首先备份/boot目录下initrd.img-* 和 vmlinuz-*文件，然后在把最高版本的两个文件移回/boot目录，最后运行命令 sudo update-grub 就可以了]]></description>
			<content:encoded><![CDATA[<p>Ubuntu升级N次后，更新了多次内核，最近一次更新完后，系统就报“boot空间不足”的警告。<br />
如何解决这个问题呢？<br />
首先备份/boot目录下initrd.img-* 和 vmlinuz-*文件，然后在把最高版本的两个文件移回/boot目录，最后运行命令 </p>
<pre class="brush: bash; title: ;">sudo update-grub</pre>
<p>就可以了</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/11/07/ubuntu-boot-space-reported-how-to-do.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>把wordpress搬到nginx环境</title>
		<link>http://www.herbertyang.com/2010/09/09/moved-to-wordpress-nginx-environment.html</link>
		<comments>http://www.herbertyang.com/2010/09/09/moved-to-wordpress-nginx-environment.html#comments</comments>
		<pubDate>Thu, 09 Sep 2010 14:38:11 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=634</guid>
		<description><![CDATA[这次并不是换了博客的宿主，而是更换了博客的主机（VPS）。换到国外的服务器去了，虽然响应时间慢了点，但整体的速度要比以前的虚拟主机要快。 这次搬家的过程中，碰到了些容易出现的问题。 比如MySQL数据库的编码问题，这个配置MySQL的时候，要注意增加配置 [client] default-character-set = utf8 [mysqld] default-character-set = utf8 下面的这些语句可能对你有用： alter database blog character set utf8; create database mydb character set utf-8; SHOW VARIABLES LIKE 'character_set_%'; SHOW VARIABLES LIKE 'collation_%'; 当然在配置Nginx上也要注意一个地方，这样就支持了wordpress的伪静态 log_format main '$remote_addr - $remote_user [$time_local] &#34;$request&#34; ' '$status $body_bytes_sent &#34;$http_referer&#34; ' '&#34;$http_user_agent&#34; &#34;$http_x_forwarded_for&#34;'; server { listen 80; server_name www.herbertyang.com; access_log logs/blog.access.log]]></description>
			<content:encoded><![CDATA[<p>这次并不是换了博客的宿主，而是更换了博客的主机（VPS）。换到国外的服务器去了，虽然响应时间慢了点，但整体的速度要比以前的虚拟主机要快。</p>
<p>这次搬家的过程中，碰到了些容易出现的问题。</p>
<p>比如MySQL数据库的编码问题，这个配置MySQL的时候，要注意增加配置</p>
<pre class="brush: bash; title: ;">

[client]
 default-character-set = utf8

[mysqld]
 default-character-set = utf8
</pre>
<p>下面的这些语句可能对你有用：</p>
<pre class="brush: sql; title: ;">
alter database blog character set utf8;
create database mydb character set utf-8;

SHOW VARIABLES LIKE 'character_set_%';
SHOW VARIABLES LIKE 'collation_%';
</pre>
<p>当然在配置Nginx上也要注意一个地方，这样就支持了wordpress的伪静态</p>
<pre class="brush: bash; title: ;">
    log_format  main  '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '
                      '$status $body_bytes_sent &quot;$http_referer&quot; '
                      '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';
    server {
        listen       80;
        server_name  www.herbertyang.com;
        access_log  logs/blog.access.log  main;
        location / {
	    add_header Content-Type &quot;text/html; charset=UTF-8&quot;;
            add_header Content-Encoding &quot;gzip&quot;;
	    try_files $uri $uri/ /index.php?q=$uri&amp;$args;
            root   /home/app/phproot/wordpress;
            index  index.php index.html index.htm;
        }
	location ~* \.(jpg|jpeg|png|gif|css|js|swf|mp3|avi|flv|xml|zip|rar)$ {
		expires 30d;
        	gzip on;
       		gzip_types  text/plain application/x-javascript text/css application/xml;
		root   /home/app/phproot/wordpress;
	}
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/app/phproot/wordpress$fastcgi_script_name;
            include        fastcgi_params;
        }
        location ~ /\.ht {
           deny  all;
        }
    }
</pre>
<p>最后也把Wordpress加上了Memcached，速度还是快了一点，响应的速度有点慢，不过感觉流畅很多。</p>
<p>参考网址：<br />
<a href="http://blog.s135.com/nginx_php_v6/" target="_blank">http://blog.s135.com/nginx_php_v6/</a><br />
<a href="http://www.23day.com/html/22890.html" target="_blank">http://www.23day.com/html/22890.html</a><br />
<a href="http://www.nonabyte.net/nginx-wordpress-rewrite/" target="_blank">http://www.nonabyte.net/nginx-wordpress-rewrite/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/09/09/moved-to-wordpress-nginx-environment.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ubuntu字符集/SVN UP的字符问题</title>
		<link>http://www.herbertyang.com/2010/09/08/ubuntu-character-set-svn-up-characters-problem.html</link>
		<comments>http://www.herbertyang.com/2010/09/08/ubuntu-character-set-svn-up-characters-problem.html#comments</comments>
		<pubDate>Wed, 08 Sep 2010 04:45:51 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=622</guid>
		<description><![CDATA[首先利用命令 cat /usr/share/i18n/SUPPORTED 找到自己需要的字符集 然后找到文件 /var/lib/locales/supported.d/zh 很有可能你没有这个文件，可以创建一个，然后在文件里增加你需要的字符集 zh_CN.GBK GBK zh_CN.UTF-8 UTF-8 zh_CN GB2312 zh_HK.UTF-8 UTF-8 最后就 sudo locale-gen #或者 dpkg-reconfigure 还要记得修改用户的配置，增加用户使用的字符集 export TZ='Asia/Shanghai' export LANG=zh_CN.UTF-8 如果是Windows下的话，还需要修改SSH客户端的字符编码。]]></description>
			<content:encoded><![CDATA[<p>首先利用命令</p>
<pre class="brush: bash; title: ;">cat /usr/share/i18n/SUPPORTED</pre>
<p>找到自己需要的字符集<br />
然后找到文件<br />
/var/lib/locales/supported.d/zh<br />
很有可能你没有这个文件，可以创建一个，然后在文件里增加你需要的字符集<br />
<code><br />
zh_CN.GBK GBK<br />
zh_CN.UTF-8 UTF-8<br />
zh_CN GB2312<br />
zh_HK.UTF-8 UTF-8<br />
</code><br />
最后就 </p>
<pre class="brush: bash; title: ;">
sudo locale-gen
#或者
dpkg-reconfigure
</pre>
<p>还要记得修改用户的配置，增加用户使用的字符集</p>
<pre class="brush: bash; title: ;">
export TZ='Asia/Shanghai'
export LANG=zh_CN.UTF-8
</pre>
<p>如果是Windows下的话，还需要修改SSH客户端的字符编码。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/09/08/ubuntu-character-set-svn-up-characters-problem.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>删除过期账号实例</title>
		<link>http://www.herbertyang.com/2010/04/07/delete-expired-accounts-examples.html</link>
		<comments>http://www.herbertyang.com/2010/04/07/delete-expired-accounts-examples.html#comments</comments>
		<pubDate>Wed, 07 Apr 2010 10:04:09 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=509</guid>
		<description><![CDATA[1、导出一个注册用户表的用户名数据 2、导出最近一年登陆的用户名数据 比较两个文件的差异 grep -wvFf file1.txt file1.txt //存在于file2文件中，但不存在于file1文件的行 替换每行的后缀 sed -ie 's/@xxx$/@xxx.com/' xxx.txt 查找文件某行数据 sed -n '3457,1p' xxx.txt]]></description>
			<content:encoded><![CDATA[<p>1、导出一个注册用户表的用户名数据</p>
<p>2、导出最近一年登陆的用户名数据</p>
<p>比较两个文件的差异</p>
<pre class="brush: bash; title: ;">grep -wvFf file1.txt file1.txt</pre>
<p>  //存在于file2文件中，但不存在于file1文件的行</p>
<p>替换每行的后缀</p>
<pre class="brush: bash; title: ;">sed -ie 's/@xxx$/@xxx.com/' xxx.txt</pre>
<p>查找文件某行数据</p>
<pre class="brush: bash; title: ;">sed -n '3457,1p' xxx.txt</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/04/07/delete-expired-accounts-examples.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在SecureCRT中配置Omnitty界面</title>
		<link>http://www.herbertyang.com/2010/03/19/configure-omnitty-interface-in-securecrt.html</link>
		<comments>http://www.herbertyang.com/2010/03/19/configure-omnitty-interface-in-securecrt.html#comments</comments>
		<pubDate>Fri, 19 Mar 2010 06:17:26 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SecureCRT]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=496</guid>
		<description><![CDATA[在Terminal->Emulation中的选项 Terminal:Xterm 选中ANSI Color 选中Select an alternate keyboard emulation 而且选中Xterm 在Terminal->Apperarance中的选项 Normal Fonts：vt100 12pt character encoding:OEM 参考：http://www.cnblogs.com/yechuan/archive/2009/03/05/1215454.html 我下载过上面这个页面的字体，不知道是我设置来Xterm 正常的，还是因为这个字体。大家要多实验几次。 出现乱了的界面，我猜是字体宽度的原因，根据这个思路去解决问题。可以缩小字体，我后来 Normal Fonts：vt100 10pt character encoding:GB2312]]></description>
			<content:encoded><![CDATA[<p>在Terminal->Emulation中的选项<br />
Terminal:Xterm<br />
选中ANSI Color<br />
选中Select an alternate keyboard emulation 而且选中Xterm</p>
<p>在Terminal->Apperarance中的选项<br />
Normal Fonts：vt100 12pt<br />
character encoding:OEM</p>
<p>参考：http://www.cnblogs.com/yechuan/archive/2009/03/05/1215454.html</p>
<p>我下载过上面这个页面的字体，不知道是我设置来Xterm  正常的，还是因为这个字体。大家要多实验几次。</p>
<p>出现乱了的界面，我猜是字体宽度的原因，根据这个思路去解决问题。可以缩小字体，我后来</p>
<p>Normal Fonts：vt100 10pt<br />
character encoding:GB2312</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/03/19/configure-omnitty-interface-in-securecrt.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu安装MySQL</title>
		<link>http://www.herbertyang.com/2010/01/07/ubuntu-install-mysql.html</link>
		<comments>http://www.herbertyang.com/2010/01/07/ubuntu-install-mysql.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 06:02:23 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=490</guid>
		<description><![CDATA[好久没写日志了，前段时间，域名没有备案，封掉了。 Ubuntu安装MySQL很方便，直接运行 sudo apt-get install mysql-server 就可以了。 但如果要MySQL能够外部访问的话，要做下修改。 登录MySQL mysql -u root -p 授予需要外部访问的IP或者用户的权限 GRANT ALL PRIVILEGES ON *.* TO shishuo@'%' IDENTIFIED BY &#34;shishuopassword&#34;; 其中 *.* 表示 数据库.表，你可以写为 shishuo.* 如： GRANT ALL PRIVILEGES ON shishuodatabase.* TO shishuo@'%' IDENTIFIED BY &#34;shishuopassword&#34;; 这条语句的意思就是，shishuo这个用户可以在任何IP下，用 shishuopassword 密码，访问shishuodatabase数据库，并具有对shishuodatabase的所有权限。 然后 vi /etc/mysql/my.cnf 修改 bind-address = 127.0.0.1 为 #bind-address = 127.0.0.1 重启]]></description>
			<content:encoded><![CDATA[<p>好久没写日志了，前段时间，域名没有备案，封掉了。</p>
<p>Ubuntu安装MySQL很方便，直接运行</p>
<pre class="brush: bash; title: ;">sudo apt-get install mysql-server</pre>
<p>就可以了。</p>
<p>但如果要MySQL能够外部访问的话，要做下修改。<br />
登录MySQL</p>
<pre class="brush: bash; title: ;">mysql -u root -p</pre>
<p>授予需要外部访问的IP或者用户的权限</p>
<pre class="brush: sql; title: ;">GRANT ALL PRIVILEGES ON *.* TO shishuo@'%' IDENTIFIED BY &quot;shishuopassword&quot;; </pre>
<p>其中 *.* 表示 数据库.表，你可以写为 shishuo.*<br />
如：</p>
<pre class="brush: sql; title: ;">GRANT ALL PRIVILEGES ON shishuodatabase.* TO shishuo@'%' IDENTIFIED BY &quot;shishuopassword&quot;; </pre>
<p>这条语句的意思就是，shishuo这个用户可以在任何IP下，用 shishuopassword 密码，访问shishuodatabase数据库，并具有对shishuodatabase的所有权限。</p>
<p>然后</p>
<pre class="brush: bash; title: ;">vi /etc/mysql/my.cnf</pre>
<p>修改<br />
bind-address = 127.0.0.1<br />
为<br />
#bind-address = 127.0.0.1</p>
<p>重启</p>
<pre class="brush: bash; title: ;">/etc/init.d/mysql restart</pre>
<p>这样外部也能访问了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2010/01/07/ubuntu-install-mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解读Nginx的Memcached Module</title>
		<link>http://www.herbertyang.com/2009/12/01/nginx-http-memcached-module.html</link>
		<comments>http://www.herbertyang.com/2009/12/01/nginx-http-memcached-module.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 16:57:49 +0000</pubDate>
		<dc:creator>Herbert</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.herbertyang.com/?p=469</guid>
		<description><![CDATA[发现SyntaxHighlighter这个代码高亮插件有点问题，所以还是发个文件地址吧。 ng_http_memcached_module.c]]></description>
			<content:encoded><![CDATA[<p>发现SyntaxHighlighter这个代码高亮插件有点问题，所以还是发个文件地址吧。<br />
<a href='http://www.herbertyang.com/wp-content/uploads/2009/12/ng_http_memcached_module.c.txt'>ng_http_memcached_module.c</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.herbertyang.com/2009/12/01/nginx-http-memcached-module.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

