<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Leo Blog</title>
	<atom:link href="http://livechung.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://livechung.wordpress.com</link>
	<description>computer science &#38; linux</description>
	<lastBuildDate>Sun, 30 Dec 2007 08:33:41 +0000</lastBuildDate>
	<language>vi</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='livechung.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Leo Blog</title>
		<link>http://livechung.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://livechung.wordpress.com/osd.xml" title="Leo Blog" />
	<atom:link rel='hub' href='http://livechung.wordpress.com/?pushpress=hub'/>
		<item>
		<title>livechung.wordpress.com</title>
		<link>http://livechung.wordpress.com/2007/12/30/livechungwordpresscom/</link>
		<comments>http://livechung.wordpress.com/2007/12/30/livechungwordpresscom/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 08:20:09 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/12/30/livechungwordpresscom/</guid>
		<description><![CDATA[Không hiểu lý do tại sao dạo này không vô được livechung.wordpress.com. Và một thời gian dài không post bài. Chắc kiểu này chuyển qua http://my.opera.com/livetime<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=44&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Không hiểu lý do tại sao dạo này không vô được livechung.wordpress.com.<br />
Và một thời gian dài không post bài.</p>
<p>Chắc kiểu này chuyển qua http://my.opera.com/livetime</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/44/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/44/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=44&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/12/30/livechungwordpresscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Security: exploit, vunnerability</title>
		<link>http://livechung.wordpress.com/2007/11/19/security/</link>
		<comments>http://livechung.wordpress.com/2007/11/19/security/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 04:20:25 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/11/19/security/</guid>
		<description><![CDATA[http://www.milw0rm.com/ http://www.securityfocus.com/ http://www.packetstormsecurity.com/ http://www.zone-h.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=43&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>http://www.milw0rm.com/</p>
<p>http://www.securityfocus.com/</p>
<p>http://www.packetstormsecurity.com/</p>
<p>http://www.zone-h.com/</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=43&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/11/19/security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Làm thế nào để thiết lập mySQL replication</title>
		<link>http://livechung.wordpress.com/2007/11/16/mysqlrepli/</link>
		<comments>http://livechung.wordpress.com/2007/11/16/mysqlrepli/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 09:15:44 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[Linux network]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/11/16/mysqlrepli/</guid>
		<description><![CDATA[Mình đi theo step by step cho nó dễ làm một chút. Một cách ngắn gọn: MySQL replication cho phép bạn có một bản copy của database chính (master) trên một server phụ (slave) và tất cả mọi update của master server thì lập tức được sao chép sang slave server. Vì thế sẽ có [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=42&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mình đi theo step by step cho nó dễ làm một chút.<br />
Một cách ngắn gọn: <font face="Verdana, Arial, Helvetica, sans-serif" size="2">MySQL replication cho phép bạn có một bản copy của database chính (master) trên một server phụ (slave) và tất cả mọi update của master server thì lập tức được sao chép sang slave server. Vì thế sẽ có sự đồng bộ giữa master và slave server. Dĩ nhiên cần phân biệt rằng MySQL replication không phải là backup vì một câu lệnh delete của MySQL cũng thực hiện trên slave.<br />
MySQL replication làm cho hệ thống high availability.<br />
Ta có tesdb tại server master có ip=192.168.1.2 và muốn tạo bản sao của nó  </font></p>
<p><strong>1. Phần master</strong></p>
<p>Trước hết comment dòng sau , trong file /etc/mysql/my.cnf</p>
<blockquote><p>#skip-networking<br />
#bind-address            = 127.0.0.1</p></blockquote>
<p>Và thêm vài dòng sau vào /etc/mysql/my.cnf</p>
<blockquote><p>log-bin = /var/log/mysql/mysql-bin.log<br />
binlog-do-db=testdb<br />
server-id=1</p></blockquote>
<p>File log này để xem những thay đổi của master  trên slave.  Khởi động lại rồi vào root</p>
<blockquote><p> mysql -u root -p<br />
Enter password:</p>
<p>GRANT REPLICATION SLAVE ON *.* TO &#8216;slave_user&#8217;@'%&#8217; IDENTIFIED BY &#8216;&lt;some_password&gt;&#8217;;<br />
FLUSH PRIVILEGES;<br />
USE testdb;<br />
FLUSH TABLES WITH READ LOCK;<br />
SHOW MASTER STATUS;</p></blockquote>
<p>Dòng lệnh cuối cùng sẽ cho ra một cái bảng có một record. Bạn ghi lại cái record ra giấy nháp  để cần thiết cho sau này.</p>
<p>Đến bây giờ sẽ có hai cách để  master update ra slave. Trường hợp thứ nhất là dùng database dump, thứ hai là dùng lệnh LOAD DATA FROM MASTER; trên slave</p>
<blockquote><p> mysqldump -u root -p&lt;password&gt; &#8211;opt testdb &gt; testdb.sql</p></blockquote>
<p>Chuyển file này đến slave server .<br />
Sau cùng là unlock testdb</p>
<blockquote><p>mysql -u root -p<br />
Enter password:<br />
UNLOCK TABLES;<br />
quit;</p></blockquote>
<p>Phần cấu hình trên master đã xong.</p>
<p><strong>2. Cấu hình slave</strong></p>
<p>Trước hết tạo database testdb (slave)</p>
<blockquote><p>mysql -u root -p<br />
Enter password:<br />
CREATE DATABASE testdb;<br />
quit;</p></blockquote>
<p>Nếu bạn dùng cách thứ nhất để update thì chạy dòng lệnh sau:</p>
<blockquote><p>mysql -u root -p&lt;password&gt; exampledb &lt; /path/to/testdb.sql</p></blockquote>
<p>Bây giờ cần nói cho mySQL của slave bít rằng nó là slave và nó cần bít cái master database của nó nữa.  Thêm các dòng sau vào /etc/mysql/my.cnf</p>
<blockquote><p> server-id=2<br />
master-host=192.168.1.2<br />
master-user=slave_user<br />
master-password=secret<br />
master-connect-retry=60<br />
replicate-do-db= testdb</p></blockquote>
<p>Với cách thứ hai thì bạn sử dụng dòng sau để update:</p>
<blockquote><p> mysql -u root -p<br />
Enter password:<br />
LOAD DATA FROM MASTER;<br />
quit;</p></blockquote>
<p>Sau cùng :</p>
<blockquote><p>mysql -u root -p<br />
Enter password:<br />
SLAVE STOP;<br />
CHANGE MASTER TO MASTER_HOST=&#8217;192.168.1.2&#8242;, MASTER_USER=&#8217;slave_user&#8217;, MASTER_PASSWORD=&#8221;, MASTER_LOG_FILE=&#8217;xem note&#8217;, MASTER_LOG_POS= int;</p>
<p><font face="Courier New, Courier, mono"><em><font size="2">START SLAVE;<br />
quit;</font></em></font></p></blockquote>
<p>master_host: là địa chỉ ip của server master<br />
master_user: là user đã grant replication trên master server<br />
master_log_file: trong bảng đã show master status<br />
master_log_pos: trong bảng show master status phần cấu hình master</p>
<p>Ok xong rồi! Khi nào testdb được update trên master nó sẽ được lặp lại trên slave</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=42&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/11/16/mysqlrepli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Những gói của Tripod core</title>
		<link>http://livechung.wordpress.com/2007/11/15/tripodcore/</link>
		<comments>http://livechung.wordpress.com/2007/11/15/tripodcore/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 11:16:23 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/11/15/tripodcore/</guid>
		<description><![CDATA[core: Links, wget, m, net-tools, DHCP client, trace rout, BIND util, wireless tools, openSSL, libpcap, ncftp inetutil, openSSH, vsftpd, mutt, iptables, sudo stunnel, CDrtool, DVD_rư-tool, glib optional: Linux PAM, cracklib<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=41&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>core:</p>
<p>Links, wget, m, net-tools, DHCP client, trace rout, BIND util, wireless tools,</p>
<p>openSSL, libpcap, ncftp</p>
<p>inetutil, openSSH, vsftpd, mutt, iptables, sudo</p>
<p>stunnel, CDrtool, DVD_rư-tool, glib</p>
<p>optional: Linux PAM, cracklib</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/41/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/41/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=41&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/11/15/tripodcore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Regular expression</title>
		<link>http://livechung.wordpress.com/2007/10/21/thuthat/</link>
		<comments>http://livechung.wordpress.com/2007/10/21/thuthat/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 05:56:30 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/10/21/thuthat/</guid>
		<description><![CDATA[Su dung voi bash search: grep, sed, awk Tim tu golf hoac Golf : [gG]olf Thay the mot ki tu voi &#8220;.&#8221; : g.lf Tim tat ca tu bat dau voi g va ket thuc voi lf o giua duoc kep boi mot ki tu bat ki. Thay the nhieu ki tu voi &#8220;..&#8221; : [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=40&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Su dung voi bash search: grep, sed, awk</p>
<p>Tim tu golf hoac Golf : [gG]olf</p>
<p>Thay the mot ki tu voi &#8220;.&#8221; :   g.lf</p>
<blockquote><p>Tim tat ca tu bat dau voi g va ket thuc voi lf o giua duoc kep boi mot ki tu bat ki.</p></blockquote>
<p>Thay the nhieu ki tu voi &#8220;..&#8221; : b..k</p>
<p>No se tim tat ca tu bat dau boi b ket thuc la k, kep o giua la nhieu ki tu bat ki.</p>
<p>Vi du</p>
<p># grep widget.. bt.c</p>
<p># ps aux | grep vs..        // ti`m nhung tien trinh dang chay co ten bat dau la vs (thuong la vsftpd)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>Tu dong hoa bang cron</strong></p>
<p>Chương trình cron đọc một tập tin gọi là crontab. File này cấu hình job sẽ chạy. Bạn có thể truy cập file này bằng cách chạy:</p>
<blockquote><p>    # crontab -e</p></blockquote>
<p>Crontab co 6 truong :</p>
<blockquote>
<blockquote>
<ol>
<li>Minute</li>
<li>Hour</li>
<li>Day of the month</li>
<li>Month of the year</li>
<li>Day of the week</li>
<li>String to be executed by <code>sh</code></li>
</ol>
<pre># +---------------- minute (0 - 59)
# |  +------------- hour (0 - 23)
# |  |  +---------- day of month (1 - 31)
# |  |  |  +------- month (1 - 12)
# |  |  |  |  +---- day of week (0 - 7) (Sunday=0 or 7)
# |  |  |  |  |
  *  *  *  *  *  command to be executed</pre>
<p>Vi du:</p>
<pre>0,20,40 22-23 * 7 fri-sat /home/ian/manjob.sh</pre>
</blockquote>
</blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=40&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/10/21/thuthat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>máy tính</title>
		<link>http://livechung.wordpress.com/2007/10/18/may-tinh/</link>
		<comments>http://livechung.wordpress.com/2007/10/18/may-tinh/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 03:37:19 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[CS]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/10/18/may-tinh/</guid>
		<description><![CDATA[Tôi chả biết đặt tên như thế nào. Hôm nay tôi viết bài với tâm trạng không tốt. Những vấn đề tôi quan tâm đến kiến trúc máy tính: xử lý song song, realtime Ngôn ngữ máy tính: trình biên dịch, các chuẩn ngôn ngữ     Hệ điều hành Trình biên dịch và ngôn [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=38&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tôi chả biết đặt tên như thế nào. Hôm nay tôi viết bài với tâm trạng không tốt.</p>
<p>Những vấn đề tôi quan tâm đến kiến trúc máy tính:</p>
<ul>
<li>xử lý song song, realtime</li>
</ul>
<ul>
<li>Ngôn ngữ máy tính: trình biên dịch, các chuẩn ngôn ngữ</li>
</ul>
<blockquote>
<ul>
<li>    Hệ điều hành</li>
<li>Trình biên dịch và ngôn ng</li>
</ul>
</blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=38&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/10/18/may-tinh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Sử dụng QEMU</title>
		<link>http://livechung.wordpress.com/2007/10/14/qemu/</link>
		<comments>http://livechung.wordpress.com/2007/10/14/qemu/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 10:08:33 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/10/14/s%e1%bb%ad-d%e1%bb%a5ng-qemu-ch%e1%ba%a1y-win-trong-fc7/</guid>
		<description><![CDATA[Download về : http://fabrice.bellard.free.fr/qemu/download.html &#160; Cai dat: ./configure &#38;&#38; make make install insmod kqemu.ko Them dong nay vao `/etc/rc.d/rc.local'. /sbin/modprobe kqemu &#160; Tạo đĩa ảo : # qemu-img create -f qcow uwin.img 3G Tạo ảnh ISO : # dd if=/dev/cdrom of=/tmp/winxp.iso Boot để cài win : # qemu -cdrom /tmp/winxp.iso -hda uwin.img -m 256 -boot [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=16&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Download về : <a href="http://fabrice.bellard.free.fr/qemu/download.html">http://fabrice.bellard.free.fr/qemu/download.html</a></p>
<dl>
<dd>
<p class="image-wrapper">&nbsp;</p>
<p class="content-wrapper">Cai dat:<br />
./configure &amp;&amp; make<br />
make install<br />
insmod kqemu.ko</p>
<p class="content-wrapper">Them dong nay vao  <tt>`/etc/rc.d/rc.local'</tt>.<br />
/sbin/modprobe kqemu</p>
<p class="content-wrapper">&nbsp;</p>
<p class="content-wrapper"> Tạo đĩa ảo :<br />
# qemu-img create -f qcow uwin.img 3G<br />
Tạo ảnh ISO :<br />
# dd if=/dev/cdrom of=/tmp/winxp.iso</p>
<p>Boot để cài win :<br />
# qemu -cdrom /tmp/winxp.iso -hda uwin.img -m 256 -boot d</p>
<p>Sau khi cài xong chỉ cần gõ dòng sau là vào hệ thống mới cài :<br />
# qemu -hda uwin.img -m 256</p>
<p>Nếu cài chung với <a href="http://fabrice.bellard.free.fr/qemu/kqemu-doc.html">KQEMU</a> thì gõ dòng sau :<br />
# qemu -hda uwin.img -m 256 -kernel-kqemu</p>
<p>Giải thích parameter:<br />
-m 256 : RAM 256 mB<br />
-boot d : boot cdrom trước</p>
</dd>
</dl>
<p> Thêm một số parameter :</p>
<p>-full-screen<br />
-vnc display<br />
-soundhw all<br />
-usb</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=16&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/10/14/qemu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>init_Assembly In Linux</title>
		<link>http://livechung.wordpress.com/2007/10/14/asm_linux/</link>
		<comments>http://livechung.wordpress.com/2007/10/14/asm_linux/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 01:06:03 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/10/14/asm_linux/</guid>
		<description><![CDATA[Khác biệt giữa Intel và AT&#38;T sn:0 Vị trí toán hạng ngược nhau giữa cú pháp AT&#38;T và Intel: Intel instruction dest, source AT&#38;T instruction source, dest Tiếp đầu ngữ: Intel không có tiếp đầu ngữ Cú pháp cho AT&#38;T sử dụng các tiếp đầu ngữ % cho các thanh ghi và $ cho các [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=36&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3><strong><font color="#0000ff">Khác biệt giữa Intel và AT&amp;T sn:0</font></strong></h3>
<p><strong>Vị trí</strong> toán hạng ngược nhau giữa cú pháp AT&amp;T và Intel:<br />
Intel       instruction    dest, source<br />
AT&amp;T      instruction    source, dest<br />
<strong>Tiếp đầu ngữ</strong>: Intel không có tiếp đầu ngữ<br />
Cú pháp cho AT&amp;T sử dụng các tiếp đầu ngữ % cho các thanh ghi và $ cho các giá trị hằng, biến. Intel sử dụng h và b (đặt sau)cho biểu diễn số hex và bin ngược lại AT&amp;T sử dụng 0x để biểu diễn số hex.</p>
<p>Intel</p>
<blockquote><p>mov eax,1<br />
mov ebx,0ffh<br />
int 80h</p></blockquote>
<p>AT&amp;T</p>
<blockquote><p>movl $1, %eax<br />
movl $0xff, %ebx<br />
int $0&#215;80</p></blockquote>
<p><strong>Cách truy xuất bộ nhớ </strong></p>
<p>Intel xài dấu ngoặc vuông[], còn AT&amp;T xài dấu ngoặc tròn()</p>
<blockquote><p>Intel          mv     eax, [ebx]<br />
AT&amp;T       movl    (%ebx), %eax</p></blockquote>
<p>Định vị:<br />
Intel    instruction    foo, segreg:[base+index+*scale+disp]<br />
AT&amp;T    instruction   %segreg:disp(base, index, scale), foo<br />
mov eax, [ebx+20h]            AT&amp;T:     movl    0&#215;20(%ebx), %eax</p>
<p>Chương trình Hello world<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;first.s&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<pre>section	.text
    global _start			;must be declared for linker (ld)

_start:					;tell linker entry point

	mov	edx,len	;message length
	mov	ecx,msg	;message to write
	mov	ebx,1	;file descriptor (stdout)
	mov	eax,4	;system call number (sys_write)
	int	0x80	;call kernel

	mov	eax,1	;system call number (sys_exit)
	int	0x80	;call kernel

section	.data

msg	db	'Hello, world!',0xa	;our dear string
len	equ	$ - msg			;length of our dear string</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end of first.s&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>gcc -c first.s<br />
ld first.o -o first</p>
<p>Intel syntax<br />
&#8212;&#8212;&#8212;&#8212;&#8212;first.asm&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
session .data<br />
msg db &#8216;Hello world&#8217;,0xa<br />
sesion .text<br />
global _start<br />
_start:<br />
mov eax,4<br />
mov ebx,1<br />
mov ecx,msg<br />
mov edx,14<br />
int 0&#215;80<br />
mov eax,1<br />
int 0&#215;80<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;first.asm&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>nasm -f elf first.asm<br />
<tt><tt>arch/i386/kernel/entry.S</tt></tt></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=36&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/10/14/asm_linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Implement Xorg 7.1</title>
		<link>http://livechung.wordpress.com/2007/10/13/implement-xorg-71/</link>
		<comments>http://livechung.wordpress.com/2007/10/13/implement-xorg-71/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 08:29:22 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[Xorg]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/10/13/implement-xorg-71/</guid>
		<description><![CDATA[Tui viết để khỏi mất công đọc đi đọc lại BLFS. Quá trình cài đặt đi theo tuần tự. Require cái gì thì cài cái đó trước . Chi tiet xem o BLFS 1. Protocol header : no require 2. Util : require: pkg-config-0.20, protocol header 3. Lib : require : Ed-0.2, Fontconfig-2.3.2, protocol header [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=35&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tui viết để khỏi mất công đọc đi đọc lại BLFS. Quá trình cài đặt đi theo tuần tự. Require cái gì thì cài cái đó trước . Chi tiet xem o BLFS</p>
<p>1. Protocol header : no require</p>
<p>2. Util :  require: pkg-config-0.20, protocol header</p>
<p>3. Lib : require : Ed-0.2, Fontconfig-2.3.2,<br />
protocol header</p>
<p>4. data/Xbitmap</p>
<p>5. Xorg app: xbitmap, libpng, Xorg lib</p>
<p>6. Xorg data: require: app</p>
<p>7. Xorg font</p>
<p>8. Luit</p>
<p>9. Xorg server: Xorg font</p>
<p>10. Xorg driver: server</p>
<p>11. config</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=35&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/10/13/implement-xorg-71/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>
	</item>
		<item>
		<title>Lấy Xorg</title>
		<link>http://livechung.wordpress.com/2007/10/05/getxorg/</link>
		<comments>http://livechung.wordpress.com/2007/10/05/getxorg/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 10:10:07 +0000</pubDate>
		<dc:creator>livechung</dc:creator>
				<category><![CDATA[Xorg]]></category>
		<category><![CDATA[X_window_system]]></category>

		<guid isPermaLink="false">http://livechung.wordpress.com/2007/10/05/l%e1%ba%a5y-xorg/</guid>
		<description><![CDATA[Trước khi cài GNOME vào Tripod thì phải download X cái đã.Hôm nay tự dưng thấy X quan trọng như thế nào ấy. Không lấy về không được. Phải lấy X về cái đã còn mấy cái Library khác thì để sau. Lên trang http://www.x.org/wiki/Releases?action=show&#38;redirect=XorgReleases và chọn bản mới nhất 7.3. Thư mục download laf [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=27&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://livechung.files.wordpress.com/2007/10/fdx-logo-text.png" title="X_logo"><img src="http://livechung.files.wordpress.com/2007/10/fdx-logo-text.png?w=468" alt="X_logo" /></a></p>
<p>Trước khi cài GNOME vào Tripod thì phải download X cái đã.Hôm nay tự dưng thấy X quan trọng như thế nào ấy. Không lấy về không được. Phải lấy X về cái đã còn mấy cái Library khác thì để sau.<br />
Lên trang http://www.x.org/wiki/Releases?action=show&amp;redirect=XorgReleases và chọn bản mới nhất 7.3. Thư mục download laf http://xorg.freedesktop.org/releases/X11R7.3/src/. Vào thư mục download của nó thấy không còn down về một gói như trước nữa. vì từ bản 7 trở đi nó chỉ release dạng module. Module nói nôm na là thư mục của nó. Xorg có 8 modules: app, data, driver, font, lib, proto, util, xserver. Nếu chọn gói nén .tar.bz2,thì tính sơ sơ cũng 288 gói không kể doc và dung lượng khoảng 60 MB. Dung lượng 60 MB mà down một gói thì chả có gì. Đằng này thì khác, tới 288 gói. Mà mỗi thư mục thì lại nhét chung hai loại nén khác nhau vô chứ. Khảo sát thấy nếu down nguyên cả thư mục thì tốn công down số gói gấp hai lần và dung lượng down gấp 2.5 lần. Vì định dạng nén gz có dung lượng lớn hơn bz2. Mà dùng công cụ download thông thường thì phải down hết hai loại file nén. Vậy thì mất công quá.</p>
<p>Trên FC 7 chỉ có công cụ download là wget thôi. Mình bắt đầu nghiên cứu bằng lệnh &#8220;man wget&#8221;. Và bắt đầu thử gõ :</p>
<blockquote><p># wget http://xorg.freedesktop.org/archive/X11R7.3/src/app</p></blockquote>
<p>wget chỉ download về một file index.html. Bắt đầu thất vọng ! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  . Tui tưởng nó down hết mấy cái gói trong module app về chứ. dùng less để xem index.html là nó down về cái vớ vẩn gì.  Chỉ là file html chứa link down về. Hí Lúc này trong đầu tui sáng lên, nghĩ ra một thứ. Khi xem manpage của wget tui có thấy nó có một option là -i file. Thế là ra rồi. Tuy nhiên file tham số của wget là file thường và chứa tên file cần download không bao gồm đường dẫn đến file đó. file đó đóng file trò như một list các file. Muốn download về tui phải xài thêm một tùy chọn đó là -B đường_dẫn_đến_file. Vậy là nó down những tập tin có tên trong option -i listfile. Tui bắt đầu tạo filelist bằng cách copy từng link cắt tên file nó ra. Nếu làm như thế thì tui phải làm khá lâu vì có tới 288 file và 8 modules.</p>
<p>Tui bắt đầu chán nản vì không muốn tốn công như thế. Um, phải có cách khác chứ. Tôi nhớ hồi nãy mình có vô tình down nhầm một file index.html. Tui xem kĩ link của nó thấy nó chỉ là link tương đối, nghĩa là chính tên file. Tui nghĩ rằng nếu có một lệnh nào cho dòng input là file này và đầu ra output là file chứa tập tin chứa file. Làm được thì vấn đề download Xorg kể như xong. Tui bắt đầu gõ grep .tar.bz2 index.html. Ý nghĩa của nó là lấy những dòng nào có chuỗi .tar.bz2. Thế nhưng chả hay chút nào vì nó ra luôn dòng chứa html. Tui nghĩ đến chuyện dùng lệnh cut. Nên gõ:</p>
<blockquote><p>#  grep  .tar.bz2 | cut -d&#8217; &#8221; &#8216; -f8<br />
Bây giờ thì chỉ cần ouput ra file là xong<br />
#  grep  .tar.bz2 | cut -d&#8217; &#8221; &#8216; -f8 &gt;&gt; app-7.3.wget</p></blockquote>
<p>Down hết 8 module về : app   data  doc   driver  font  lib    proto  util   xserver</p>
<blockquote><p>wget http://xorg.freedesktop.org/releases/X11R7.3/src/&lt;module&gt; -O &lt;module&gt;.html<br />
grep .tar.bz2  &lt;module&gt;.html | cut  -d&#8217;&#8221;&#8216; -f8 &gt;&gt;  &#8220;&lt;module&gt;-7.3.wget&#8221;<br />
Download modules:<br />
wget  -B http://xorg.freedesktop.org/releases/X11R7.3/src/&lt;module&gt;</p></blockquote>
<p>Tới đây coi như xong rồi. Tui cũng có ý nghĩ viết một script để download Xorg .Script này lấy tham số là version của X còn thư mục download thì cố định  ở <a href="http://xorg.freedesktop.org/releases/X11R7.3/src/">http://xorg.freedesktop.org/releases/X11R7.3/src/</a>. Nhưng bây giờ mệt lắm rồi. Ai viết giùm tui đi.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/livechung.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/livechung.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/livechung.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/livechung.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/livechung.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/livechung.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/livechung.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/livechung.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/livechung.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/livechung.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=livechung.wordpress.com&amp;blog=1551359&amp;post=27&amp;subd=livechung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://livechung.wordpress.com/2007/10/05/getxorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3fcbfd260f6bbdfa9a9684b9375d1f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Chung</media:title>
		</media:content>

		<media:content url="http://livechung.files.wordpress.com/2007/10/fdx-logo-text.png" medium="image">
			<media:title type="html">X_logo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
