<?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>Up's Blog &#187; Technologies</title>
	<atom:link href="http://www.upblog.net/category/technologies/feed" rel="self" type="application/rss+xml" />
	<link>http://www.upblog.net</link>
	<description>一个人在战斗</description>
	<lastBuildDate>Sun, 28 Mar 2010 05:10:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>搭建简单的本地DNS服务</title>
		<link>http://www.upblog.net/2009/10/how-to-local-dns-service.html</link>
		<comments>http://www.upblog.net/2009/10/how-to-local-dns-service.html#comments</comments>
		<pubDate>Sun, 18 Oct 2009 16:40:28 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=143</guid>
		<description><![CDATA[搭建本地dns解析环境，用作本地web开发调试环境 系统自带的hosts解析（/etc/hosts）不支持泛解析（*.domain.com） 安装札记 安装域名服务器bind9和相关工具 sudo aptitude install bind9 dnsutils 修改配置文件，named.conf.local是本地环境的配置文件 sudo vi /etc/bind/named.conf.local 加入 123456789zone &#34;wordpress.mu&#34; IN &#123; type master; file &#34;/etc/bind/wordpress.mu&#34;; &#125;; zone &#34;1.1.127.in-addr.arpa&#34; IN &#123; type master; file &#34;/etc/bind/wordpress.mu&#34;; &#125;; sudo vi /etc/bind/wordpress.mu 12345678910111213141516; ; BIND reverse data &#8230; <a href="http://www.upblog.net/2009/10/how-to-local-dns-service.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>搭建本地dns解析环境，用作本地web开发调试环境<br />
系统自带的hosts解析（/etc/hosts）不支持泛解析（*.domain.com）</p>
<p>安装札记</p>
<h3>安装域名服务器bind9和相关工具</h3>
<p>sudo aptitude install bind9 dnsutils</p>
<h3>修改配置文件，named.conf.local是本地环境的配置文件</h3>
<p>sudo vi /etc/bind/named.conf.local<br />
加入</p>
<div class="codecolorer-container ini vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">zone <span style="color: #933;">&quot;wordpress.mu&quot;</span> IN <span style="">&#123;</span><br />
type master<span style="color: #666666; font-style: italic;">;</span><br />
file <span style="color: #933;">&quot;/etc/bind/wordpress.mu&quot;</span><span style="color: #666666; font-style: italic;">;</span><br />
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span><br />
<br />
zone <span style="color: #933;">&quot;1.1.127.in-addr.arpa&quot;</span> IN <span style="">&#123;</span><br />
type master<span style="color: #666666; font-style: italic;">;</span><br />
file <span style="color: #933;">&quot;/etc/bind/wordpress.mu&quot;</span><span style="color: #666666; font-style: italic;">;</span><br />
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span></div></td></tr></tbody></table></div>
<p>sudo vi /etc/bind/wordpress.mu</p>
<div class="codecolorer-container ini vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">;</span><br />
<span style="color: #666666; font-style: italic;">; BIND reverse data file for local loopback interface</span><br />
<span style="color: #666666; font-style: italic;">;</span><br />
$TTL &nbsp; &nbsp;<span style="">86400</span><br />
@ &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;SOA &nbsp; &nbsp; wordpress.mu. root.localhost. <span style="">&#40;</span><br />
<span style="">1</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">; Serial</span><br />
<span style="">604800</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">; Refresh</span><br />
<span style="">86400</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">; Retry</span><br />
<span style="">2419200</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">; Expire</span><br />
<span style="">86400</span><span style="">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">; Negative Cache TTL</span><br />
<span style="color: #666666; font-style: italic;">;</span><br />
@ &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;NS &nbsp; &nbsp; &nbsp;www<br />
@ &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;A &nbsp; &nbsp; &nbsp; 127.0.0.1<br />
* &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;A &nbsp; &nbsp; &nbsp; 127.0.0.1<br />
<span style="">120</span> &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;PTR &nbsp; &nbsp; www.wordpress.mu<br />
<span style="">120</span> &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;PTR &nbsp; &nbsp; *.wordpress.mu</div></td></tr></tbody></table></div>
<h3>更改你机器的dns服务器ip</h3>
<p>sudo vi /etc/resolv.conf</p>
<div class="codecolorer-container ini vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nameserver 127.0.0.1</div></td></tr></tbody></table></div>
<h3>重启bind9服务</h3>
<p>sudo /etc/init.d/bind9 restart</p>
<h3>看看是否生效</h3>
<blockquote><p>alex@alex-laptop:~$ nslookup<br />
&gt; wordpress.mu<br />
Server:		127.0.0.1<br />
Address:	127.0.0.1#53</p>
<p>Name:	wordpress.mu<br />
Address: 127.0.0.1<br />
&gt; whatever.wordpress.mu<br />
Server:		127.0.0.1<br />
Address:	127.0.0.1#53</p>
<p>Name:	whatever.wordpress.mu<br />
Address: 127.0.0.1<br />
&gt;</p></blockquote>
<h3>完成</h3>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/10/how-to-local-dns-service.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 中文环境下中文 NetBeans 编辑器字体无 AA</title>
		<link>http://www.upblog.net/2009/07/ubuntu-%e4%b8%ad%e6%96%87%e7%8e%af%e5%a2%83%e4%b8%8b%e4%b8%ad%e6%96%87-netbeans-%e7%bc%96%e8%be%91%e5%99%a8%e5%ad%97%e4%bd%93%e6%97%a0-aa.html</link>
		<comments>http://www.upblog.net/2009/07/ubuntu-%e4%b8%ad%e6%96%87%e7%8e%af%e5%a2%83%e4%b8%8b%e4%b8%ad%e6%96%87-netbeans-%e7%bc%96%e8%be%91%e5%99%a8%e5%ad%97%e4%bd%93%e6%97%a0-aa.html#comments</comments>
		<pubDate>Sat, 11 Jul 2009 12:35:00 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=123</guid>
		<description><![CDATA[这个问题不是 JDK 中文支持的问题，JDK 中文支持问题请点这里 名词解释 AA: Anti-Aliasing 字体抗锯齿平滑技术，具体请 Google 话说以前一直用英文 Ubuntu＋英文版 NetBeans，字体用 YaHei Consolas Hybrid，AA 完全正常 最近想换到中文环境，安装了中文支持，安装了中文版 NetBeans，打开 NetBeans 后界面中文字体完全正常，但是代码编辑区域的字体没有 AA 了。 怀疑是安装中文支持时改动了字体配置，检查 /etc/fonts/conf.d 下的文件，折腾了好久都没搞定 偶然想到换回到英文 locale 试试看 切换中英文环境的方法： 菜单：系统 > 系统管理 > 语言支持，选则英文就行 再打开 NetBeans，这下又有 AA 了，而且 NetBeans 主页面也回到英文了。 &#8230; <a href="http://www.upblog.net/2009/07/ubuntu-%e4%b8%ad%e6%96%87%e7%8e%af%e5%a2%83%e4%b8%8b%e4%b8%ad%e6%96%87-netbeans-%e7%bc%96%e8%be%91%e5%99%a8%e5%ad%97%e4%bd%93%e6%97%a0-aa.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>这个问题不是 JDK 中文支持的问题，JDK 中文支持问题请<a href="http://www.upblog.net/2009/04/linux%e4%b8%8bnetbeans%e8%b0%83%e8%af%95%e7%aa%97%e5%8f%a3%e7%9a%84%e4%b9%b1%e7%a0%81%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95.html">点这里</a></p>
<p>名词解释<br />
AA: Anti-Aliasing 字体抗锯齿平滑技术，具体请 Google</p>
<p>话说以前一直用英文 Ubuntu＋英文版 NetBeans，字体用 YaHei Consolas Hybrid，AA 完全正常<br />
最近想换到中文环境，安装了中文支持，安装了中文版 NetBeans，打开 NetBeans 后界面中文字体完全正常，但是代码编辑区域的字体没有 AA 了。</p>
<p><a href="http://www.upblog.net/wp-content/uploads/2009/07/screenshot_008.png"><img src="http://www.upblog.net/wp-content/uploads/2009/07/screenshot_008.png" alt="screenshot_008" title="screenshot_008" width="420" height="153" class="alignnone size-full wp-image-124" /></a></p>
<p>怀疑是安装中文支持时改动了字体配置，检查 /etc/fonts/conf.d 下的文件，折腾了好久都没搞定</p>
<p>偶然想到换回到英文 locale 试试看</p>
<blockquote><p>切换中英文环境的方法：<br />
菜单：系统 > 系统管理 > 语言支持，选则英文就行</p></blockquote>
<p>再打开 NetBeans，这下又有 AA 了，而且 NetBeans 主页面也回到英文了。<br />
这也就是说 NetBeans 是会自动检查当前系统 locale 而决定显示的语言。同时，编辑区域的字体 AA 应该也是跟 locale 有关。</p>
<p>google 后找到指定 NetBeans locale 的办法：<br />
netbeans.conf 里 netbeans_default_options 后面加上： <code class="codecolorer text vibrant"><span class="text">--locale en_US</span></code></p>
<p>再切换 Ubuntu 中文环境，打开 NetBeans，已经是英文界面了，编辑区域字体也正常<br />
这只是临时的解决办法，期待完美解决办法</p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/07/ubuntu-%e4%b8%ad%e6%96%87%e7%8e%af%e5%a2%83%e4%b8%8b%e4%b8%ad%e6%96%87-netbeans-%e7%bc%96%e8%be%91%e5%99%a8%e5%ad%97%e4%bd%93%e6%97%a0-aa.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ssh 代理</title>
		<link>http://www.upblog.net/2009/07/ssh-prox.html</link>
		<comments>http://www.upblog.net/2009/07/ssh-prox.html#comments</comments>
		<pubDate>Sun, 05 Jul 2009 09:52:26 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=113</guid>
		<description><![CDATA[关键字：翻墙，加速，绕过封锁 如果你有ssh帐号（最好是国外的），那么你就可以打造自己专用的代理了 Windows: plink putty的一个组件 然后新建一个快捷方式，指向PLINK.EXE -C -D 127.0.0.1:7777 -N -pw SSH密码 SSH用户名@SSH的IP地址 把快捷方式的运行方式改成：最小化，好了，双击快捷方式启动PLINK，这个时候你的电脑本地回环（Loopback）已经建立起了一个Socks5代理，地址是 127.0.0.1，端口是7777 Linux: 1. linux下也可以使用plink ubuntu用户可以直接安装 1sudo apt-get install putty 安装完成后执行 1plink -C -D 127.0.0.1:7777 -N -pw 密码 用户名@服务器地址 为了使用方便，我们可以在桌面创建一个启动器，如图 命令处填 plink -C -D 127.0.0.1:7777 -N -pw &#8230; <a href="http://www.upblog.net/2009/07/ssh-prox.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>关键字：翻墙，加速，绕过封锁</p>
<p>如果你有ssh帐号（最好是国外的），那么你就可以打造自己专用的代理了</p>
<h3>Windows:</h3>
<p><a href="http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe">plink</a> putty的一个组件<br />
然后新建一个快捷方式，指向<code class="codecolorer bash vibrant"><span class="bash">PLINK.EXE <span style="color: #660033;">-C</span> <span style="color: #660033;">-D</span> 127.0.0.1:<span style="color: #000000;">7777</span> <span style="color: #660033;">-N</span> <span style="color: #660033;">-pw</span> SSH密码 SSH用户名<span style="color: #000000; font-weight: bold;">@</span>SSH的IP地址</span></code><br />
把快捷方式的运行方式改成：最小化，好了，双击快捷方式启动PLINK，这个时候你的电脑本地回环（Loopback）已经建立起了一个Socks5代理，地址是 127.0.0.1，端口是7777</p>
<h3>Linux:</h3>
<h4>1. linux下也可以使用plink</h4>
<p>ubuntu用户可以直接安装</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> putty</div></td></tr></tbody></table></div>
<p>安装完成后执行</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">plink <span style="color: #660033;">-C</span> <span style="color: #660033;">-D</span> 127.0.0.1:<span style="color: #000000;">7777</span> <span style="color: #660033;">-N</span> <span style="color: #660033;">-pw</span> 密码 用户名<span style="color: #000000; font-weight: bold;">@</span>服务器地址</div></td></tr></tbody></table></div>
<p>为了使用方便，我们可以在桌面创建一个启动器，如图<a href="http://www.upblog.net/wp-content/uploads/2009/07/screenshot_003.png"><img class="alignnone size-medium wp-image-114" title="screenshot_003" src="http://www.upblog.net/wp-content/uploads/2009/07/screenshot_003-300x166.png" alt="screenshot_003" width="300" height="166" /></a><br />
命令处填 plink -C -D 127.0.0.1:7777 -N -pw 密码 用户名@服务器地址</p>
<h4>2. 当然也可以使用系统自带的ssh</h4>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-CfNg</span> <span style="color: #660033;">-D</span> 127.0.0.1:<span style="color: #000000;">7777</span> 用户名<span style="color: #000000; font-weight: bold;">@</span>服务器地址</div></td></tr></tbody></table></div>
<h3>Mac:</h3>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-CfNg</span> <span style="color: #660033;">-D</span> 127.0.0.1:<span style="color: #000000;">7777</span> 用户名<span style="color: #000000; font-weight: bold;">@</span>服务器地址</div></td></tr></tbody></table></div>
<p>firefox设置代理（图片来自<a href="http://sprayfly.com/2009/07/05/%E5%9C%A8-linux-%E4%B8%8B%E4%BD%BF%E7%94%A8%E4%BD%A0%E7%9A%84%E7%BD%91%E7%AB%99%E4%B8%BB%E6%9C%BA%E4%BD%9C%E4%B8%BA%E5%8A%A0%E5%AF%86%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8/">Jonathan Lumb</a>）<br />
<a class="tt-flickr tt-flickr-Medium" title="firefox_proxy.png" href="http://www.flickr.com/photos/jonolumb/3689657500/"><img class="alignnone" src="http://farm3.static.flickr.com/2536/3689657500_4c7c03d871.jpg" alt="firefox_proxy.png" width="488" height="500" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/07/ssh-prox.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux系统信息查看命令大全</title>
		<link>http://www.upblog.net/2009/06/linux-sysinfo-commands.html</link>
		<comments>http://www.upblog.net/2009/06/linux-sysinfo-commands.html#comments</comments>
		<pubDate>Tue, 09 Jun 2009 03:01:10 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=99</guid>
		<description><![CDATA[版权声明：可以任意转载，但转载时必须标明原作者charlee、原始链接http://tech.idv2.com/2008/01/11/linux-sysinfo-cmds/以及本声明。 这里还有非常多的命令，可以作为参考。 系统 12345678# uname -a &#160; &#160; &#160; &#160; &#160; &#160; &#160; # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue &#160; # 查看操作系统版本 # cat /proc/cpuinfo &#160; &#160; &#160;# 查看CPU信息 # hostname &#160; &#160; &#160; &#160; &#160; &#160; &#160; # &#8230; <a href="http://www.upblog.net/2009/06/linux-sysinfo-commands.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>版权声明：可以任意转载，但转载时必须标明原作者charlee、原始链接http://tech.idv2.com/2008/01/11/linux-sysinfo-cmds/以及本声明。</em><br />
<a href="http://www.pixelbeat.org/cmdline.html">这里</a>还有非常多的命令，可以作为参考。</p>
<h3>系统</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># uname -a &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看内核/操作系统/CPU信息<br />
# head -n 1 /etc/issue &nbsp; # 查看操作系统版本<br />
# cat /proc/cpuinfo &nbsp; &nbsp; &nbsp;# 查看CPU信息<br />
# hostname &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看计算机名<br />
# lspci -tv &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 列出所有PCI设备<br />
# lsusb -tv &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 列出所有USB设备<br />
# lsmod &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 列出加载的内核模块<br />
# env &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看环境变量</div></td></tr></tbody></table></div>
<p><span id="more-99"></span></p>
<h3>资源</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># free -m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看内存使用量和交换区使用量<br />
# df -h &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看各分区使用情况<br />
# du -sh &lt;目录名&gt; &nbsp; &nbsp; &nbsp; &nbsp;# 查看指定目录的大小<br />
# grep MemTotal /proc/meminfo &nbsp; # 查看内存总量<br />
# grep MemFree /proc/meminfo &nbsp; &nbsp;# 查看空闲内存量<br />
# uptime &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看系统运行时间、用户数、负载<br />
# cat /proc/loadavg &nbsp; &nbsp; &nbsp;# 查看系统负载</div></td></tr></tbody></table></div>
<h3>磁盘和分区</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mount | column -t &nbsp; &nbsp; &nbsp;# 查看挂接的分区状态<br />
# fdisk -l &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看所有分区<br />
# swapon -s &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看所有交换分区<br />
# hdparm -i /dev/hda &nbsp; &nbsp; # 查看磁盘参数(仅适用于IDE设备)<br />
# dmesg | grep IDE &nbsp; &nbsp; &nbsp; # 查看启动时IDE设备检测状况</div></td></tr></tbody></table></div>
<h3>网络</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># ifconfig &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看所有网络接口的属性<br />
# iptables -L &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看防火墙设置<br />
# route -n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看路由表<br />
# netstat -lntp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看所有监听端口<br />
# netstat -antp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看所有已经建立的连接<br />
# netstat -s &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看网络统计信息</div></td></tr></tbody></table></div>
<h3>进程</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># ps -ef &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看所有进程<br />
# top &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 实时显示进程状态</div></td></tr></tbody></table></div>
<h3>用户</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># w &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看活动用户<br />
# id &lt;用户名&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看指定用户信息<br />
# last &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看用户登录日志<br />
# cut -d: -f1 /etc/passwd &nbsp; # 查看系统所有用户<br />
# cut -d: -f1 /etc/group &nbsp; &nbsp;# 查看系统所有组<br />
# crontab -l &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 查看当前用户的计划任务</div></td></tr></tbody></table></div>
<h3>服务</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># chkconfig --list &nbsp; &nbsp; &nbsp; # 列出所有系统服务<br />
# chkconfig --list | grep on &nbsp; &nbsp;# 列出所有启动的系统服务</div></td></tr></tbody></table></div>
<h3>程序</h3>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># rpm -qa &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# 查看所有安装的软件包</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/06/linux-sysinfo-commands.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu apache python</title>
		<link>http://www.upblog.net/2009/05/ubuntu-apache-python.html</link>
		<comments>http://www.upblog.net/2009/05/ubuntu-apache-python.html#comments</comments>
		<pubDate>Sat, 23 May 2009 18:15:59 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=84</guid>
		<description><![CDATA[安装 LAMP 1sudo tasksel install lamp-server 安装 mod_python 1sudo apt-get install libapache2-mod-python 为了开发和调试的方便，我们把apache默认目录改到我们的用户目录下 以下“你的名字”指的是你当前使用的系统用户名 如果你不清楚的话，可以执行命令 whoami 查看你当前的用户名 执行 1cd 回到你的用户目录 创建你的工作目录 1mkdir workhome 修改apache配置文件 1sudo gedit /etc/apache2/sites-available/default 把所有 /var/www 改成 /home/你的名字/workhome&#34; 在第10行左右，有 Options Indexes FollowSymLinks MultiViews 在后面加上 +ExecCGI 变成 Options &#8230; <a href="http://www.upblog.net/2009/05/ubuntu-apache-python.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>安装 LAMP</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> tasksel <span style="color: #c20cb9; font-weight: bold;">install</span> lamp-server</div></td></tr></tbody></table></div>
<p>安装 mod_python</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libapache2-mod-python</div></td></tr></tbody></table></div>
<p>为了开发和调试的方便，我们把apache默认目录改到我们的用户目录下<br />
以下“你的名字”指的是你当前使用的系统用户名<br />
如果你不清楚的话，可以执行命令 whoami 查看你当前的用户名</p>
<p>执行</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span></div></td></tr></tbody></table></div>
<p>回到你的用户目录</p>
<p>创建你的工作目录</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> workhome</div></td></tr></tbody></table></div>
<p><span id="more-84"></span><br />
修改apache配置文件</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-available<span style="color: #000000; font-weight: bold;">/</span>default</div></td></tr></tbody></table></div>
<p>把所有 <code class="codecolorer text vibrant"><span class="text">/var/www</span></code> 改成 <code class="codecolorer text vibrant"><span class="text">/home/你的名字/workhome&quot;</span></code><br />
在第10行左右，有 <code class="codecolorer text vibrant"><span class="text">Options Indexes FollowSymLinks MultiViews</span></code><br />
在后面加上 <code class="codecolorer text vibrant"><span class="text">+ExecCGI</span></code><br />
变成 <code class="codecolorer text vibrant"><span class="text">Options Indexes FollowSymLinks MultiViews +ExecCGI</span></code></p>
<p>修改apache用户及用户组</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>envvars</div></td></tr></tbody></table></div>
<p>把<code class="codecolorer text vibrant"><span class="text">www-data</span></code>改成你的名字<br />
两个都要改</p>
<p>建立mod_python配置文件</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>python.conf</div></td></tr></tbody></table></div>
<p>加入</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_python.c<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; AddType text<span style="color: #000000; font-weight: bold;">/</span>html .py<br />
&nbsp; AddHandler cgi-script .cgi .py<br />
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></div></td></tr></tbody></table></div>
<p>保存退出</p>
<p>重新启用mod_python</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod python</div></td></tr></tbody></table></div>
<p>重启apache</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</div></td></tr></tbody></table></div>
<p>测试python</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gedit workhome<span style="color: #000000; font-weight: bold;">/</span>test.py</div></td></tr></tbody></table></div>
<p>内容：</p>
<div class="codecolorer-container python vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span><br />
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Content-type: text/html<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><br />
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Hello, Python.&quot;</span></div></td></tr></tbody></table></div>
<p>浏览器打开 http://localhost/test.py<br />
应该不会提示你下载test.py了，正常情况会输出 Hello, Python.</p>
<p><a href="http://www.upblog.net/wp-content/uploads/2009/05/screenshot_001.png"><img src="http://www.upblog.net/wp-content/uploads/2009/05/screenshot_001-300x163.png" alt="python works" title="python works" width="300" height="163" class="alignnone size-medium wp-image-87" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/05/ubuntu-apache-python.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>上一篇/下一篇</title>
		<link>http://www.upblog.net/2009/05/%e4%b8%8a%e4%b8%80%e7%af%87%e4%b8%8b%e4%b8%80%e7%af%87.html</link>
		<comments>http://www.upblog.net/2009/05/%e4%b8%8a%e4%b8%80%e7%af%87%e4%b8%8b%e4%b8%80%e7%af%87.html#comments</comments>
		<pubDate>Thu, 14 May 2009 11:04:57 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=76</guid>
		<description><![CDATA[文章页面 article.php?id=5 1234567891011121314151617&#60;?php $id = $_GET&#91;'id'&#93;; // 查询文章内容 $article_sql = &#34;SELECT * FROM `article` WHERE `id` = {$id}&#34;; // 略 // 查询上一篇文章的ID $prev_id_sql = &#34;SELECT `id` FROM `article` WHERE `id` &#60; {$id} limit 1&#34;; // 略 echo &#34;&#60;a href=\&#34;article.php?id={$prev_id}\&#34;&#62;上一篇&#60;/a&#62;&#34;; // &#8230; <a href="http://www.upblog.net/2009/05/%e4%b8%8a%e4%b8%80%e7%af%87%e4%b8%8b%e4%b8%80%e7%af%87.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>文章页面 article.php?id=5</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// 查询文章内容</span><br />
<span style="color: #000088;">$article_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM `article` WHERE `id` = <span style="color: #006699; font-weight: bold;">{$id}</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">// 略</span><br />
<br />
<span style="color: #666666; font-style: italic;">// 查询上一篇文章的ID</span><br />
<span style="color: #000088;">$prev_id_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT `id` FROM `article` WHERE `id` &lt; <span style="color: #006699; font-weight: bold;">{$id}</span> limit 1&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">// 略</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>article.php?id=<span style="color: #006699; font-weight: bold;">{$prev_id}</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;上一篇&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// 查询下一篇文章的ID</span><br />
<span style="color: #000088;">$next_id_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT `id` FROM `article` WHERE `id` &gt; <span style="color: #006699; font-weight: bold;">{$id}</span> limit 1&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">// 略</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>article.php?id=<span style="color: #006699; font-weight: bold;">{$next_id}</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;下一篇&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>这样需要3次查询，但实际上我们不需要知道上一篇/下一篇文章的具体ID是多少</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$go</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'go'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$go</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'prev'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$symbol</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'next'</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$symbol</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$symbol</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'='</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// 查询文章内容</span><br />
<span style="color: #000088;">$article_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM `article` WHERE `id` <span style="color: #006699; font-weight: bold;">{$symbol}</span> <span style="color: #006699; font-weight: bold;">{$id}</span> LIMIT 1&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">// 略</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>article.php?id=<span style="color: #006699; font-weight: bold;">{$id}</span>&amp;go=prev<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;上一篇&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>article.php?id=<span style="color: #006699; font-weight: bold;">{$id}</span>&amp;go=next<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;下一篇&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>减少了两次查询，MYSQL会感谢你大爷的</p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/05/%e4%b8%8a%e4%b8%80%e7%af%87%e4%b8%8b%e4%b8%80%e7%af%87.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu 下 Objective-C 开发环境</title>
		<link>http://www.upblog.net/2009/05/ubuntu-%e4%b8%8b-objective-c-%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83.html</link>
		<comments>http://www.upblog.net/2009/05/ubuntu-%e4%b8%8b-objective-c-%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83.html#comments</comments>
		<pubDate>Tue, 05 May 2009 03:10:06 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=71</guid>
		<description><![CDATA[装一堆东西先 1sudo apt-get install build-essential gnustep gobjc gnustep-make libgnustep-base-dev gnustep-devel 编辑 .bashrc 加入 1234#set GNUstep GNUSTEP_ROOT=/usr/share/GNUstep export GNUSTEP_ROOT source /usr/share/GNUstep/Makefiles/GNUstep.sh 写段小程序测试下： 建个目录 test 1mkdir test 创建文件hello.m，内容如下 12345678910111213141516171819202122232425262728293031323334#include &#60;stdio.h&#62; /* * The next #include line is generally present in all Objective-C &#8230; <a href="http://www.upblog.net/2009/05/ubuntu-%e4%b8%8b-objective-c-%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>装一堆东西先</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential gnustep gobjc gnustep-make libgnustep-base-dev gnustep-devel</div></td></tr></tbody></table></div>
<p>编辑 .bashrc 加入</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#set GNUstep</span><br />
<span style="color: #007800;">GNUSTEP_ROOT</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>GNUstep<br />
<span style="color: #7a0874; font-weight: bold;">export</span> GNUSTEP_ROOT<br />
<span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>GNUstep<span style="color: #000000; font-weight: bold;">/</span>Makefiles<span style="color: #000000; font-weight: bold;">/</span>GNUstep.sh</div></td></tr></tbody></table></div>
<p>写段小程序测试下：<br />
建个目录 test</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #7a0874; font-weight: bold;">test</span></div></td></tr></tbody></table></div>
<p>创建文件hello.m，内容如下</p>
<div class="codecolorer-container objc vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#include &lt;stdio.h&gt;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">/*<br />
* The next #include line is generally present in all Objective-C<br />
* source files that use GNUstep. &nbsp;The Foundation.h header file<br />
* includes all the other standard header files you need.<br />
*/</span><br />
<span style="color: #6e371a;">#include &lt;Foundation/Foundation.h&gt;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">/*<br />
&nbsp;* declare the Test class implements the class method (classStringValue).<br />
*/</span><br />
<span style="color: #a61390;">@interface</span> Test<br />
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">const</span> <span style="color: #a61390;">char</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> classStringValue;<br />
<span style="color: #a61390;">@end</span><br />
<br />
<span style="color: #11740a; font-style: italic;">/**<br />
&nbsp;* Define the Test class and the class method (classStringValue).<br />
&nbsp;*/</span><br />
<span style="color: #a61390;">@implementation</span> Test<br />
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">const</span> <span style="color: #a61390;">char</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> classStringValue;<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> <span style="color: #bf1d1a;">&quot;this is the string value of the Test class&quot;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<span style="color: #a61390;">@end</span><br />
<br />
<span style="color: #11740a; font-style: italic;">/**<br />
&nbsp;* main() function: pass a message to the Test class and print the returned string<br />
&nbsp;*/</span><br />
<span style="color: #a61390;">int</span> main<span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span><br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;%s<span style="color: #2400d9;">\n</span>&quot;</span>, <span style="color: #002200;">&#91;</span>Test classStringValue<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> <span style="color: #2400d9;">0</span>;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>当然还有很重要的GNUmakefile</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">include $<span style="color: #7a0874; font-weight: bold;">&#40;</span>GNUSTEP_MAKEFILES<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>common.make<br />
TOOL_NAME = LogTest<br />
<span style="color: #666666; font-style: italic;">#LogTest 将会是生成的可执行文件的文件名</span><br />
LogTest_OBJC_FILES = hello.m<br />
<span style="color: #666666; font-style: italic;">#LogTest_OBJC_FILES 里的 LogTest 必须同上文 LogTest 相同</span><br />
<span style="color: #666666; font-style: italic;">#hello.m 就是刚编辑的Objective-C源文件</span><br />
include $<span style="color: #7a0874; font-weight: bold;">&#40;</span>GNUSTEP_MAKEFILES<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>tool.make</div></td></tr></tbody></table></div>
<p>然后执行 make<br />
如果成功就会出现obj目录<br />
使用 ./obj/LogTest 执行</p>
<p>搞定</p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/05/ubuntu-%e4%b8%8b-objective-c-%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu上自动安装windows TTF字体</title>
		<link>http://www.upblog.net/2009/04/ubuntu-installing-windows-ttf-fonts-automatically.html</link>
		<comments>http://www.upblog.net/2009/04/ubuntu-installing-windows-ttf-fonts-automatically.html#comments</comments>
		<pubDate>Fri, 24 Apr 2009 17:37:02 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=68</guid>
		<description><![CDATA[有时候你错失了网页上好看的字体，有时候你想作点设计，或者你想把什么东西弄的漂漂点。可是，大多数字体都是truetype格式的，这种格式在ubuntu上使用起来有点小问题。 当然了，在ubuntu上安装TTF字体也不是很复杂，但在你要安装字体的时候总是重复的做这些工作是很无聊的。这也是我为什么要用C写这个小应用程序的原因，它把这一切操作全包了。 首先从 这里 下载。然后解压，打开终端，用cd命令进入解压出来的目录。 在这个目录里执行 1sudo cp ttfinstall /bin/ 现在 ttfinstall 在你的系统里了，现在你安装字体就要方便的多了，我们来试试看： 如果我想安装位于我的主目录下的Downloads文件夹里的myfonts.ttf，我只需要在终端里输入 12cd ~/Downloads/ sudo ttfinstall myfont.ttf 搞定，这个字体已经可以使用了 如果你使用Thunar作为默认的文件浏览器，那么在文件菜单项里加上一个选项用来安装字体是很实用的。这样你可以不用打开终端敲命令，你只需要右键点击字体文件然后选择&#8221;Install&#8221; 实现这个功能很容易，打开Thunar然后依次 Edit > Configure custom actions。然后添加一个新的动作叫做Install this font, 随便写个描述，在command里填 gksu ttfinstall %n 切换到Appearance Conditions标签，在File Pattern里填*.ttf。取消选中“Text files”然后选中“Other files”。 点击OK，关掉Configure custom &#8230; <a href="http://www.upblog.net/2009/04/ubuntu-installing-windows-ttf-fonts-automatically.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>有时候你错失了网页上好看的字体，有时候你想作点设计，或者你想把什么东西弄的漂漂点。可是，大多数字体都是truetype格式的，这种格式在ubuntu上使用起来有点小问题。<br />
当然了，在ubuntu上安装TTF字体也不是很复杂，但在你要安装字体的时候总是重复的做这些工作是很无聊的。这也是我为什么要用C写这个小应用程序的原因，它把这一切操作全包了。<br />
首先从 <a href="http://h4desz.co.nr/stuff/ttfinstall.tar.gz ">这里</a> 下载。然后解压，打开终端，用cd命令进入解压出来的目录。<br />
在这个目录里执行</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> ttfinstall <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span></div></td></tr></tbody></table></div>
<p>现在 ttfinstall 在你的系统里了，现在你安装字体就要方便的多了，我们来试试看：<br />
<span id="more-68"></span><br />
如果我想安装位于我的主目录下的Downloads文件夹里的myfonts.ttf，我只需要在终端里输入</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> ttfinstall myfont.ttf</div></td></tr></tbody></table></div>
<p>搞定，这个字体已经可以使用了<br />
如果你使用Thunar作为默认的文件浏览器，那么在文件菜单项里加上一个选项用来安装字体是很实用的。这样你可以不用打开终端敲命令，你只需要右键点击字体文件然后选择&#8221;Install&#8221;<br />
实现这个功能很容易，打开Thunar然后依次 Edit > Configure custom actions。然后添加一个新的动作叫做Install this font, 随便写个描述，在command里填 gksu ttfinstall %n<br />
<img alt="" src="http://images.howtoforge.com/images/installing_windows_ttf_fonts/createaction1.png" class="alignnone" width="404" height="403" /><br />
切换到Appearance Conditions标签，在File Pattern里填*.ttf。取消选中“Text files”然后选中“Other files”。<br />
<img alt="" src="http://images.howtoforge.com/images/installing_windows_ttf_fonts/createaction2.png" class="alignnone" width="404" height="403" /><br />
点击OK，关掉Configure custom actions窗口，现在你可以在ttf字体文件上点右键测试了，你可以看到新选项已经在那了。<br />
<img alt="" src="http://images.howtoforge.com/images/installing_windows_ttf_fonts/contextmenu.png" class="alignnone" width="447" height="381" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/04/ubuntu-installing-windows-ttf-fonts-automatically.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>QeePHP 针对复杂的表单手写 Form view</title>
		<link>http://www.upblog.net/2009/03/custom-qeephp-form-view.html</link>
		<comments>http://www.upblog.net/2009/03/custom-qeephp-form-view.html#comments</comments>
		<pubDate>Mon, 23 Mar 2009 05:08:30 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[QeePHP]]></category>
		<category><![CDATA[QForm]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=54</guid>
		<description><![CDATA[如果在项目里能统一表单的样式布局肯定是最好的了，可能你只需要定义一两个general_form_element.php放在_element 里，view里调用就可以了 但很多时候表单复杂了，布局改变了你就得去改general_form_element.php，而改了这个文件又会影响其他表单，当你不想为这个特殊的表单创建一个_element，那就手写吧 说明：这不符合 qeephp 的思想，不推荐 View 里这样： 12345678910111213141516171819202122&#60;div id=&#34;form&#34;&#62; &#160; &#160; &#60;form name=&#34;loginForm&#34; id=&#34;loginForm&#34; action=&#34;&#60;?php echo url&#40;'default/login'&#41;?&#62;&#34; method=&#34;post&#34;&#62; &#160; &#160; &#160; &#160; &#60;div&#62; &#160; &#160; &#160; &#160; &#160; &#160; &#60;label for=&#34;username&#34;&#62;Username:&#60;/label&#62; &#160; &#160; &#160; &#160; &#160; &#160; &#60;input type=&#34;text&#34; &#8230; <a href="http://www.upblog.net/2009/03/custom-qeephp-form-view.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>如果在项目里能统一表单的样式布局肯定是最好的了，可能你只需要定义一两个general_form_element.php放在_element 里，view里调用<?php $this->_element(&#8216;general_form&#8217;, array(&#8216;form&#8217; => $form)); ?>就可以了<br />
但很多时候表单复杂了，布局改变了你就得去改general_form_element.php，而改了这个文件又会影响其他表单，当你不想为这个特殊的表单创建一个_element，那就手写吧</p>
<p><strong>说明：这不符合 qeephp 的思想，不推荐</strong><br />
<span id="more-54"></span></p>
<p><strong>View 里这样：</strong></p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;div id=&quot;form&quot;&gt;<br />
&nbsp; &nbsp; &lt;form name=&quot;loginForm&quot; id=&quot;loginForm&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'default/login'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;label for=&quot;username&quot;&gt;Username:&lt;/label&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; size=&quot;20&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;?&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isValid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorMsg</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;error&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span>h<span style="color: #009900;">&#40;</span><span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorMsg</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;label for=&quot;password&quot;&gt;Password:&lt;/label&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;password&quot; name=&quot;password&quot; id=&quot;password&quot; size=&quot;20&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;?&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isValid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorMsg</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;error&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span>h<span style="color: #009900;">&#40;</span><span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$form</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorMsg</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
&nbsp; &nbsp; &lt;/form&gt;<br />
&lt;/div&gt;</div></td></tr></tbody></table></div>
<p>或者可以用</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> Q<span style="color: #339933;">::</span><span style="color: #004000;">control</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$element</span><span style="color: #339933;">-&gt;</span>_ui<span style="color: #339933;">,</span> <span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$element</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attribs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p><strong>Controller 里这样：</strong></p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// 读取YAML配置文件</span><br />
<span style="color: #000088;">$form</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> QForm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span> <span style="color: #339933;">=</span> Helper_YAML<span style="color: #339933;">::</span><span style="color: #004000;">loadCached</span><span style="color: #009900;">&#40;</span>Q<span style="color: #339933;">::</span><span style="color: #004000;">ini</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'app_config/APP_DIR'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/form/login_form.yaml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loadFromConfig</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$config</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />
<span style="color: #666666; font-style: italic;">// 无YAML</span><br />
<span style="color: #000088;">$form</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> QForm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span>QForm<span style="color: #339933;">::</span><span style="color: #004000;">ELEMENT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'textbox'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">-&gt;</span><span style="color: #004000;">addFilters</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trim, strtolower'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">-&gt;</span><span style="color: #004000;">addValidations</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'min_length'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'密码至少需要5个字符'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'min_length'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'用户名至少需要5个字符'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span>QForm<span style="color: #339933;">::</span><span style="color: #004000;">ELEMENT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">-&gt;</span><span style="color: #004000;">addFilters</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trim'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">-&gt;</span><span style="color: #004000;">addValidations</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'is_alnum'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'用户名只能使用26个字母和数字'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'max_length'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'密码最多30个字符'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_view<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'form'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$form</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/03/custom-qeephp-form-view.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The repository for Debian-based LAMP servers</title>
		<link>http://www.upblog.net/2009/03/the-repository-for-debian-based-lamp-servers.html</link>
		<comments>http://www.upblog.net/2009/03/the-repository-for-debian-based-lamp-servers.html#comments</comments>
		<pubDate>Mon, 23 Mar 2009 03:46:30 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=42</guid>
		<description><![CDATA[Ubuntu 源里的 php 版本版本过低？更新太慢？懒得自己编译？ 没关系，dotdeb 就是干这事的。 About Dotdeb is a repository containing many packages for the Debian stable (aka ”Etch”) distribution : PHP versions 4 &#038; 5 and many of their PECL extensions, MySQL versions 5.0 and 5.1, Qmail, Vpopmail… &#8230; <a href="http://www.upblog.net/2009/03/the-repository-for-debian-based-lamp-servers.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 源里的 php 版本版本过低？更新太慢？懒得自己编译？<br />
没关系，<a href="http://www.dotdeb.org">dotdeb</a> 就是干这事的。</p>
<blockquote><h3>About</h3>
<p>Dotdeb is a repository containing many packages for the Debian stable (aka ”Etch”) distribution :</p>
<ul>
<li>PHP versions 4 &#038; 5 and many of their <a href="http://pecl.php.net/">PECL</a> extensions,</li>
<li>MySQL versions 5.0 and 5.1,</li>
<li>Qmail,</li>
<li>Vpopmail…</li>
</ul>
<p>Its goal is to turn easily your <a href="http://www.debian.org/">Debian GNU/Linux</a> boxes into powerful, stable and up-to-date LAMP servers.<br />
Dotdeb supports i386 and amd64 architectures.</p></blockquote>
</blockquote>
<p><span id="more-42"></span></p>
<h3>使用说明</h3>
<p>Using Dotdeb is very simple:</p>
<ol>
<li>Add these two lines to your /etc/apt/sources.list file (choosing a <a href="http://www.dotdeb.org/mirrors/">mirror</a> near you) :
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">deb http://packages.dotdeb.org stable all<br />
&nbsp; &nbsp; deb-src http://packages.dotdeb.org stable all</div></td></tr></tbody></table></div>
</li>
<li>Run
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">apt-get update</div></td></tr></tbody></table></div>
</li>
<li>You should now be able to use the Dotdeb packages with
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">apt-get</div></td></tr></tbody></table></div>
<p>(or</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dselect</div></td></tr></tbody></table></div>
<p>, or</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">aptitude</div></td></tr></tbody></table></div>
<p>as well…)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/03/the-repository-for-debian-based-lamp-servers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
