<?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>马丁博客 &#187; Ubuntu</title>
	<atom:link href="http://www.blags.org/tags/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blags.org</link>
	<description>专注lamp的技术博客</description>
	<lastBuildDate>Sat, 05 Nov 2011 02:25:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://www.blags.org/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
jQuery.ajax({type:'GET',url:'http://www.blags.org/wp-content/plugins/wp-postviews-plus/postviews_plus.php',data:'todowppvp=add&type=tag&id=76_1',cache:false,dataType:'script'});
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>ubuntu 性能优化</title>
		<link>http://www.blags.org/performance-optimization-ubuntu/</link>
		<comments>http://www.blags.org/performance-optimization-ubuntu/#comments</comments>
		<pubDate>Wed, 04 May 2011 03:59:49 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix&Linux]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=660</guid>
		<description><![CDATA[前言：最近安装了不少东西，感觉ubuntu速度明显变慢了，整理了一些速度优化的方法，希望对大家有用。

删除不必要的包。

View Code SHELLsudo deborphan &#124; xargs sudo apt-get -y remove --purge;
sudo apt-get autoclean;


减少对swap的使用，

View Code SHELLsudo sysctl vm.swappiness=10;#修改swap大小。

在/etc/sysctl.conf 配置文件中，添加：

View Code SHELLvm.swappiness=10;#到文件的末尾,保证重启也有效。



]]></description>
			<content:encoded><![CDATA[<p>前言：最近安装了不少东西，感觉<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>速度明显变慢了，整理了一些速度优化的方法，希望对大家有用。</p>
<ul>
<li>删除不必要的包。

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p660code4'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6604"><td class="code" id="p660code4"><pre class="shell" style="font-family:monospace;">sudo deborphan | xargs sudo apt-get -y remove --purge;
sudo apt-get autoclean;</pre></td></tr></table></div>

</li>
<li>减少对swap的使用，

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p660code5'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6605"><td class="code" id="p660code5"><pre class="shell" style="font-family:monospace;">sudo sysctl vm.swappiness=10;#修改swap大小。</pre></td></tr></table></div>

<p>在/etc/sysctl.conf 配置文件中，添加：</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p660code6'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6606"><td class="code" id="p660code6"><pre class="shell" style="font-family:monospace;">vm.swappiness=10;#到文件的末尾,保证重启也有效。</pre></td></tr></table></div>

</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/performance-optimization-ubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>linux 之间ssh无密码登录</title>
		<link>http://www.blags.org/ssh-without-password-between-linux/</link>
		<comments>http://www.blags.org/ssh-without-password-between-linux/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 12:58:57 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smbmount]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshfs]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=656</guid>
		<description><![CDATA[环境：本机器:ubuntu 9.04,服务器centos5.x系列。
最近为了工作需要，开机启动将服务器的文件挂载到自己的工作区，
一开始采用smbmount进行挂载，建立项目进行开发。挂载里面的文件，每次保存时都会提示你文件已经修改需要你刷新整个项目，太麻烦了。都不敢随便保存。不实时保存容易出现的问题大家可想而知。 
Samba是为大家在windows和linux进行文件共享量身定制的。但是对于linux而言就不尽人意了。

smbmount 挂载可以直接在参数上面输入用户名和密码。当然开机挂载很容易了,命令如下:
sudo /etc/rc.local;
smbmount //ip:/xxx /mnt/ -o user%pwd;

以上方式不推荐使用。
那么linux之间挂载采用什么方式呢 &#8212;&#8212; 有以下两种 nfs,sshfs。本人再用的是sshfs。
具体挂载命令如下。

安装 :sudo apt-get install sshfs;
sudo sshfs user@ip-address:/remote/directory /www/workspaces;
开机自动挂载
sudo /etc/rc.local;
 在exit 0 之前加上：
su martin -c 'sshfs user@ip-address:/remote/directory /www/workspaces;&#8217;#martin拥有私钥的用户
但是这个中间需要输入密码。下面讲以下ssh无密码登录.


适用情景：


觉得输入密码烦躁的时候。
不得不从其他服务器scp文件的时候。

下面M表示本机,S表示服务器（或者目的ip）

首先在M运行ssh-keygen -t rsa;#dsa表示加密类型，exp:dsa,rsa
然后回车知道结束。
cd ~/.ssh/;ls -l;会看见有下面几个文件
其中id_rsa 是私钥。id_rsa.pub是公钥。
将M中ssh生成的公钥复制下来。
接下来进如ssh 链接上S机器。
将公钥内容复制到S机器。
vi ~/.ssh/authorized_keys;
在S机器将文件authorized_keys赋予600权限。
chmod 600 ~/.ssh/authorized_keys;
多个用户可以将自己机器内生成的公钥在authorized_keys下面复制进去。

这样就完成了。
vi /var/log/secure;可以看到登录记录。
卸载，方法使用umount /xxx就行。
出现错误

 Agent admitted failure to sign using the key.
则需要在M机器上将私钥添加进来
ssh-add .ssh/id_rsa;

]]></description>
			<content:encoded><![CDATA[<p>环境：本机器:<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a> 9.04,服务器<a href="http://www.blags.org/tags/centos/"title="centos 系统" >centos</a>5.x系列。</p>
<p>最近为了工作需要，开机启动将服务器的文件挂载到自己的工作区，</p>
<p>一开始采用smbmount进行挂载，建立项目进行开发。挂载里面的文件，每次保存时都会提示你文件已经修改需要你刷新整个项目，太麻烦了。都不敢随便保存。不实时保存容易出现的问题大家可想而知。<em> </em></p>
<p><em>Samba</em>是为大家在windows和<a href="http://www.blags.org/tags/linux/"target="_self"title="linux" >linux</a>进行文件共享量身定制的。但是对于linux而言就不尽人意了。</p>
<ol>
<li>smbmount 挂载可以直接在参数上面输入用户名和密码。当然开机挂载很容易了,命令如下:</li>
<li>sudo /etc/rc.local;<br />
smbmount //ip:/xxx /mnt/ -o user%pwd;</li>
</ol>
<p>以上方式不推荐使用。</p>
<p>那么linux之间挂载采用什么方式呢 &#8212;&#8212; 有以下两种 nfs,sshfs。本人再用的是sshfs。</p>
<p>具体挂载命令如下。</p>
<ol>
<li>安装 :sudo apt-get install sshfs;</li>
<li><code>sudo</code> <code>sshfs user@ip-address:</code><code>/remote/directory</code> <code>/www/</code>workspaces;</li>
<li>开机自动挂载<br />
sudo /etc/rc.local;</li>
<li> 在exit 0 之前加上：<code><br />
su martin -c 'sshfs <span style="color: #ff0000;">user@ip-address</span>:</code><code>/remote/directory</code> <code>/www/</code>workspaces;&#8217;#<span style="color: #ff0000;">martin拥有私钥的用户</span></li>
<li>但是这个中间需要输入密码。下面讲以下ssh无密码登录.</li>
</ol>
<div>
<div>适用情景：</div>
</div>
<ul>
<li>觉得输入密码烦躁的时候。</li>
<li>不得不从其他服务器scp文件的时候。</li>
</ul>
<p><span style="color: #ff0000;">下面M表示本机,S表示服务器（或者目的ip）</span></p>
<ol>
<li>首先在M运行ssh-keygen -t rsa;#dsa表示加密类型，exp:dsa,rsa<br />
然后回车知道结束。</li>
<li>cd ~/.ssh/;ls -l;会看见有下面几个文件
<div id="attachment_693" class="wp-caption alignnone" style="width: 310px"><a href="http://www.blags.org/wp-content/Upload/a5.png"><img class="size-medium wp-image-693" title="ssh use public key" src="http://www.blags.org/wp-content/Upload/a5-300x46.jpg" alt="ssh use public key" width="300" height="46" /></a><p class="wp-caption-text">ssh use public key</p></div>
<p>其中id_rsa 是私钥。id_rsa.pub是公钥。<br />
将M中ssh生成的公钥复制下来。</li>
<li>接下来进如ssh 链接上S机器。<br />
将公钥内容复制到S机器。<br />
vi ~/.ssh/authorized_keys;</li>
<li>在S机器将文件authorized_keys赋予600权限。<br />
<span style="color: #ff0000;">chmod 600 ~/.ssh/authorized_keys;</span><br />
多个用户可以将自己机器内生成的公钥在authorized_keys下面复制进去。</li>
</ol>
<p>这样就完成了。</p>
<p>vi /var/log/secure;可以看到登录记录。</p>
<div id="attachment_694" class="wp-caption alignnone" style="width: 310px"><a href="http://www.blags.org/wp-content/Upload/a6.png"><img class="size-medium wp-image-694" title="ssh use public key" src="http://www.blags.org/wp-content/Upload/a6-300x54.jpg" alt="ssh use public key" width="300" height="54" /></a><p class="wp-caption-text">ssh use public key</p></div>
<p>卸载，方法使用umount /xxx就行。</p>
<p>出现错误</p>
<ol>
<li> Agent admitted failure to sign using the key.<br />
则需要在M机器上将私钥添加进来<br />
ssh-add .ssh/id_rsa;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ssh-without-password-between-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ubuntu 短密码设置</title>
		<link>http://www.blags.org/short-password-settings-ubuntu/</link>
		<comments>http://www.blags.org/short-password-settings-ubuntu/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 10:49:51 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[passwd]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=649</guid>
		<description><![CDATA[年终了，写篇小文章。相信对ubuntu爱好者有用。
起因：相信很多ubuntu用户都有遇到过相同的问题。sudo的时候会需要填写用户的密码，去处理需要较高权限的操作。
密码设置长了自然感觉到很繁琐。（对安全要求较高的用户不建议）。
linux 修改密码的方式很简单。passwd username 输入当前密码就可以进行新密码设置。
ubuntu 近期几个版本都对用户密码复杂程度进行了控制，不安全的密码不能通过。（小于六位）
下面介绍以下设置短密码的方法。

sudo passwd username 进行设置就ok拉。(加上sudo就可以设置较短的密码)。
当然也可以sudo su 进去root,然后直接passwd martin进行密码设置。

另外:ubuntu 支持密码找回。
由于最近比较忙。记录以下知识点，下次补上。
linux 管道使用。
linux crontab 定时任务。
php 系统日志处理。
php 高并发解决方案。
mysql 建索引介绍。
]]></description>
			<content:encoded><![CDATA[<p>年终了，写篇小文章。相信对<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>爱好者有用。</p>
<p>起因：相信很多ubuntu用户都有遇到过相同的问题。sudo的时候会需要填写用户的密码，去处理需要较高权限的操作。</p>
<p>密码设置长了自然感觉到很繁琐。（<span style="color: #ff0000;">对安全要求较高的用户不建议</span>）。</p>
<p><a href="http://www.blags.org/tags/linux/"target="_self"title="linux" >linux</a> 修改密码的方式很简单。passwd username 输入当前密码就可以进行新密码设置。</p>
<p>ubuntu 近期几个版本都对用户密码复杂程度进行了控制，不安全的密码不能通过。（小于六位）</p>
<p>下面介绍以下设置短密码的方法。</p>
<ol>
<li>sudo passwd username 进行设置就ok拉。(加上sudo就可以设置较短的密码)。</li>
<li>当然也可以sudo su 进去root,然后直接passwd martin进行密码设置。</li>
</ol>
<p>另外:ubuntu 支持密码找回。</p>
<p>由于最近比较忙。记录以下知识点，下次补上。</p>
<p>linux 管道使用。</p>
<p>linux crontab 定时任务。</p>
<p>php 系统日志处理。</p>
<p>php 高并发解决方案。</p>
<p><a href="http://www.blags.org/tags/mysql/"title="mysql" >mysql</a> 建索引介绍。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/short-password-settings-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ubuntu 安装 ffmpeg php-ffmpeg</title>
		<link>http://www.blags.org/ubuntu-install-ffmpeg-php-ffmpeg/</link>
		<comments>http://www.blags.org/ubuntu-install-ffmpeg-php-ffmpeg/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 16:23:06 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[php-ffmpeg]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=622</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;最近在做一个视频网站安装本地环境费了不少时间。本地是ubuntu 9.10 而服务器是redhat as4 所以到时候本人会把服务器安装过程和大家分享出来。
本人环境如下

php &#8212;- 5.210
apache 2.2
ubuntu 9.10


ffmpeg 功能很强大包括视频抓图，视频信息，视频转换，在线视频录制，而且是免费的。所有一般的视频网站都会采用他。
本人首先是采用编译安装，但是一直都没有成功。编译过程中出现了很多问题。安装要使用ffmpeg往往需要编译很多包。感觉很麻烦。这些包又依赖于很多其他包。安装顺序也有要求。所以放弃了。
最终采用ubuntu 强大的 apt-get (使用dpkg进行安装) 进行安装（当然cenos,red hat这类使用rpm的系统都可以使用yum进行安装,具体的安装方法可以在本站进行查找）.
apt-get 安装步骤如下:
sudo apt-get update ##更新以下源
sudo apt-get install ffmpeg
sudo apt-get install php5-ffmpeg
sudo apt-get install mencoder
sudo apt-get install flvtool2 ##视频转换flv
sudo apt-get install lame ##音频
sudo apt-get install yasm
编译安装ffmpeg 如下:
从 http://ffmpeg.mplayerhq.hu 下载
./configure &#8211;help ##查看有那些参数
./configure&#8211;prefix=/usr&#8211;enable-gpl&#8211;enable-shared&#8211;enable-libmp3lame&#8211;enable-libamr_nb&#8211;enable-libogg&#8211;enable-libvorbis&#8211;enable-libxvid&#8211;enable-liba52&#8211;enable-liba52bin&#8211;enable-pp&#8211;enable-libfaad&#8211;enable-libfaadbin&#8211;enable-libfaac&#8211;enable-pthreads&#8211;disable-ffserver&#8211;enable-x11grab
如果报错则安装该包，或者直接去掉该参数，只需要配置自己使用过程中需要使用到的就行了。
make &#38; make install
其他的则一个一个的下载解压在编译就是了。
具体参考本文：centos+zendce+red5+ffmpeg安装配置


下面是php-ffmpeg 使用的api。功能是很少了。
如果需要给视频抓图择需要使用shell脚本。也就是用到php当中的(system,exec,passthru)这类执行外部命令函数。
往往很多服务器都将种类函数视为危险函数屏蔽掉了。所以想做视频网站对服务器的配置要求比较高。
当然最好是自己的独立服务器。vps 也可以。随便你怎么整都可以。


View Code PHP$movie = new ffmpeg_movie&#40;String path_to_media, <a href="http://www.blags.org/ubuntu-install-ffmpeg-php-ffmpeg/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;最近在做一个视频网站安装本地环境费了不少时间。本地是<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a> 9.10 而服务器是redhat as4 所以到时候本人会把服务器安装过程和大家分享出来。</p>
<p>本人环境如下</p>
<ul>
<li>php &#8212;- 5.210</li>
<li>apache 2.2</li>
<li>ubuntu 9.10</li>
</ul>
<ol>
<li><a href="http://www.blags.org/tags/ffmpeg/"title="ffmpeg" >ffmpeg</a> 功能很强大包括视频抓图，视频信息，视频转换，在线视频录制，而且是免费的。所有一般的视频网站都会采用他。</li>
<li>本人首先是采用编译安装，但是一直都没有成功。编译过程中出现了很多问题。安装要使用ffmpeg往往需要编译很多包。感觉很麻烦。这些包又依赖于很多其他包。安装顺序也有要求。所以放弃了。</li>
<li>最终采用ubuntu 强大的 apt-get (使用dpkg进行安装) 进行安装（当然cenos,red hat这类使用rpm的系统都可以使用yum进行安装,具体的安装方法可以在本站进行查找）.</li>
<li>apt-get 安装步骤如下:<br />
sudo apt-get update ##更新以下源<br />
sudo apt-get install ffmpeg<br />
sudo apt-get install php5-ffmpeg<br />
sudo apt-get install mencoder<br />
sudo apt-get install flvtool2 ##视频转换flv<br />
sudo apt-get install lame ##音频<br />
sudo apt-get install yasm</li>
<li>编译安装ffmpeg 如下:<br />
从 http://ffmpeg.mplayerhq.hu 下载<br />
./configure &#8211;help ##查看有那些参数<br />
./configure&#8211;prefix=/usr&#8211;enable-gpl&#8211;enable-shared&#8211;enable-libmp3lame&#8211;enable-libamr_nb&#8211;enable-libogg&#8211;enable-libvorbis&#8211;enable-libxvid&#8211;enable-liba52&#8211;enable-liba52bin&#8211;enable-pp&#8211;enable-libfaad&#8211;enable-libfaadbin&#8211;enable-libfaac&#8211;enable-pthreads&#8211;disable-ffserver&#8211;enable-x11grab<br />
如果报错则安装该包，或者直接去掉该参数，只需要配置自己使用过程中需要使用到的就行了。<br />
make &amp; make install<br />
其他的则一个一个的下载解压在编译就是了。</li>
<li>具体参考本文：<a href="http://www.blags.org/centos_zendce_red5_ffmpeg/">centos+zendce+red5+ffmpeg安装配置</a></li>
</ol>
<ul>
<li>下面是php-ffmpeg 使用的api。功能是很少了。</li>
<li>如果需要给视频抓图择需要使用shell脚本。也就是用到php当中的(system,exec,passthru)这类执行外部命令函数。<br />
往往很多服务器都将种类函数视为危险函数屏蔽掉了。所以想做视频网站对服务器的配置要求比较高。<br />
当然最好是自己的独立服务器。vps 也可以。随便你怎么整都可以。</li>
</ul>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p622code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6228"><td class="code" id="p622code8"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$movie</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ffmpeg_movie<span style="color: #009900;">&#40;</span>String path_to_media<span style="color: #339933;">,</span> boolean persistent<span style="color: #009900;">&#41;</span>	Open a video or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> and <span style="color: #b1b100;">return</span> it <span style="color: #b1b100;">as</span> an object<span style="color: #339933;">.</span>
path_to_media <span style="color: #339933;">-</span> <a href="http://www.php.net/file"><span style="color: #990000;">File</span></a> path of video or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> to open<span style="color: #339933;">.</span>
persistent <span style="color: #339933;">-</span> Whether to open this media <span style="color: #b1b100;">as</span> a persistent resource<span style="color: #339933;">.</span> See the PHP documentation <span style="color: #b1b100;">for</span> more info about persistent resources
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDuration</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the duration of a movie or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> in seconds<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrameCount</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the number of frames in a movie or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrameRate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the frame rate of a movie in fps<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFilename</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the path and name of the movie <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getComment</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the comment field from the movie or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the title field from the movie or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAuthor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> alias <span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getArtist</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the author field from the movie or the artist ID3 field from an mp3 <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCopyright</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the copyright field from the movie or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getArtist</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the artist ID3 field from an mp3 <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGenre</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the genre ID3 field from an mp3 <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTrackNumber</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the track ID3 field from an mp3 <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getYear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the year ID3 field from an mp3 <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a><span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrameHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the height of the movie in pixels<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrameWidth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the width of the movie in pixels<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPixelFormat</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the pixel format of the movie<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBitRate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the bit rate of the movie or audio <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> in bits per second<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getVideoBitRate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the bit rate of the video in bits per second<span style="color: #339933;">.</span>
NOTE<span style="color: #339933;">:</span> This only works <span style="color: #b1b100;">for</span> files with <a href="http://www.php.net/constant"><span style="color: #990000;">constant</span></a> bit rate<span style="color: #339933;">.</span>
&nbsp;
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAudioBitRate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the audio bit rate of the media <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> in bits per second<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAudioSampleRate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the audio sample rate of the media <a href="http://www.php.net/file"><span style="color: #990000;">file</span></a> in bits per second<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrameNumber</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the <a href="http://www.php.net/current"><span style="color: #990000;">current</span></a> frame index<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getVideoCodec</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the name of the video codec used to encode this movie <span style="color: #b1b100;">as</span> a string<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAudioCodec</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the name of the audio codec used to encode this movie <span style="color: #b1b100;">as</span> a string<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAudioChannels</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> the number of audio channels in this movie <span style="color: #b1b100;">as</span> an integer<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasAudio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> boolean value indicating whether the movie has an audio stream<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasVideo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #b1b100;">Return</span> boolean value indicating whether the movie has a video stream<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFrame</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>Integer framenumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>	Returns a frame from the movie <span style="color: #b1b100;">as</span> an ffmpeg_frame object<span style="color: #339933;">.</span> Returns <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #b1b100;">if</span> the frame was not found<span style="color: #339933;">.</span>
framenumber <span style="color: #339933;">-</span> Frame from the movie to <span style="color: #b1b100;">return</span><span style="color: #339933;">.</span> <span style="color: #b1b100;">If</span> no framenumber is specified<span style="color: #339933;">,</span> returns the <a href="http://www.php.net/next"><span style="color: #990000;">next</span></a> frame of the movie<span style="color: #339933;">.</span>
<span style="color: #000088;">$movie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getNextKeyFrame</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	Returns the <a href="http://www.php.net/next"><span style="color: #990000;">next</span></a> <a href="http://www.php.net/key"><span style="color: #990000;">key</span></a> frame from the movie <span style="color: #b1b100;">as</span> an ffmpeg_frame object<span style="color: #339933;">.</span> Returns <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #b1b100;">if</span> the frame was not found<span style="color: #339933;">.</span></pre></td></tr></table></div>

<p>测试用例：<a href="http://www.blags.org/wp-content/Upload/ffmpeg-execute.php_.zip">ffmpeg-execute.php</a></p>
<p>安装过程出现错误解决:</p>
<ol>
<li>make: *** [<em>ffmpeg-php.lo</em>] <em>Error 1<br />
解决:.编译时加上 （php-config）路径：<br />
<code>--with-php-config=/usr/</code><code>local</code><code>/php/bin/php-config</code> </em></li>
<li>make: *** [ffmpeg_frame.lo] Error 1<br />
解决:mv ffmpeg_frame.loT ffmpeg_frame.lo</li>
<li>其他问题请检查自己的php版本。和php-ffmpeg是否一致。</li>
<li>还有其他问题可以在下面留言。</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-install-ffmpeg-php-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>red hat centos 安装 yum</title>
		<link>http://www.blags.org/red-hat-centos-install-yum/</link>
		<comments>http://www.blags.org/red-hat-centos-install-yum/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 03:34:22 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=616</guid>
		<description><![CDATA[最近配置了服务器需要安装软件方法有几种。

下载软件包 ，编译安装 (./configure,make,make install)这样安装配置性更高。相信高手都是这样安装的。
yum安装。这样安装起来比较简单。(yum install 软件包名称) 主要适用于(centos,red hat)等.
卸载：yum remove  软件包名称.
apt-get 安装 这个和yum安装差不多。(sudo apt-get install 软件包名称 ) 主要适用于(ubuntu ,debian).
卸载 : sudo apt-get autoremove 卸载所有相关包。
采用 package 方式安装 : 用 package 安装，只要抓取该程序 package 档案。
安装 (pkg_add package_name) 移除 (pkg_delete package_name) 就可以完成安装 / 移除。
注意 ：文件名称 .tgz 结尾的是 package 文件名称 .tar.gz 结尾的是 source 。
注 : 目前已经安装的 package 数据库放在 /var/db/pkg/ 这个数据夹之中。
另外还有 port tree 方式安装 <a href="http://www.blags.org/red-hat-centos-install-yum/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>最近配置了服务器需要安装软件方法有几种。</p>
<ol>
<li>下载软件包 ，编译安装 (./configure,make,make install)这样安装配置性更高。相信高手都是这样安装的。</li>
<li>yum安装。这样安装起来比较简单。(yum install <span style="color: #ff0000;">软件包名称</span>) 主要适用于(<a href="http://www.blags.org/tags/centos/"title="centos 系统" >centos</a>,red hat)等.<br />
卸载：yum remove  软件包名称.</li>
<li>apt-get 安装 这个和yum安装差不多。(sudo apt-get install <span style="color: #ff0000;">软件包名称</span> ) 主要适用于(<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a> ,debian).<br />
卸载 : sudo apt-get autoremove 卸载所有相关包。</li>
<li>采用 package 方式安装 : 用 package 安装，只要抓取该程序 package 档案。<br />
安装 (pkg_add <strong>package_name) </strong>移除 (pkg_delete <strong>package_name) </strong>就可以完成安装 / 移除。<br />
注意 ：文件名称 .tgz 结尾的是 package 文件名称 .tar.gz 结尾的是 source 。<br />
注 : 目前已经安装的 package 数据库放在 /var/db/pkg/ 这个数据夹之中。</li>
<li>另外还有 port tree 方式安装 （freebsd）.</li>
</ol>
<p>下面是red hat 安装yum的方法</p>
<ol>
<li>下载包 :wget <a href="http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm">http://yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm</a> .<br />
当然也可以选择别的版本:<a href="http://yum.baseurl.org/download/2.0/">http://yum.baseurl.org/download/2.0/ </a></li>
<li>进入目录进行安装 :<br />
rpmbuild &#8211;rebuild yum-2.0.8-1.src.rpm<br />
cd  /usr/src/redhat/RPMS/noarch/<br />
rpm -ivh yum-2.0.8-1.noarch.rpm</li>
<li>如果报错 使用：rpm -ivh &#8211;nodeps &#8211;replacefiles &#8211;force ＊.rpm</li>
<li>配置yum更新地址

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p616code11'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p61611"><td class="code" id="p616code11"><pre class="shell" style="font-family:monospace;">[base]
&nbsp;
#name=Red Hat Linux $releasever - $basearch - Base
&nbsp;
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
&nbsp;
name=Red Hat Linux $releasever - $basearch - Base
&nbsp;
baseurl= http://centos.ustc.edu.cn/centos/4/os/i386/
&nbsp;
#[updates]
&nbsp;
#name=Red Hat Linux $releasever - Updates
&nbsp;
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/
&nbsp;
name=Red Hat Linux $releasever - Updates
&nbsp;
baseurl= http://mirror.centos.org/centos/4/updates/i386/
&nbsp;
[base]
#name=Red Hat Linux $releasever - $basearch - Base
&nbsp;
#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/
&nbsp;
name=Red Hat Linux $releasever - $basearch - Base
&nbsp;
baseurl= http://centos.ustc.edu.cn/centos/4/os/i386/</pre></td></tr></table></div>

</li>
<li>更新yum： yum update 等待更新完成就可以使用yum了。</li>
<li>下面是yum 基本命令介绍

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p616code12'); return false;">View Code</a> YUM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p61612"><td class="code" id="p616code12"><pre class="yum" style="font-family:monospace;">       install
              is used to install the latest version of a package or group of packages while ensuring that all dependencies are satisfied.
              If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed.
&nbsp;
       update If run without any packages, update will update every currently installed package.  If one or more packages are  specified,
              Yum  will  only  update the listed packages.  While updating packages, yum will ensure that all dependencies are satisfied.
              If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed.
&nbsp;
       check-update
              Implemented so you could know if your machine had any updates that needed to be applied without running  it  interactively.
              Returns  exit  value of 100 if there are packages available for an update. Also returns a list of the pkgs to be updated in
              list format. Returns 0 and no packages are available for update.
&nbsp;
       upgrade
              Can take packages as arguments, upgrade is just like update except that it includes package obsoletes in its calculations -
              this  makes  it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9. *deprecated* -
              this command may be removed in the future.
&nbsp;
       remove is used to remove the specified packages from the system as well as removing any packages which depend on the package being
              removed.
&nbsp;
       list   can  be  used to list various information about available packages; more complete details are available in the List Options
              section below.
&nbsp;
       provides
              can be used to find out which package provides some feature or file. Just use a specific name or a  file-glob-syntax  wild-
              cards to list the packages available or installed that provide that feature or file.
&nbsp;
       search can be used to find any packages matching a string in the description, summary, packager and package name fields of an rpm.
              Useful for finding a package you do not know by name but know by some word related to it. Takes the same  file  glob  wild-
              cards as provides.
&nbsp;
       info   can be used to list a description and summary information about available packages; takes the same arguments as in the List
              Options section below.
&nbsp;
       clean  is used to clean up various things which accumulate in the yup cache directory over time.  More  complete  details  can  be
              found in the Clean Options section below.</pre></td></tr></table></div>

</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/red-hat-centos-install-yum/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu使用经验分享</title>
		<link>http://www.blags.org/ubuntu-experience-sharing/</link>
		<comments>http://www.blags.org/ubuntu-experience-sharing/#comments</comments>
		<pubDate>Fri, 14 May 2010 15:11:15 +0000</pubDate>
		<dc:creator>huzhi</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=601</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;我对linux的使用是从ubuntu7.10开始,那时候我对windows也很不熟。既然学习编程，恰好是LAMP,我想，反正都不熟，学个人少的。这期间一直从8.04，8.10，9.04,9.10到最近的10.04。
      这款与天下人共享的操作系统，我的确是喜欢上了。对这款系统赞不绝口的人不是少数。尤其有趣的是一个叫袁萌的老头，各大IT网站都会转载他的博文，开口闭口必谈Ubuntu,而且行文常用括号解释，生怕人不懂。
&#160;&#160;&#160;&#160;&#160;&#160;呵呵，这老头，70来岁，如此痴迷ubuntu，真是可爱。桌面系统使用ubuntu的确不错，虽然易用，游戏方面不如windows，然开放分享的精神可嘉。而且，做LAMP这行，不用LINUX，说不过去。
&#160;&#160;&#160;&#160;&#160;&#160;上次我问金浩，你们金山的linux服务器是什么版本。他答ubuntu server 8.04 。呵呵，我还真不信，毕竟大多数都用 centos(和redhat一样，更自由，支持yum）；我说为什么选择它，他答，简单，就那么几条命令。维基百科也是采用ubuntu8.04。最近从9.10直接更新到了10.04,出现了一点小问题。主要是显示亮度和Flash乱码.比起以往繁琐的配置，这次安装没有什么配置了。积累了一些使用经验，上次老师要我写一份ubuntu文档，一直没有写，这次补上，和大家分享。

源列表：我是电信用户，一直用163的源，还不错。
查看cpu温度，同事笑我用笔记本，是对着CPU，内存用的，此话不假，我常输入top看看哪些东西占用资源。cpu温度很重要。
sudo apt-get install lm-sensors
sudo sensors-detect
查看: sensors
9.10中提供palimpset磁盘工具，我装完提示“one or more disks are failing&#8221; 我吓了一跳，心想磁盘坏了，提示有坏道。赶紧清理，呵呵，清理完重启就无法进入系统了。又重装了一次。10.04中这个问题没有了。 磁盘温度查看：
sudo apt-get install hddtemp
sudo hddtemp /dev/sda
安装硬件检测工具。ubuntu电源管理存在缺陷，这个Bug一直在官方Bug列表里，却没有重视。使用电源时候，Load_Cycle_Count每几分钟就增加了2次。开始时我也到处找解决办法，到后来发现这根本不重要，磁盘可以Load_Cycle_Count可以有60多万次。看看我使用半年的结果(2373)：
sudo apt-get install smartmontools  //安装
man smartctl //不懂的先问下男人，他会告诉你怎么做，养成习惯。不见得比gogole，baidu出来的差
sudo smartctl -a /dev/sda &#124; grep Load_Cycle_Count
193 Load_Cycle_Count        0&#215;0032   100   <a href="http://www.blags.org/ubuntu-experience-sharing/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我对<a href="http://www.blags.org/tags/linux/"target="_self"title="linux" >linux</a>的使用是从<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>7.10开始,那时候我对windows也很不熟。既然学习编程，恰好是LAMP,我想，反正都不熟，学个人少的。这期间一直从8.04，8.10，9.04,9.10到最近的10.04。</p>
<p>      这款与天下人共享的操作系统，我的确是喜欢上了。对这款系统赞不绝口的人不是少数。尤其有趣的是一个叫袁萌的老头，各大IT网站都会转载他的博文，开口闭口必谈Ubuntu,而且行文常用括号解释，生怕人不懂。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;呵呵，这老头，70来岁，如此痴迷ubuntu，真是可爱。桌面系统使用ubuntu的确不错，虽然易用，游戏方面不如windows，然开放分享的精神可嘉。而且，做LAMP这行，不用LINUX，说不过去。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;上次我问金浩，你们金山的linux服务器是什么版本。他答ubuntu server 8.04 。呵呵，我还真不信，毕竟大多数都用 <a href="http://www.blags.org/tags/centos/"title="centos 系统" >centos</a>(和redhat一样，更自由，支持yum）；我说为什么选择它，他答，简单，就那么几条命令。维基百科也是采用ubuntu8.04。最近从9.10直接更新到了10.04,出现了一点小问题。主要是显示亮度和Flash乱码.比起以往繁琐的配置，这次安装没有什么配置了。积累了一些使用经验，上次老师要我写一份ubuntu文档，一直没有写，这次补上，和大家分享。</p>
<ol>
<li>源列表：我是电信用户，一直用163的源，还不错。</li>
<li>查看cpu温度，同事笑我用笔记本，是对着CPU，内存用的，此话不假，我常输入top看看哪些东西占用资源。cpu温度很重要。<br />
sudo apt-get install lm-sensors<br />
sudo sensors-detect<br />
查看: sensors</li>
<li>9.10中提供palimpset磁盘工具，我装完提示“one or more disks are failing&#8221; 我吓了一跳，心想磁盘坏了，提示有坏道。赶紧清理，呵呵，清理完重启就无法进入系统了。又重装了一次。10.04中这个问题没有了。 磁盘温度查看：<br />
sudo apt-get install hddtemp<br />
sudo hddtemp /dev/sda</li>
<li>安装硬件检测工具。ubuntu电源管理存在缺陷，这个Bug一直在官方Bug列表里，却没有重视。使用电源时候，Load_Cycle_Count每几分钟就增加了2次。开始时我也到处找解决办法，到后来发现这根本不重要，磁盘可以Load_Cycle_Count可以有60多万次。看看我使用半年的结果(2373)：<br />
sudo apt-get install smartmontools  //安装<br />
man smartctl //不懂的先问下男人，他会告诉你怎么做，养成习惯。不见得比gogole，baidu出来的差<br />
sudo smartctl -a /dev/sda | grep Load_Cycle_Count<br />
193 Load_Cycle_Count        0&#215;0032   100   100   000    Old_age   Always       &#8211;       2373</li>
<li>cpu频率有五档：cpufreq-info会告诉你：available cpufreq governors: conservative, ondemand, userspace, powersave, performance。默认是ondemand;<br />
先安装 sudo apt-get install cpufrequtils<br />
man cpufreq-set<br />
sudo cpufreq-set -g powersave //设置为最低<br />
sudo cpuferq-set -c 1 -g powersave //双核cpu 设置第二个<br />
开个虚拟机，Cpu高的吓人，动不动130%，温度狂飙。没办法，Cpu设置最低频率，cpu使用再多，温度不会怎么涨。</li>
<li> 默认字体不敢恭维，使用微软雅黑吧。金浩说，Vista的一大贡献。的确不假。<br />
wget -O get-fonts.sh.zip http://files.cnblogs.com/DengYangjun/get-fonts.sh.zip<br />
unzip -o get-fonts.sh.zip 1&gt;/dev/null<br />
chmod a+x get-fonts.sh<br />
./get-fonts.sh<br />
四步解决，尤其是Monco字体，g<a href="http://www.blags.org/tags/vim/"title="vim" >vim</a>我就是使用的它</li>
<li>scim输入法和很多的软件冲突。ficx听说不错，没有用过，用过ibus后，就没又换个其他的了。9.10已经默认为ibus了，不过，没有语言包更新前是没有最常用的ibus 汉语pinyin的。<br />
ibus的安装 sudo apt-get install ibus //ibus-table是一些额外码表，有五笔、郑码、仓颉<br />
下载ibus-pinyin 在http://forum.ubuntu.org.cn/viewtopic.php?f=8&amp;t=199857&amp;start=0<br />
sudo im-switch -c\<br />
sudo im-switch -s ibus<br />
重启X</li>
<li>浏览器的天下在linux中当然是firefox。不过，此君虽优秀，但也不是省油的灯。占用内存，CPU太大太多。不调试AJAX，非要使用了Firebug,我也很少用firefox。平常浏览网页Google chrome for linux，一个字，快。opera10推出来了，但浏览器的份额却载下降。不过。opera默认字体不好看，而且，首选项里设置不会起效果。下面这种方法可行。<br />
cd ~/.opera/styles/user/<br />
touch user.css<br />
gedit ~/.opera/styles/user/user.css<br />
录入以下内容：<br />
html,body,*{<br />
font-family:”Microsoft YaHei”!important;}<br />
重启浏览器后选择查看－&gt;样式-&gt;user.css</li>
<li>无线驱动：Broadcom STA 无线驱动 9.04系统-&gt;系统管理-&gt;硬件驱动时有时没有，这是个无线网卡驱动程序，还好，9.10没有这样的现象。<br />
命令配置：<br />
sudo iwconfig eth1 essid ZTE4E8DA4 key s:dfasdfd<br />
sudo dhclient eth1<br />
Wicd网络管理，比默认的networkManger在无线管理上要好点。不过，我很少用工具，习惯了改配置文件，有线网络配置三种方法如下（校园网锐捷不提，需下载特殊的文件）<br />
sudo vim /etc/network/interfaces<br />
静态IP配置文件/etc/network/interfaces<br />
auto lo<br />
iface lo inet loopback<br />
auto eth0<br />
iface eth0 inet staticaddress 192.168.1.109netmask 255.255.255.0<br />
gateway 192.168.1.1<br />
ifconfig eth0 up<br />
动态IP配置<br />
auto lo<br />
iface lo inet loopback<br />
auto eth0<br />
iface eth0 inet dhcp<br />
ifconfig eth0 up<br />
拨号上网 sudo pppoeconf 按提示操作</li>
<li>安装KDE卸载后登录界面仍然为KDE的界面，转变成gnome界面的解决办法：<br />
执行：update-usplash-theme<br />
sudo update-usplash-theme usplash-theme-ubuntu</li>
<li>虚拟机有virtualbox3.0和vmware workstion7 。如果使用，还是vmware吧，虽然virtuabox开源，vmware还要找注册码。不过，vmware的确稳定而且资源占用少点。</li>
<li>办公软件推荐Openoffice和永中Office.金山开源了UOF SDK 还没仔细看。</li>
<li>LAMP安装，系统新立得里面去标记安装LAMP套件。什么都配置好了。完毕只需安装sudo apt-get install phpmyadmin</li>
<li>思维导图,xmind是国人开发的，使用很方便。网址: ximd.net</li>
<li>ftp客户端工具。使用了很多，还是gftp好。偏偏ubuntu wiki软件推荐里面，这款是不推荐的，我看不错。</li>
<li>云计算这两年太火了。我一直在想云这东西是什么，有什么用。不过，ubuntuOne 算一款私有云彩。虽然现在还不灿烂，2G免费空间，存点文档够了。不知可否跨平台。以前一直用 dropbox，可跨平台，想看看的，点https://www.getdropbox.com/referrals/NTI2MjY5OTc5 注册，还能帮我增加点空间。</li>
<li>chm工具没有什么好的。比来比去，chmSee好点。</li>
<li>密码管理工具keepassx绝对值得用。而且跨平台，DBM数据存储。</li>
<li>MSN： sudo apt-get install  emesene QQ :linux for QQ 从来不更新，pidgin也不错。以前是ubuntu默认的IM，现在换成了empathy</li>
<li>终端gnome-terminal,kde下konsole,terminal支持分割，kde下还有一款优秀的Yakuake。</li>
<li>看电影,Mplayer；</li>
<li>数据库设计工具:<a href="http://www.blags.org/tags/mysql/"title="mysql" >mysql</a>-workbench。简单，高效。</li>
<li>程序测试xdebug.结果查看kcachegrind，不过需安装很多的软件包。webgrind可以放在apache根目录下，网页查看。</li>
<li>gimp号称linux下的photoshop ,两者从未使用。 上个老师半年的课，至今无法画丑小鸦，易拉罐，实属遗憾。<br />
最近从9.10升级到10.04 发现屏幕亮度没法调节,查阅了很多资料，改启动项都没有效果。最后，装了个ATI Catalyst Control Center才有效果。</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-experience-sharing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ubuntu windows 文件共享</title>
		<link>http://www.blags.org/ubuntu-windows-file-sharing/</link>
		<comments>http://www.blags.org/ubuntu-windows-file-sharing/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 04:28:25 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[File Sharing]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smbfs]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=591</guid>
		<description><![CDATA[文件共享在团队合作中是比较重要的。最经和同事一起协作开发就用到了,方法贴出来把。
安装samba：
sudo apt-get install samba
sudo apt-get install smbfs
下面我们来共享群组可读写文件夹，假设你要共享的文件夹为： /home/ray/share
首先创建这个文件夹
mkdir /home/ray/share
chmod 777 /home/ray/share
备份并编辑smb.conf允许网络用户访问
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
搜寻这一行文字
;security = user
用下面这几行取代
security = user
username map = /etc/samba/smbusers
 若要使用用户可以匿名访问到，用下面这一行取代：
 security = share
将下列几行新增到文件的最后面，假设允许访问的用户为：youuser。而文件夹的共享名为 Share
[Share]
comment = Shared Folder with username and password
path = /home/ray/share
public = yes
writable = yes
valid users = youuser
create mask = 0700
directory mask = 0700
force user = nobody
force group = <a href="http://www.blags.org/ubuntu-windows-file-sharing/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>文件共享在团队合作中是比较重要的。最经和同事一起协作开发就用到了,方法贴出来把。</p>
<p>安装samba：</p>
<p>sudo apt-get install samba</p>
<p>sudo apt-get install smbfs</p>
<p>下面我们来共享群组可读写文件夹，假设你要共享的文件夹为： /home/ray/share</p>
<p>首先创建这个文件夹</p>
<p>mkdir /home/ray/share</p>
<p>chmod 777 /home/ray/share</p>
<p>备份并编辑smb.conf允许网络用户访问</p>
<p>sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup</p>
<p>sudo gedit /etc/samba/smb.conf</p>
<p>搜寻这一行文字</p>
<p>;security = user</p>
<p>用下面这几行取代</p>
<p>security = user</p>
<p>username map = /etc/samba/smbusers</p>
<p><span style="color: #ff0000;"> <span style="color: #888888;">若要使用用户可以匿名访问到，用下面这一行取代：</span></span></p>
<p><span style="color: #888888;"> security = share</span></p>
<p>将下列几行新增到文件的最后面，假设允许访问的用户为：youuser。而文件夹的共享名为 Share</p>
<p>[Share]</p>
<p>comment = Shared Folder with username and password</p>
<p>path = /home/ray/share</p>
<p>public = yes</p>
<p>writable = yes</p>
<p>valid users = youuser</p>
<p>create mask = 0700</p>
<p>directory mask = 0700</p>
<p>force user = nobody</p>
<p>force group = nogroup</p>
<p>available = yes</p>
<p>browseable = yes</p>
<p>然后顺便把这里改一下，找到[global]把 workgroup = MSHOME 改成</p>
<p>workgroup = WORKGROUP</p>
<p>display charset = UTF-8</p>
<p>unix charset = UTF-8</p>
<p>dos charset = cp936</p>
<p>后面的三行是为了防止出现中文目录乱码的情况。其中根据你的local，UTF-8 有可能需要改成 cp936。自己看着办吧。</p>
<p>现在要添加youuser这个网络访问帐户。如果系统中当前没有这个帐户，那么</p>
<p>sudo useradd youuser</p>
<p>要注意，上面只是增加了youuser这个用户，却没有给用户赋予本机登录密码。所以这个用户将只能从远程访问，不能从本机登录。而且samba的登录密码可以和本机登录密码不一样。</p>
<p>现在要新增网络使用者的帐号：</p>
<p>sudo smbpasswd -a youuser</p>
<p>sudo gedit /etc/samba/smbusers</p>
<p>在新建立的文件内加入下面这一行并保存</p>
<p>youuser = &#8220;network username&#8221;</p>
<p>如果将来需要更改youuser的网络访问密码，也用这个命令更改</p>
<p>sudo smbpasswd -a youuser</p>
<p>删除网络使用者的帐号的命令把上面的 -a 改成 -x</p>
<p>sudo testparm</p>
<p>sudo /etc/init.d/samba restart</p>
<p>重启下samba服务。</p>
<p>windows 输入你的ip输入用户名和密码就能访问了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-windows-file-sharing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ubuntu 路由上网</title>
		<link>http://www.blags.org/ubuntu-internet-routing/</link>
		<comments>http://www.blags.org/ubuntu-internet-routing/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 02:19:13 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[route]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=574</guid>
		<description><![CDATA[ubuntu(9.04,9.10,10.04) 路由上网
1.sudo pppoeconf 先设置好拨号上网按照提示输入用户名和密码。
2.sudo gvim /etc/network/interfaces
预先做好备份。copy如下。

View Code SHELLauto lo
iface lo inet loopback
auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
&#160;
auto eth0
iface eth0 inet dhcp

3.sudo /etc/init.d/networking restart 重启一下
查看路由状态命令。
命令：route
大功告成。
]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>(9.04,9.10,10.04) 路由上网</span></p>
<p>1.sudo pppoeconf 先设置好拨号上网按照提示输入用户名和密码。</p>
<p>2.sudo g<a href="http://www.blags.org/tags/vim/"title="vim" >vim</a> /etc/network/interfaces<br />
预先做好备份。copy如下。</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p574code14'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p57414"><td class="code" id="p574code14"><pre class="shell" style="font-family:monospace;">auto lo
iface lo inet loopback
auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
&nbsp;
auto eth0
iface eth0 inet dhcp</pre></td></tr></table></div>

<p>3.sudo /etc/init.d/networking restart 重启一下<br />
查看路由状态命令。<br />
命令：route</p>
<div id="attachment_575" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.blags.org/wp-content/Upload/Screenshot4.png"><img class="size-medium wp-image-575" title="ubuntu 路由状态" src="http://www.blags.org/wp-content/Upload/Screenshot4-300x56.png" alt="ubuntu 路由状态" width="300" height="56" /></a><p class="wp-caption-text">ubuntu 路由状态</p></div>
<p>大功告成。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-internet-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 语音通话软件 skype</title>
		<link>http://www.blags.org/ubuntu-voice-software-skype/</link>
		<comments>http://www.blags.org/ubuntu-voice-software-skype/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 14:40:47 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=570</guid>
		<description><![CDATA[&#160;&#160;&#160;最近一直在弄一个ubuntu下的语音通话软件－－－－－－－－－skype，为了和一哥们一起协同开发。
开始的时候一直都是噪音，尝试了很多方法，都没有能解决。
1.sudo alsamixer 进行调整无效。
2. 也无效,此处按钮自己会左边的控制自动滑下去了，调上去噪音没有了，一说话又自动滑下去了。
还有一些说是驱动的问题。
最终解决：
后来猛的一看skype上面有一个噪音控制取消掉就行了。
skype-&#62;选项－&#62;声音设备－&#62;允许skype自动调整我的混淆音级别。
这样就好了。
]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;最近一直在弄一个<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>下的语音通话软件－－－－－－－－－skype，为了和一哥们一起协同开发。</p>
<p>开始的时候一直都是噪音，尝试了很多方法，都没有能解决。<br />
1.sudo alsamixer 进行调整无效。<br />
2.<a href="http://www.blags.org/wp-content/Upload/Screenshot3.png"><img class="aligncenter size-medium wp-image-571" title="ubuntu 音频控制" src="http://www.blags.org/wp-content/Upload/Screenshot3-300x219.png" alt="ubuntu 音频控制" width="300" height="219" /></a> 也无效,此处按钮自己会左边的控制自动滑下去了，调上去噪音没有了，一说话又自动滑下去了。</p>
<div id="attachment_572" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.blags.org/wp-content/Upload/Screenshot-12.png"><img class="size-medium wp-image-572" title="ubuntu 录音调节" src="http://www.blags.org/wp-content/Upload/Screenshot-12-300x200.png" alt="ubuntu 录音调节" width="300" height="200" /></a><p class="wp-caption-text">ubuntu 录音调节</p></div>
<p><span style="color: #ff0000;"><span style="color: #000000;">还有一些说是驱动的问题。</span><br />
最终解决</span>：</p>
<p>后来猛的一看skype上面有一个噪音控制取消掉就行了。</p>
<p>skype-&gt;选项－&gt;声音设备－&gt;允许skype自动调整我的混淆音级别。</p>
<div id="attachment_573" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.blags.org/wp-content/Upload/Screenshot-3.png"><img class="size-medium wp-image-573" title="允许skype自动调整我的混淆音级别。" src="http://www.blags.org/wp-content/Upload/Screenshot-3-300x254.png" alt="" width="300" height="254" /></a><p class="wp-caption-text">允许skype自动调整我的混淆音级别。</p></div>
<p>这样就好了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-voice-software-skype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu ip 设置 启动</title>
		<link>http://www.blags.org/ubuntu-ip-set-to-start/</link>
		<comments>http://www.blags.org/ubuntu-ip-set-to-start/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 02:48:27 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=566</guid>
		<description><![CDATA[/etc/network/interfaces
打开后里面可设置DHCP或手动设置静态ip。前面auto eth0，让网卡开机自动挂载.
1. 以DHCP方式配置网卡
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp
用下面的命令使网络设置生效:
sudo /etc/init.d/networking restart
也可以在命令行下直接输入下面的命令来获取地址
sudo dhclient eth0

2. 为网卡配置静态IP地址
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.3.90
gateway 192.168.3.1
netmask 255.255.255.0
#network 192.168.3.0
#broadcast 192.168.3.255
将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:
sudo /etc/init.d/networking restart
(sudo /etc/init.d/networking force-reload)
3. 设定第二个IP地址(虚拟IP地址)
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
在该文件中添加如下的行:
auto eth0
iface eth0 inet static
address 192.168.1.60
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway <a href="http://www.blags.org/ubuntu-ip-set-to-start/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>/etc/network/interfaces<br />
打开后里面可设置DHCP或手动设置静态ip。前面auto eth0，让网卡开机自动挂载.</p>
<p><strong>1. </strong><strong>以DHCP方式</strong><strong>配置</strong><strong>网卡</strong></p>
<p>编辑文件/etc/network/interfaces:<br />
<code><span style="font-family: 新宋体;">sudo vi /etc/network/interfaces</span></code></p>
<p>并用下面的行来替换有关eth0的行:<br />
<code><span style="font-family: 新宋体;"># The primary network interface - use DHCP to find our address<br />
auto eth0<br />
iface eth0 inet dhcp</span></code></p>
<p>用下面的命令使网络设置生效:<br />
<span style="font-family: 新宋体;"><code>sudo /etc/init.d/networking restart</code><br />
</span>也可以在命令行下直接输入下面的命令来获取地址</p>
<p><span style="font-family: 新宋体;"><code>sudo dhclient eth0</code><br />
</span><strong><br />
2. 为网卡配置静态IP地址</strong></p>
<p>编辑文件/etc/network/interfaces:</p>
<p><code><span style="font-family: 新宋体;">sudo vi /etc/network/interfaces</span></code></p>
<p>并用下面的行来替换有关eth0的行:# The primary network interface<br />
<code><span style="font-family: 新宋体;">auto eth0<br />
iface eth0 inet static<br />
address 192.168.3.90<br />
gateway 192.168.3.1<br />
netmask 255.255.255.0<br />
#network 192.168.3.0<br />
#broadcast 192.168.3.255</span></code></p>
<p>将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:<br />
<code><span style="font-family: 新宋体;">sudo /etc/init.d/networking restart</span></code></p>
<p>(sudo /etc/init.d/networking force-reload)</p>
<p><strong>3. 设定第二个IP地址(虚拟IP地址)</strong></p>
<p>编辑文件/etc/network/interfaces:</p>
<p><code><span style="font-family: 新宋体;">sudo vi /etc/network/interfaces</span></code></p>
<p>在该文件中添加如下的行:<br />
<code><span style="font-family: 新宋体;">auto eth0<br />
iface eth0 inet static<br />
address 192.168.1.60<br />
netmask 255.255.255.0<br />
network x.x.x.x<br />
broadcast x.x.x.x<br />
gateway x.x.x.x</span></code></p>
<p>根据你的情况填上所有诸如address,netmask,network,broadcast和gateways等信息.<br />
用下面的命令使网络设置生效:<br />
<code><span style="font-family: 新宋体;">sudo /etc/init.d/networking restart</span></code></p>
<p>(sudo /etc/init.d/networking force-reload)</p>
<p><strong>4. 设置主机名称(hostname)</strong></p>
<p>使用下面的命令来查看当前主机的主机名称:</p>
<p><code><span style="font-family: 新宋体;">sudo /bin/hostname</span></code></p>
<p>使用下面的命令来设置当前主机的主机名称:<br />
<code><br />
<span style="font-family: 新宋体;">sudo /bin/hostname newname</span></code></p>
<p>系统启动时,它会从/etc/hostname来读取主机的名称.</p>
<p><a href="http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html" target="_blank"></a></p>
<p><strong>5. 配置DNS</strong></p>
<p>首先,你可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.</p>
<p>要访问DNS 服务器来进行查询,需要设置/etc/resolv.conf文件.<br />
假设DNS服务器的IP地址是192.168.3.2, 那么/etc/resolv.conf文件的内容应为:</p>
<p><code><span style="font-family: 新宋体;">search test.com<br />
nameserver 192.168.3.2<br />
</span></code>执行下面两个命令，启用新设置<br />
sudo ifdown eth0<br />
sudo ifup eth0</p>
<p><span style="font-family: 新宋体;">网络转载.</span></p>
<p><strong>下面是一些网络状况的命令：</strong></p>
<p>ifconfig route<br />
ifconfig etho inet down 关闭网络连接<br />
<span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: verdana,sans-serif; font-size: 12px; line-height: 15px;">启动 eth0 并给予其新的 IP 地址和路由。</span></span><br />
<span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: verdana,sans-serif; font-size: 12px; line-height: 15px;"></p>
<pre style="border: 1px dashed #666666; padding: 15px 20px; overflow: auto; font-size: 1em; background-color: #eeeeee;"># ifconfig eth0 inet up 192.168.0.111 \
netmask 255.255.255.0 broadcast 192.168.0.255
# route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.1 dev eth0</pre>
<p></span></span></p>
<p>dhcp 配置接口</p>
<p>iface eth0 inet dhcp 配置接口。<span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: verdana,sans-serif; font-size: 12px; line-height: 15px;"> </span></span></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1167px; width: 1px; height: 1px;"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: verdana,sans-serif; font-size: 12px; line-height: 15px;"></p>
<pre style="border: 1px dashed #666666; padding: 15px 20px; overflow: auto; font-size: 1em; background-color: #eeeeee;">fconfig eth0 inet up 192.168.0.111</pre>
<p></span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-ip-set-to-start/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ubuntu gnome 自定义快捷键方法</title>
		<link>http://www.blags.org/ubuntu-customizable-keyboard-shortcuts/</link>
		<comments>http://www.blags.org/ubuntu-customizable-keyboard-shortcuts/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 12:48:16 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[gnome]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=550</guid>
		<description><![CDATA[作为Ubuntu默认的桌面环境，GNOME 是一种支持多种平台的开发&#38;桌面环境，并且 GNOME 拥有很多强大的特性，如高质量的平滑文本渲染，首个国际化和可用性支持等。好了，以下是我使用 Ubuntu 时发现的一些有用的技巧，这里分享给大家。
1、用快捷键启动程序
为您指定的程序添加一个键盘快捷键，只需按相应快捷键便能启动程序等，就像我们使用 XP 时为快捷方式添加热键一样，GNOME 也有这些功能，而且设置并不难。首先打开终端输入：
gconf-editor
依次打开“Apps-&#62;Metacity-&#62;keybinding Commands”，这里一共能定义12条命令，如下图所示，我设置了 command_1 打开 Rhythmbox 播放器，command_2 打开 Swiftfox 浏览器，command_3 打开终端，您可以把您需要的命令添加进去。
添加完成后，去到“Apps-&#62;Metacity-&#62;Global keybingdings”，添加上您想要的快捷键。例如我上面一共填写了3条命令，分别填写在 command_1、command_2、command_3，那么我要在run_command_1，run_command_2， run_command_3 上填写快捷键组合，快捷键可以是 、、、F1 到 F12 和字母的组合，F1 表示同时按着 Ctrl＋Alt＋F1 键，如此类推。
现在只要按刚刚设置好的快捷键便能运行命令了。
2、把“桌面”文件夹设为自己的主目录
即使用家目录做为桌面上显示默认目录，打开配置编辑器，在终端运行
gconf-editor
去到 “Apps-&#62;nautilus-&#62;preferences” 下，启用 desktop_is_home_dir ，重启 X 即可。
3、在鼠标右键菜单中的“创建文档” 增加新项目
默认的只有一个空文件，其实很简单便能添加自己喜欢的模板。对于最新的 Ubuntu 7.10，在您主目录下有一个“模板”的文件夹，对，就是他了，在里面新建您需要的模板，例如新建一个 “文本文件.txt”，在鼠标右键菜单便会出现“文本文件”这个选项。如此类推，您可以新建 OpenOffice.org 文档、GIMP 文件等。
4、调整图标的大小
GNOME 默认的图标大小对于1024×768分辨率来说有点偏大，要改变大小，打开文件浏览器，例如从 “位置” 里打开 “主文件夹”，点 “编辑” &#8211;&#62; “首选项”，把 “图标视图默认值” 下的 “默认缩放级别” 改为 75％。现在图标大小跟 WinXP <a href="http://www.blags.org/ubuntu-customizable-keyboard-shortcuts/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>作为<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >Ubuntu</a>默认的桌面环境，GNOME 是一种支持多种平台的开发&amp;桌面环境，并且 GNOME 拥有很多强大的特性，如高质量的平滑文本渲染，首个国际化和可用性支持等。好了，以下是我使用 Ubuntu 时发现的一些有用的技巧，这里分享给大家。<br />
1、用快捷键启动程序<br />
为您指定的程序添加一个键盘快捷键，只需按相应快捷键便能启动程序等，就像我们使用 XP 时为快捷方式添加热键一样，GNOME 也有这些功能，而且设置并不难。首先打开终端输入：<br />
gconf-editor<br />
依次打开“Apps-&gt;Metacity-&gt;keybinding Commands”，这里一共能定义12条命令，如下图所示，我设置了 command_1 打开 Rhythmbox 播放器，command_2 打开 Swiftfox 浏览器，command_3 打开终端，您可以把您需要的命令添加进去。<br />
添加完成后，去到“Apps-&gt;Metacity-&gt;Global keybingdings”，添加上您想要的快捷键。例如我上面一共填写了3条命令，分别填写在 command_1、command_2、command_3，那么我要在run_command_1，run_command_2， run_command_3 上填写快捷键组合，快捷键可以是 、、、F1 到 F12 和字母的组合，F1 表示同时按着 Ctrl＋Alt＋F1 键，如此类推。<br />
现在只要按刚刚设置好的快捷键便能运行命令了。<br />
2、把“桌面”文件夹设为自己的主目录<br />
即使用家目录做为桌面上显示默认目录，打开配置编辑器，在终端运行<br />
gconf-editor<br />
去到 “Apps-&gt;nautilus-&gt;preferences” 下，启用 desktop_is_home_dir ，重启 X 即可。<br />
3、在鼠标右键菜单中的“创建文档” 增加新项目<br />
默认的只有一个空文件，其实很简单便能添加自己喜欢的模板。对于最新的 Ubuntu 7.10，在您主目录下有一个“模板”的文件夹，对，就是他了，在里面新建您需要的模板，例如新建一个 “文本文件.txt”，在鼠标右键菜单便会出现“文本文件”这个选项。如此类推，您可以新建 OpenOffice.org 文档、GIMP 文件等。<br />
4、调整图标的大小<br />
GNOME 默认的图标大小对于1024×768分辨率来说有点偏大，要改变大小，打开文件浏览器，例如从 “位置” 里打开 “主文件夹”，点 “编辑” &#8211;&gt; “首选项”，把 “图标视图默认值” 下的 “默认缩放级别” 改为 75％。现在图标大小跟 WinXP 下的差不多。<br />
如果您看过 Suse 发行版的截图，会发现他的 KDE 桌面上有一个很大的主目录图标，其实 GNOME 也能实现，打开配置编辑器。<br />
gconf-editor<br />
去到 “Apps-&gt;nautilus-&gt;desktop” 下，启用 “home_icon_visible” ，桌面会显示自己的主目录的图标，对着他点鼠标右键，选择“伸展图标”，拖动到自己想要的大小便可。<br />
5、隐藏桌面的挂载卷<br />
同样是打开配置管理器<br />
gconf-editor<br />
去到 “Apps-&gt;nautilus-&gt;desktop” 下，去掉 volumes_visible 前面的复选框即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-customizable-keyboard-shortcuts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ubuntu 9.10 dpkg 错误</title>
		<link>http://www.blags.org/ubuntu-9-10-dpkg-error/</link>
		<comments>http://www.blags.org/ubuntu-9-10-dpkg-error/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:23:14 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=547</guid>
		<description><![CDATA[Ubuntu错误提示:
dpkg: 语法分析错误，在“/var/lib/dpkg/available”文件的第“21728”行附近 软件包“libgnomevfs2-extra”:
该上下文中不允许“status”字段的值
E: Sub-process /usr/bin/dpkg returned an error code (2)
dpkg: 语法分析错误，在“/var/lib/dpkg/available”文件的第“21728”行附近 软件包“libgnomevfs2-extra”: 该上下文中不允许“status”字段的值E: Sub-process /usr/bin/dpkg returned an error code (2)
解决方法:
martin@martin-desktop:~$ sudo apt-get update
martin@martin-desktop:~$ sudo dpkg &#8211;clear-avail
martin@martin-desktop:~$ sudo dpkg &#8211;configure -a
martin@martin-desktop:~$ sudo apt-get install dselect
martin@martin-desktop:~$ sudo dselect update 


以上从网路收集做个记录。




]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste"><strong><a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >Ubuntu</a>错误提示:</strong></div>
<div><span style="color: #808080;">dpkg: 语法分析错误，在“/var/lib/dpkg/available”文件的第“21728”行附近 软件包“libgnomevfs2-extra”:</span></div>
<div id="_mcePaste"><span style="color: #808080;">该上下文中不允许“status”字段的值</span></div>
<div id="_mcePaste"><span style="color: #808080;">E: Sub-process /usr/bin/dpkg returned an error code (2)</span></div>
<p><span style="color: #808080;">dpkg: 语法分析错误，在“/var/lib/dpkg/available”文件的第“21728”行附近 软件包“libgnomevfs2-extra”: 该上下文中不允许“status”字段的值E: Sub-process /usr/bin/dpkg returned an error code (2)</span></p>
<p><span style="color: #808080;">解决方法:</span></p>
<p><span style="color: #808080;"><span style="color: #000000;">martin@martin-desktop:~$ sudo apt-get update<br />
martin@martin-desktop:~$ sudo dpkg &#8211;clear-avail<br />
martin@martin-desktop:~$ sudo dpkg &#8211;configure -a<br />
martin@martin-desktop:~$ sudo apt-get install dselect<br />
martin@martin-desktop:~$ sudo dselect update </span></span></p>
<div>
<div>
<div><span style="color: #000000;">以上从网路收集做个记录。</span></div>
</div>
</div>
<p><span style="color: #808080;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-9-10-dpkg-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ubuntu man 汉化</title>
		<link>http://www.blags.org/ubuntu-man-chinese-localization/</link>
		<comments>http://www.blags.org/ubuntu-man-chinese-localization/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 09:53:15 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[man]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=545</guid>
		<description><![CDATA[1.添加库函数手册
ubuntu默认是没有安装c语言的库函数man手册的，所以你在man perror 和sendto之类的函数时会显示没有相关文档的问题，这个问题让我郁闷了我好久。解决方法：
sudo apt-get install manpages-dev
2.让man显示中文
ubuntu源里面已经包含了中文的man包，所以不用从其他地方down了，直接
sudo apt-get install manpages-zh
但是这样man默认显示的还不是中文，还需要以下两步
a.把中文man包转换成utf8格式的
新建一个脚本文件
gedit t.sh
把下面内容添加进去
#!/bin/bashcd /usr/share/man/zh_CN/for k in *docd $kfor i in *.gzdo j=`echo ${i%.gz}` gunzip $i iconv -f gb18030 -t utf8 $j &#62;tmp mv tmp $j gzip $jdonecd ..done
然后
sudo ./t
b.修改man默认的语言
sudo gedit /etc/manpath.config 把里面的所有的 /usr/share/man 改成 /usr/share/man/zh_CN
保存后退出，然后你再试一下man ls
3.让没有中文帮助的显示英文
做完上面第二部还不够，这时你再man 一下一些c语言函数（不要用printf，socket之类比较有名的函数，这些已经有中文帮助了）的时候就会发现竟然没有帮助，而刚才明明在第一步已经 安装了啊。这是因为你上面 把/usr/share/man 改成 /usr/share/man/zh_CN的操作使man只在中文帮助中搜索，如果没有就直接放弃，因此还需要以下操作，才能让man在没有中文帮助的时 候自动显示英文的帮助，如果英文的也没有，哪就真的没有了。
sudo gedit /etc/manpath.config
然后搜索你刚才改过的地方，然后在其后面添加同样的一行，只是后面的目录还用原来的/usr/share/man，比如在修改后的
MANPATH_MAP /bin          <a href="http://www.blags.org/ubuntu-man-chinese-localization/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>1.添加库函数手册</strong><br />
<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>默认是没有安装c语言的库函数man手册的，所以你在man perror 和sendto之类的函数时会显示没有相关文档的问题，这个问题让我郁闷了我好久。解决方法：<br />
<span>sudo apt-get install manpages-dev</span><br />
<strong>2.让man显示中文</strong><br />
ubuntu源里面已经包含了中文的man包，所以不用从其他地方down了，直接<br />
<span>sudo apt-get install manpages-zh</span><br />
但是这样man默认显示的还不是中文，还需要以下两步<br />
<em>a.把中文man包转换成utf8格式的</em><br />
新建一个脚本文件<br />
gedit t.sh<br />
把下面内容添加进去<br />
#!/bin/bashcd /usr/share/man/zh_CN/for k in *docd $kfor i in *.gzdo j=`echo ${i%.gz}` gunzip $i iconv -f gb18030 -t utf8 $j &gt;tmp mv tmp $j gzip $jdonecd ..done<br />
然后<br />
sudo ./t<br />
<em>b.修改man默认的语言</em><br />
sudo gedit /etc/manpath.config 把里面的所有的 /usr/share/man 改成 /usr/share/man/zh_CN<br />
保存后退出，然后你再试一下man ls<br />
<strong>3.让没有中文帮助的显示英文</strong><br />
做完上面第二部还不够，这时你再man 一下一些c语言函数（不要用printf，socket之类比较有名的函数，这些已经有中文帮助了）的时候就会发现竟然没有帮助，而刚才明明在第一步已经 安装了啊。这是因为你上面 把/usr/share/man 改成 /usr/share/man/zh_CN的操作使man只在中文帮助中搜索，如果没有就直接放弃，因此还需要以下操作，才能让man在没有中文帮助的时 候自动显示英文的帮助，如果英文的也没有，哪就真的没有了。<br />
sudo gedit /etc/manpath.config<br />
然后搜索你刚才改过的地方，然后在其后面添加同样的一行，只是后面的目录还用原来的/usr/share/man，比如在修改后的<br />
MANPATH_MAP /bin          /usr/share/man/zh_CN<br />
再添加一行<br />
MANPATH_MAP /bin          /usr/share/man</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-man-chinese-localization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 磁盘修复命令</title>
		<link>http://www.blags.org/ubuntu-disk-repair-command/</link>
		<comments>http://www.blags.org/ubuntu-disk-repair-command/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:38:24 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix&Linux]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=430</guid>
		<description><![CDATA[针对ubuntu无法启动,文件系统损坏.记录一下.

View Code SHELLfsck.ext4 -y /dev/sdb15

ps:上面&#8217;sdb15&#8216;部分代表需要修复的分区
]]></description>
			<content:encoded><![CDATA[<p>针对<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>无法启动,文件系统损坏.记录一下.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p430code16'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p43016"><td class="code" id="p430code16"><pre class="shell" style="font-family:monospace;">fsck.ext4 -y /dev/sdb15</pre></td></tr></table></div>

<p>ps:上面&#8217;<span style="color: #ff0000;">sdb15</span>&#8216;部分代表需要修复的分区</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-disk-repair-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ubuntu 9.10 mysql安装sphinx mmseg 笔记</title>
		<link>http://www.blags.org/ubuntu-9-10-mysql-install-sphinx-mmseg-notes/</link>
		<comments>http://www.blags.org/ubuntu-9-10-mysql-install-sphinx-mmseg-notes/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 08:47:12 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[csft]]></category>
		<category><![CDATA[mmseg]]></category>
		<category><![CDATA[sphinx]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=404</guid>
		<description><![CDATA[最近一直在做中文全文索引，中间遇到了很多问题，现在记录下来以备日后查阅。希望对大家有所帮助.]]></description>
			<content:encoded><![CDATA[<p>最近一直在做中文全文索引，中间遇到了很多问题，现在记录下来以备日后查阅。希望对大家有所帮助.</p>
<ol>
<li>本人lamp环境已经安装好了，略过此步。</li>
<li>所需文件 <strong><span style="color: #ff0000;"><span style="font-weight: normal;"><span style="color: #888888;">下载Coreseek Fulltext Server(源代码)</span></span><span style="font-weight: normal;"><span style="color: #888888;">：</span></span></span></strong><a href="http://www.coreseek.cn/uploads/csft/3.1/Source/csft-3.1.tar.gz">http://www.coreseek.cn/uploads/csft/3.1/Source/csft-3.1.tar.gz</a><span style="color: #ff0000;"><strong><span style="color: #888888;"><span style="font-weight: normal;">下载Coreseek Mmseg(源代码)</span></span>：</strong></span><a href="http://www.coreseek.cn/uploads/csft/3.1/Source/mmseg-3.1.tar.gz">http://www.coreseek.cn/uploads/csft/3.1/Source/mmseg-3.1.tar.gz</a>必须安装工具:</li>
</ol>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p404code17'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p40417"><td class="code" id="p404code17"><pre class="shell" style="font-family:monospace;"># sudo apt-get install autoconf automake autotools-dev cpp curl gawk gcc lftp libc6-dev linux-libc-dev make libpcre3-dev libpcrecpp0 g++ libtool libncurses5-dev
# sudo aptitude install libmysql++-dev libmysqlclient15-dev checkinstall</pre></td></tr></table></div>


<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p404code18'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p40418"><td class="code" id="p404code18"><pre class="shell" style="font-family:monospace;"># sudo su
# tar xzvf mmseg-3.1.tar.gz
# mkdir /usr/local/mmseg
# cd mmseg-3.1
# ./configure --prefix=/usr/local/mmseg
# make
# make install</pre></td></tr></table></div>


<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p404code19'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p40419"><td class="code" id="p404code19"><pre class="shell" style="font-family:monospace;"># tar xzvf csft-3.1.tar.gz
#./configure --prefix=/usr/local/coreseek --with-mysql=/opt/lampp --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib/
//注意修改成自己对应的目录
 重新编译方法:
# make clean
# make
# make install</pre></td></tr></table></div>

<pre>安装完成,下面是测试.</pre>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p404code20'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p40420"><td class="code" id="p404code20"><pre class="shell" style="font-family:monospace;">example:
# cd /usr/local/coreseek/etc
# sudo cp sphinx.conf.dist csft.conf
# sudo gedit csft.conf
更改里面mysql的参数为你的。去掉sql_query_pre  = SET NAMES utf8前面的#</pre></td></tr></table></div>

<pre>执行sql创建示例数据表</pre>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p404code21'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p40421"><td class="code" id="p404code21"><pre class="shell" style="font-family:monospace;"># mysql -u test &amp;lt; /usr/local/coreseek/etc/example.sql
# sudo /usr/local/coreseek/bin/indexer --all
# sudo /usr/local/coreseek/bin/search test</pre></td></tr></table></div>

<p>如果出现什么错误请在下方留言。</p>
<p><a href="http://www.blags.org/tags/sphinx/"title="sphinx" >sphinx</a> pdf帮助文件文件</p>
<p><a href="http://www.blags.org/wp-content/Upload/sphinx_doc_zhcn_0.9.pdf">sphinx_doc_zhcn_0.9</a></p>
<p>最终效果:</p>
<p style="text-align: center;"><a style="text-decoration: none;" href="http://www.blags.org/wp-content/Upload/Screenshot-1.png"><img class="size-medium wp-image-415 aligncenter" title="Screenshot-1" src="http://www.blags.org/wp-content/Upload/Screenshot-1-272x300.png" alt="" width="272" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-9-10-mysql-install-sphinx-mmseg-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在网页中嵌套搜狗云输入法 方便linux ，unix 等非windows用户</title>
		<link>http://www.blags.org/linux-input-method-sougoushurufa/</link>
		<comments>http://www.blags.org/linux-input-method-sougoushurufa/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 01:42:11 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[搜狗云输入法]]></category>

		<guid isPermaLink="false">http://www.blags.org/?p=345</guid>
		<description><![CDATA[js 事件：

View Code PHPjavascript: void&#40;&#40;function&#40;&#41; &#123;
var % 20n = navigator.userAgent.toLowerCase&#40;&#41;;
ie = n.indexOf&#40;'msie'&#41; != -1 ? 1 : 0;
if &#40;document.documentMode&#41; ie = 0;
charset = '';
if &#40;ie&#41; charset = document.charset;
src = ie &#38;amp;&#38;amp; charset == 'utf-8' ? 'http://web.pinyin.sogou.com/web_ime/init2_utf8.php': 'http://web.pinyin.sogou.com/web_ime/init2.php';
element = document.createElement&#40;'script'&#41;;
element.setAttribute&#40;'src', src&#41;;
document.body.appendChild&#40;element&#41;;
&#125;&#41;&#40;&#41;&#41;

快捷键：Ctrl+P

View Code JAVASCRIPTfunction mysougoubutton&#40;&#41;&#123;
if&#40;window.event.ctrlKey &#38;amp;&#38;amp; window.event.keyCode==80&#41;&#123;
var n=navigator.userAgent.toLowerCase&#40;&#41;;ie=n.indexOf&#40;'msie'&#41;!=-1?1:0;
if&#40;document.documentMode&#41;ie=0;charset='';
if&#40;ie&#41;charset=document.charset;src=ie&#38;amp;&#38;amp;charset=='utf-8'?
'http://web.pinyin.sogou.com/web_ime/init2_utf8.php':
'http://web.pinyin.sogou.com/web_ime/init2.php';
element=document.createElement&#40;'script'&#41;;
element.setAttribute&#40;'src',src&#41;;
document.body.appendChild&#40;element&#41;;
&#125;&#125;
document.onkeydown=mysougoubutton;

]]></description>
			<content:encoded><![CDATA[<p>js 事件：</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p345code24'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p34524"><td class="code" id="p345code24"><pre class="php" style="font-family:monospace;">javascript<span style="color: #339933;">:</span> void<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #339933;">%</span> 20n <span style="color: #339933;">=</span> navigator<span style="color: #339933;">.</span>userAgent<span style="color: #339933;">.</span>toLowerCase<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
ie <span style="color: #339933;">=</span> n<span style="color: #339933;">.</span>indexOf<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'msie'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> ? <span style="color: #cc66cc;">1</span> <span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>document<span style="color: #339933;">.</span>documentMode<span style="color: #009900;">&#41;</span> ie <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
charset <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>ie<span style="color: #009900;">&#41;</span> charset <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>charset<span style="color: #339933;">;</span>
src <span style="color: #339933;">=</span> ie <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> charset <span style="color: #339933;">==</span> <span style="color: #0000ff;">'utf-8'</span> ? <span style="color: #0000ff;">'http://web.pinyin.sogou.com/web_ime/init2_utf8.php'</span><span style="color: #339933;">:</span> <span style="color: #0000ff;">'http://web.pinyin.sogou.com/web_ime/init2.php'</span><span style="color: #339933;">;</span>
element <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>createElement<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
element<span style="color: #339933;">.</span>setAttribute<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'src'</span><span style="color: #339933;">,</span> src<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
document<span style="color: #339933;">.</span>body<span style="color: #339933;">.</span>appendChild<span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>快捷键：Ctrl+P</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p345code25'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p34525"><td class="code" id="p345code25"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> mysougoubutton<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">event</span>.<span style="color: #660066;">ctrlKey</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span><span style="color: #339933;">==</span><span style="color: #CC0000;">80</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> n<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>ie<span style="color: #339933;">=</span>n.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'msie'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">?</span><span style="color: #CC0000;">1</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">documentMode</span><span style="color: #009900;">&#41;</span>ie<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>charset<span style="color: #339933;">=</span><span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>ie<span style="color: #009900;">&#41;</span>charset<span style="color: #339933;">=</span>document.<span style="color: #660066;">charset</span><span style="color: #339933;">;</span>src<span style="color: #339933;">=</span>ie<span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>charset<span style="color: #339933;">==</span><span style="color: #3366CC;">'utf-8'</span><span style="color: #339933;">?</span>
<span style="color: #3366CC;">'http://web.pinyin.sogou.com/web_ime/init2_utf8.php'</span><span style="color: #339933;">:</span>
<span style="color: #3366CC;">'http://web.pinyin.sogou.com/web_ime/init2.php'</span><span style="color: #339933;">;</span>
element<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
element.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #339933;">,</span>src<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span>
document.<span style="color: #660066;">onkeydown</span><span style="color: #339933;">=</span>mysougoubutton<span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/linux-input-method-sougoushurufa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu下好用的轻量级代码编辑器—scribes</title>
		<link>http://www.blags.org/under-ubuntu-easy-to-use-lightweight-code-editor-scribes/</link>
		<comments>http://www.blags.org/under-ubuntu-easy-to-use-lightweight-code-editor-scribes/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 14:51:04 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[chmsee]]></category>
		<category><![CDATA[scribes]]></category>

		<guid isPermaLink="false">http://www.blags.cn/?p=337</guid>
		<description><![CDATA[近日在Ubuntu下苦苦寻觅一个轻量级的代码编辑器，支持也不必太多，只要能支持C/C++，JAVA，PHP，XML就可以了，后来我终于发现了Scribes。
他的界面十分简约，正合我意，但是功能十分强大，最新的是0.3.3.3版本，具有如下特点：
编辑远程文件
Scribes 现在可以直接通过 ssh、ftp、sftp、webdav、webdavs、samba 等协议访问远程的文件，并执行编辑操作。这项新功能需要使用 Ctrl + l 来激活。
导入/输出模板
Scribes 的模板是类似代码片断的东西，使用模板能够减少很多重复的工作。新的 Scribes 允许输出或者导入这些模板，以方便用户之间共享劳动成果。
书签操作
在 Scribes 中能够将某些行设置为书签，方便以后返回这些行。使用 Ctrl + d 来定义书签，而用 Ctrl + b 可以打开书签浏览器。
文档切换
有用户向 Scribes 的开发者提议考虑加入 Tab 分页功能。虽然作者没有采纳，但是在新版本中增添了文档切换功能。在编辑多文档时，足可应付的了。文档切换窗口可以按 F9 键打开。
智能的自动完成
虽然 Scribes 之前的版本便已实现了这方面的功能，但是现在已经加强了改进。对于如 []、{}、&#8221;"、&#8221; 等配对的符号，Scribes 会自动帮你完成。另外，在 Scribes 中，重复的单词它也会帮你自动输入。
根据传说，还有代码提示的功能，不过我还不知道怎么使用这一个功能。他的安装也十分简单，源里就有
apt-get install scribes
更多体验以后再说。
另外最好的chm查看器
chmsee
apt-get install chmsee
]]></description>
			<content:encoded><![CDATA[<p>近日在<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >Ubuntu</a>下苦苦寻觅一个轻量级的代码编辑器，支持也不必太多，只要能支持C/C++，<a href="http://www.blags.org/tags/java/"title="java" >JAVA</a>，PHP，XML就可以了，后来我终于发现了Scribes。</p>
<p>他的界面十分简约，正合我意，但是功能十分强大，最新的是0.3.3.3版本，具有如下特点：</p>
<p>编辑远程文件</p>
<p>Scribes 现在可以直接通过 ssh、ftp、sftp、webdav、webdavs、samba 等协议访问远程的文件，并执行编辑操作。这项新功能需要使用 Ctrl + l 来激活。</p>
<p>导入/输出模板</p>
<p>Scribes 的模板是类似代码片断的东西，使用模板能够减少很多重复的工作。新的 Scribes 允许输出或者导入这些模板，以方便用户之间共享劳动成果。</p>
<p>书签操作</p>
<p>在 Scribes 中能够将某些行设置为书签，方便以后返回这些行。使用 Ctrl + d 来定义书签，而用 Ctrl + b 可以打开书签浏览器。</p>
<p>文档切换</p>
<p>有用户向 Scribes 的开发者提议考虑加入 Tab 分页功能。虽然作者没有采纳，但是在新版本中增添了文档切换功能。在编辑多文档时，足可应付的了。文档切换窗口可以按 F9 键打开。</p>
<p>智能的自动完成</p>
<p>虽然 Scribes 之前的版本便已实现了这方面的功能，但是现在已经加强了改进。对于如 []、{}、&#8221;"、&#8221; 等配对的符号，Scribes 会自动帮你完成。另外，在 Scribes 中，重复的单词它也会帮你自动输入。</p>
<p>根据传说，还有代码提示的功能，不过我还不知道怎么使用这一个功能。他的安装也十分简单，源里就有<br />
apt-get install scribes<br />
更多体验以后再说。</p>
<p>另外最好的chm查看器<br />
chmsee<br />
apt-get install chmsee</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/under-ubuntu-easy-to-use-lightweight-code-editor-scribes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 磁盘问号解决方法</title>
		<link>http://www.blags.org/ubuntu-question-mark-disk-solution/</link>
		<comments>http://www.blags.org/ubuntu-question-mark-disk-solution/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 17:21:05 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[disk]]></category>

		<guid isPermaLink="false">http://www.blags.cn/?p=333</guid>
		<description><![CDATA[文件从window上传到ubuntu后会显示乱码，原因是因为ubuntu环境设置默认是utf8，windows默认都是GBK，对拷的文件转化后就会乱码。只好手动将ubuntu环境设置为GBK
1、首先设置
sudo gedit /var/lib/locales/supported.d/local
添加一行 zh_CN.GBK GBK
2、
sudo locale-gen
3、修改
/etc/environment
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games”
LANGUAGE=”zh_CN:zh:en_US:en”
GST_ID3_TAG_ENCODING=GBK
LANG=zh_CN.GBK
LC_CTYLE=zh_CN.GBK
CLASSPATH=”/usr/lib/jvm/java-1.5.0-sun/lib”
JAVA_HOME=”/usr/lib/jvm/java-1.5.0-sun”
LC_ALL=”zh_CN.GBK”
sudo reboot

然后重启X即可
]]></description>
			<content:encoded><![CDATA[<p>文件从window上传到<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>后会显示乱码，原因是因为ubuntu环境设置默认是utf8，windows默认都是GBK，对拷的文件转化后就会乱码。只好手动将ubuntu环境设置为GBK<br />
1、首先设置</p>
<pre>sudo gedit /var/lib/locales/supported.d/local</pre>
<p>添加一行 zh_CN.GBK GBK<br />
2、</p>
<pre>sudo locale-gen</pre>
<p>3、修改</p>
<pre lang="shell'">/etc/environment
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games”
LANGUAGE=”zh_CN:zh:en_US:en”
GST_ID3_TAG_ENCODING=GBK
LANG=zh_CN.GBK
LC_CTYLE=zh_CN.GBK
CLASSPATH=”/usr/lib/jvm/<a href="http://www.blags.org/tags/java/"title="java" >java</a>-1.5.0-sun/lib”
JAVA_HOME=”/usr/lib/jvm/java-1.5.0-sun”
LC_ALL=”zh_CN.GBK”
sudo reboot
</pre>
<p>然后重启X即可</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-question-mark-disk-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 常用快捷键</title>
		<link>http://www.blags.org/ubuntu-common-shortcuts/</link>
		<comments>http://www.blags.org/ubuntu-common-shortcuts/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 17:09:36 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Quickstartkey]]></category>

		<guid isPermaLink="false">http://www.blags.cn/?p=331</guid>
		<description><![CDATA[最近一直在用lamp开发linux用到了ubuntu9.10 下面是一些常用快捷键展示给大家希望有用

View Code SHELLCtrl+F 文件搜索
Ctrl＋Alt+D 显示桌面
Alt+F2 打开终端
apt－get install 安装文件
apt-get remove 卸载
apt-get autoremove 卸载相关文件

给快捷方式添加图片
 
sudo gedit /usr/share/applications/Eclipse.desktop
在文本编辑器里复制粘贴下面内容
[Desktop Entry]
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/shixinyu/JAVA/eclipse/eclipse
Icon=/home/shixinyu/JAVA/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development
 
保存这个文件后，就会在“应用程序”下的“编程”中出现Eclipse的快捷方式。
还有一些忘记了以后补上。
]]></description>
			<content:encoded><![CDATA[<p>最近一直在用lamp开发<a href="http://www.blags.org/tags/linux/"target="_self"title="linux" >linux</a>用到了<a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >ubuntu</a>9.10 下面是一些常用快捷键展示给大家希望有用</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p331code27'); return false;">View Code</a> SHELL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p33127"><td class="code" id="p331code27"><pre class="shell" style="font-family:monospace;">Ctrl+F 文件搜索
Ctrl＋Alt+D 显示桌面
Alt+F2 打开终端
apt－get install 安装文件
apt-get remove 卸载
apt-get autoremove 卸载相关文件</pre></td></tr></table></div>

<p>给快捷方式添加图片</p>
<p><span id="zoom"> </span></p>
<p style="text-indent: 2em;">sudo gedit /usr/share/applications/Eclipse.desktop</p>
<p style="text-indent: 2em;">在文本编辑器里复制粘贴下面内容</p>
<pre>[Desktop Entry]
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/shixinyu/<a href="http://www.blags.org/tags/java/"title="java" >JAVA</a>/eclipse/eclipse
Icon=/home/shixinyu/JAVA/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development</pre>
<p><span id="zoom"> </span></p>
<p style="text-indent: 2em;">保存这个文件后，就会在“应用程序”下的“编程”中出现Eclipse的快捷方式。</p>
<p>还有一些忘记了以后补上。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/ubuntu-common-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows 下安装ubuntu 9.04 双系统 方法</title>
		<link>http://www.blags.org/windows-install-ubuntu-9-04-dual-system-methods/</link>
		<comments>http://www.blags.org/windows-install-ubuntu-9-04-dual-system-methods/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:15:43 +0000</pubDate>
		<dc:creator>马丁博客</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.blags.cn/?p=327</guid>
		<description><![CDATA[Ubuntu 9.04已正式发布，考虑到目前使用WindowsXP + Ubuntu双系统的用户还是比较多的，特针对9.04特性整理出下文指导新手在WinXP环境下通过硬盘安装Ubuntu 9.04。
1.下载Grub4Dos（注意：如果你想尝试Ext4文件系统，一定要下载最新的支持Ext4文件系统Grub4Dos 0.4.4版本），解压至XP的C盘根下，修改menu.lst文件,在末尾添加如下内容：
(注意：其中粗体Ubuntu-9.04-desktop-i386.iso是desktop版本，如果你下载的不是desktop版，请将其替换成你下载的镜像的文件名，如果不成功可以尝试删除menu.lst再试试。)
title Install Ubuntu
root (hd0,0)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/Ubuntu-9.04-desktop-i386.iso ro quiet
splash locale=zh_CN.UTF-8
initrd (hd0,0)/initrd.gz
2.修改XP的boot.ini文件（该文件为系统文件，具有只读隐藏属性）,在boot.ini末尾添加:
C:\grldr=”GRUB”
3.下载Ubuntu 9.04的desktopCD的镜像文件，下载地址参考Ubuntu 9.04官方衍生版本全集，然后将下载好的镜像文件直接放在C: ，将其中的.disk文件夹加压至C: ， 将casper目录下的initrd.gz和vmlinuz这两个文件也解压至C:
4.重启计算机，选择Grub，进入Grub引导程序，选择最后一项（Install Ubuntu），稍等即可进入ubuntu的liveCD模式，此时打开一个终端，在里面输入：
sudo umount -l /iosdevice
回车，然后点击桌面上的安装图标即可完成安装过程。
]]></description>
			<content:encoded><![CDATA[<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;"><strong><a href="http://www.blags.org/tags/ubuntu/"title="ubuntu" >Ubuntu</a> 9.04已正式发布，考虑到目前使用WindowsXP + Ubuntu双系统的用户还是比较多的，特针对9.04特性整理出下文指导新手在WinXP环境下通过硬盘安装Ubuntu 9.04。</strong></p>
<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;">1.下载<a style="color: #cc0000; font-weight: bold; text-decoration: none;" href="http://download.gna.org/grub4dos/" target="_blank">Grub4Dos</a>（注意：如果你想尝试Ext4文件系统，一定要下载最新的支持Ext4文件系统<a style="color: #cc0000; font-weight: bold; text-decoration: none;" href="http://download.gna.org/grub4dos/grub4dos-0.4.4.zip">Grub4Dos 0.4.4</a>版本），解压至XP的C盘根下，修改menu.lst文件,在末尾添加如下内容：</p>
<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;">(注意：其中粗体Ubuntu-9.04-desktop-i386.iso是desktop版本，如果你下载的不是desktop版，请将其替换成你下载的镜像的文件名，如果不成功可以尝试删除menu.lst再试试。)</p>
<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;">title Install Ubuntu<br />
root (hd0,0)<br />
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/<strong>Ubuntu-9.04-desktop-i386.iso</strong> ro quiet<br />
splash locale=zh_CN.UTF-8<br />
initrd (hd0,0)/initrd.gz</p>
<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;">2.修改XP的boot.ini文件（该文件为系统文件，具有只读隐藏属性）,在boot.ini末尾添加:<br />
C:\grldr=”GRUB”</p>
<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;">3.下载Ubuntu 9.04的desktopCD的镜像文件，下载地址参考Ubuntu 9.04官方衍生版本全集，然后将下载好的镜像文件直接放在C: ，将其中的.disk文件夹加压至C: ， 将casper目录下的initrd.gz和vmlinuz这两个文件也解压至C:</p>
<p style="padding-top: 0.2em; padding-right: 0px; padding-bottom: 0.3em; padding-left: 0px; margin: 0px;">4.重启计算机，选择Grub，进入Grub引导程序，选择最后一项（Install Ubuntu），稍等即可进入ubuntu的liveCD模式，此时打开一个终端，在里面输入：<br />
sudo umount -l /iosdevice<br />
回车，然后点击桌面上的安装图标即可完成安装过程。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blags.org/windows-install-ubuntu-9-04-dual-system-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

