<?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; Linux</title>
	<atom:link href="http://www.upblog.net/tag/linux/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>让 SmartSVN 显示中文</title>
		<link>http://www.upblog.net/2009/11/let-smartsvn-show-chinese-characters.html</link>
		<comments>http://www.upblog.net/2009/11/let-smartsvn-show-chinese-characters.html#comments</comments>
		<pubDate>Sun, 01 Nov 2009 15:46:45 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SmartSVN]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=149</guid>
		<description><![CDATA[ubuntu 9.10 + SmartSVN 6.0.7, 不能正常显示中文。 应该是 SmartSVN 默认的选用的字体不支持中文，google了下没发现有人说 SmartSVN 不支持中文的问题，难道我这是特例？！ 去官方查文档发现可以指定界面字体，修改smartsvn/bin/smartsvn.sh 在最后一行的上面加上 1_VM_PROPERTIES=&#34;$_VM_PROPERTIES -Dsmartsvn.uifont=Sans&#34; #注意我的 Sans 的是在 fontconfig 配置过的，默认使用“文泉驿微米黑”，你可以根据你的情况而定。 保存，重启SmartSVN，问题解决]]></description>
			<content:encoded><![CDATA[<p>ubuntu 9.10 + SmartSVN 6.0.7, 不能正常显示中文。<br />
应该是 SmartSVN 默认的选用的字体不支持中文，google了下没发现有人说 SmartSVN 不支持中文的问题，难道我这是特例？！<br />
去官方查文档发现可以指定界面字体，修改smartsvn/bin/smartsvn.sh<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 /></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: #000099;">_VM_PROPERTIES</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;$_VM_PROPERTIES -Dsmartsvn.uifont=Sans&quot;</span></div></td></tr></tbody></table></div>
<p>#注意我的 Sans 的是在 fontconfig 配置过的，默认使用“文泉驿微米黑”，你可以根据你的情况而定。</p>
<p>保存，重启SmartSVN，问题解决</p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/11/let-smartsvn-show-chinese-characters.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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>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>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>Linux下NetBeans调试窗口的乱码解决办法</title>
		<link>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</link>
		<comments>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#comments</comments>
		<pubDate>Thu, 09 Apr 2009 06:24:05 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=64</guid>
		<description><![CDATA[NetBeans IDE 是个非常好的开发工具，但在 Linux 下调试窗口里的中文不能正常显示。 我的环境： Linuxmint Felicia java version &#8220;1.6.0_10&#8243; NetBeans 6.7m3 这其实不是NetBeans的问题，而是Java的问题。解决办法如下: 在 jre 的 fonts 目录下创建目录 fallback sudo mkdir /usr/lib/jvm/java-6-sun/jre/lib/fonts/fallback 创建一个中文字体文件的软链到 fallback 目录下 sudo ln -s /usr/share/fonts/zh_CN/YaHei.Consolas.1.12.ttf /usr/lib/jvm/java-6-sun/jre/lib/fonts/fallback/（YaHei.Consolas.1.12.ttf是很适合编程用的字体） 进入 fallback 目录 执行 mkfontscale cd /usr/lib/jvm/java-6-sun/jre/lib/fonts/fallback/ &#38;&#38; sudo &#8230; <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">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.upblog.net/2008/11/netbeans-php-ide.html">NetBeans IDE</a> 是个非常好的开发工具，但在 Linux 下调试窗口里的中文不能正常显示。<br />
我的环境：</p>
<blockquote>
<ol>
<li><a href="http://linuxmint.com/">Linuxmint</a> Felicia</li>
<li>java version &#8220;1.6.0_10&#8243;</li>
<li>NetBeans 6.7m3</li>
</ol>
</blockquote>
<p>这其实不是NetBeans的问题，而是Java的问题。解决办法如下:</p>
<ol>
<li>在 jre 的 fonts 目录下创建目录 fallback <code class="codecolorer bash vibrant"><span class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-<span style="color: #000000;">6</span>-sun<span style="color: #000000; font-weight: bold;">/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>fonts<span style="color: #000000; font-weight: bold;">/</span>fallback</span></code></li>
<li>创建一个中文字体文件的软链到 fallback 目录下 <code class="codecolorer bash vibrant"><span class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</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>fonts<span style="color: #000000; font-weight: bold;">/</span>zh_CN<span style="color: #000000; font-weight: bold;">/</span>YaHei.Consolas.1.12.ttf <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-<span style="color: #000000;">6</span>-sun<span style="color: #000000; font-weight: bold;">/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>fonts<span style="color: #000000; font-weight: bold;">/</span>fallback<span style="color: #000000; font-weight: bold;">/</span></span></code>（<a href="http://www.cnblogs.com/RobertLee/archive/2006/12/25/602646.html">YaHei.Consolas.1.12.ttf</a>是很适合编程用的字体）</li>
<li>进入 fallback 目录 执行 mkfontscale <code class="codecolorer bash vibrant"><span class="bash"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-<span style="color: #000000;">6</span>-sun<span style="color: #000000; font-weight: bold;">/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>fonts<span style="color: #000000; font-weight: bold;">/</span>fallback<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkfontscale</span></code></li>
<li>回到上一层把 fallback/fonts.scale 内容加到 fonts.dir <code class="codecolorer bash vibrant"><span class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> fallback<span style="color: #000000; font-weight: bold;">/</span>fonts.scale <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> fonts.dir</span></code></li>
</ol>
<p>完成后重启 NetBeans 就可以正常显示中文了</p>
]]></content:encoded>
			<wfw:commentRss>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/feed</wfw:commentRss>
		<slash:comments>1</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>
		<item>
		<title>Wine-Doors 0.1.3 发布</title>
		<link>http://www.upblog.net/2009/03/wine-doors-013-released.html</link>
		<comments>http://www.upblog.net/2009/03/wine-doors-013-released.html#comments</comments>
		<pubDate>Wed, 18 Mar 2009 07:38:08 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wine]]></category>
		<category><![CDATA[wine-doors]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=35</guid>
		<description><![CDATA[Wine软件安装管理包–Wine-Doors 发布了 0.1.3版本 这不是一个修正版，这个版本里加入了很多新功能（比如设置 wine 的颜色以配合 GTK 主题）和支持更多的windows软件（比如 Spotify 和 Photoshop CS2）等等。 软件包格式也更方面维护，并且从 0.2 版后就不会再更改了（对于Wine-Doors 0.1.2 版的失败很抱歉）。 现已提供 源码包、deb包 和 rpm包 下载 Finally its time to release Wine-Doors 0.1.3! This is not just a bugfix release, this release includes many &#8230; <a href="http://www.upblog.net/2009/03/wine-doors-013-released.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wine软件安装管理包–<a href="http://wddb.wine-doors.org/">Wine-Doors</a> 发布了 0.1.3版本<br />
这不是一个修正版，这个版本里加入了很多新功能（比如设置 wine 的颜色以配合 GTK 主题）和支持更多的windows软件（比如 Spotify 和 Photoshop CS2）等等。<br />
软件包格式也更方面维护，并且从 0.2 版后就不会再更改了（对于<a href="http://wddb.wine-doors.org/">Wine-Doors</a> 0.1.2 版的失败很抱歉）。<br />
现已提供 源码包、deb包 和 rpm包 <a href="http://wddb.wine-doors.org/downloads">下载</a><br />
<span id="more-35"></span></p>
<blockquote><p>
Finally its time to release Wine-Doors 0.1.3!</p>
<p>This is not just a bugfix release, this release includes many new features (like setting wine colours to match your GTK theme) and packages (like Spotify and Photoshop CS2) also.</p>
<p>The package format has also changed to make package maintenance easier and it won&#8217;t be changing again until 0.2 (sorry for the 0.1.2 breakage everyone).</p>
<p>A tarball, .debs and .(s)rpms are available in the downloads section. Enjoy!
</p></blockquote>
<p>ubuntu 和 debian 用户可以加入此源</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 />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://ppa.launchpad.net/wine-doors-dev-team/ppa/ubuntu intrepid main<br />
deb-src http://ppa.launchpad.net/wine-doors-dev-team/ppa/ubuntu intrepid main</div></td></tr></tbody></table></div>
<p>以及KEY<br />
<a href="http://keyserver.ubuntu.com:11371/pks/lookup?search=0x150C8BE096E1EF28F715291749A5F29D81AC9980&#038;op=index">150C8BE096E1EF28F715291749A5F29D81AC9980</a></p>

<div class="ngg-galleryoverview" id="ngg-gallery-1-35">


	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://www.upblog.net/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=1&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.upblog.net/wp-content/gallery/linux/screenshot_003.png" title=" " class="thickbox" rel="set_1" >
								<img title="screenshot_003.png" alt="screenshot_003.png" src="http://www.upblog.net/wp-content/gallery/linux/thumbs/thumbs_screenshot_003.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.upblog.net/wp-content/gallery/linux/screenshot_004.png" title=" " class="thickbox" rel="set_1" >
								<img title="screenshot_004.png" alt="screenshot_004.png" src="http://www.upblog.net/wp-content/gallery/linux/thumbs/thumbs_screenshot_004.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.upblog.net/wp-content/gallery/linux/screenshot_005.png" title=" " class="thickbox" rel="set_1" >
								<img title="screenshot_005.png" alt="screenshot_005.png" src="http://www.upblog.net/wp-content/gallery/linux/thumbs/thumbs_screenshot_005.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-4" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.upblog.net/wp-content/gallery/linux/screenshot_006.png" title=" " class="thickbox" rel="set_1" >
								<img title="screenshot_006.png" alt="screenshot_006.png" src="http://www.upblog.net/wp-content/gallery/linux/thumbs/thumbs_screenshot_006.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-5" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.upblog.net/wp-content/gallery/linux/screenshot_007.png" title=" " class="thickbox" rel="set_1" >
								<img title="screenshot_007.png" alt="screenshot_007.png" src="http://www.upblog.net/wp-content/gallery/linux/thumbs/thumbs_screenshot_007.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/03/wine-doors-013-released.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux cron 的执行时间问题</title>
		<link>http://www.upblog.net/2009/02/linux-cron-time.html</link>
		<comments>http://www.upblog.net/2009/02/linux-cron-time.html#comments</comments>
		<pubDate>Fri, 20 Feb 2009 16:05:39 +0000</pubDate>
		<dc:creator>kukat</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[cronjob]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.upblog.net/?p=24</guid>
		<description><![CDATA[服务器上需要在每天0点定时执行脚本 123#cronjob -e MAILTO=&#34;xxx@xxx.xxx&#34; 0 0 * * * /usr/local/bin/php /home/xxx/aaa.php &#38;gt;&#38;gt; aaa.log 但总是不在指定的时间执行，看了下 cron 的日志 12345#cat /var/log/cron&#124;grep 'aaa.php' Feb 16 13:00:01 host crond[3407]: (alex) CMD (/usr/local/bin/php /home/xxx/aaa.php &#38;gt;&#38;gt; aaa.log) Feb 17 13:00:01 host crond[20456]: (alex) CMD (/usr/local/bin/php /home/xxx/aaa.php &#38;gt;&#38;gt; &#8230; <a href="http://www.upblog.net/2009/02/linux-cron-time.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>服务器上需要在每天0点定时执行脚本</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 />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#cronjob -e<br />
MAILTO=&quot;xxx@xxx.xxx&quot;<br />
0 0 * * * /usr/local/bin/php /home/xxx/aaa.php &amp;gt;&amp;gt; aaa.log</div></td></tr></tbody></table></div>
<p><span id="more-24"></span><br />
但总是不在指定的时间执行，看了下 cron 的日志</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 />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">#cat /var/log/cron|grep 'aaa.php'<br />
Feb 16 13:00:01 host crond[3407]: (alex) CMD (/usr/local/bin/php /home/xxx/aaa.php &amp;gt;&amp;gt; aaa.log)<br />
Feb 17 13:00:01 host crond[20456]: (alex) CMD (/usr/local/bin/php /home/xxx/aaa.php &amp;gt;&amp;gt; aaa.log)<br />
Feb 18 13:00:01 host crond[25732]: (alex) CMD (/usr/local/bin/php /home/xxx/aaa.php &amp;gt;&amp;gt; aaa.log)<br />
Feb 19 13:00:01 host crond[10169]: (alex) CMD (/usr/local/bin/php /home/xxx/aaa.php &amp;gt;&amp;gt; aaa.log)</div></td></tr></tbody></table></div>
<p>可以看到是每天的13点执行，这个时间与本地时间正好<strong>晚</strong>13个小时。<br />
服务器在美国，按说差13个小时也是正常，但在服务器上执行date命令却和+8区时间一样。<br />
查了点资料，据说是修改服务器时区后没有重新启动 cron 服务或者重启服务器。<br />
不过既然知道是晚了13个小时改改cronjob就行了，服务器上还跑的有别的程序，重启怕出问题</p>
]]></content:encoded>
			<wfw:commentRss>http://www.upblog.net/2009/02/linux-cron-time.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
