<?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>NamHuy &#187; Open Source</title>
	<atom:link href="http://namhuy.org/blog/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://namhuy.org/blog</link>
	<description>Includes news, help, tutorials, programming, tips and how-to guides for Linux, UNIX, and BSD</description>
	<lastBuildDate>Wed, 21 Mar 2012 03:57:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to Install FFmpeg in Linux</title>
		<link>http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/</link>
		<comments>http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 03:57:54 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=354</guid>
		<description><![CDATA[FFmpeg is so important if you are planning to run a video website with streaming with conversion of video files to different video formats although you might want to upgrade to dedicated server hosting because it takes a huge amount &#8230; <a href="http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://ffmpeg.mplayerhq.hu/" target="_blank">FFmpeg</a> is so important if you are planning to run a video website with streaming with conversion of video files to different video formats although you might want to upgrade to <a title="dedicated server hosting" href="http://www.webhostingsearch.com/dedicated-server.php">dedicated server hosting</a> because it takes a huge amount of bandwidth. This tutorial is intended for Centos/Redhat versions of Linux where any novice user can install ffmpeg without compiling the source which is a more traditional way of installing the FFmpeg software on linux servers. In this tutorial i will show you the easy way to install ffmpeg and ffmpeg-php (php extension) with just yum rather than compiling ffmpeg from source files.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>FFmpeg (<a href="http://ffmpeg.mplayerhq.hu/" target="_blank">http://ffmpeg.mplayerhq.hu</a>)<br />
Mplayer + Mencoder (<a href="http://www.mplayerhq.hu/design7/dload.html" target="_blank">http://www.mplayerhq.hu/design7/dload.html</a>)<br />
Flv2tool (<a href="http://inlet-media.de/flvtool2" target="_blank">http://inlet-media.de/flvtool2</a>)<br />
Libogg + Libvorbis (<a href="http://www.xiph.org/downloads" target="_blank">http://www.xiph.org/downloads</a>)<br />
LAME MP3 Encoder (<a href="http://lame.sourceforge.net/" target="_blank">http://lame.sourceforge.net</a>)<br />
FlowPlayer &#8211; A Free Flash Video Player &#8211; <a href="http://flowplayer.org/" target="_blank">http://flowplayer.org/</a></p>
<h1>Installing FFMpeg</h1>
<p>yum install ffmpeg ffmpeg-devel</p>
<p>If you get <strong>package not found, </strong>then you will need to add few lines in the yum repository for dag packages installation. Create a file named <strong>dag.repo</strong> in <strong>/etc/yum.repos.d</strong> with the following contents on it</p>
<p>[dag]<br />
name=Dag RPM Repository for Red Hat Enterprise Linux<br />
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag<br />
gpgcheck=1<br />
enabled=1</p>
<p>then</p>
<p>yum install ffmpeg ffmpeg-devel</p>
<p>If everything is fine, then the installation should proceed smoothly. If not you will get something like warning GPG public key missing .</p>
<h2>Common Errors</h2>
<p><strong>To fix rpmforge GPG key warning: </strong></p>
<p>rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</p>
<p>For more information refer to <a href="http://dag.wieers.com/rpm/FAQ.php#B4"><strong>this faq </strong></a>depending on Centos version</p>
<p><strong>Missing Dependency Error:</strong></p>
<p>If you get missing dependency error like shown below, in the middle of ffmpeg installation</p>
<p>Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package ffmpeg<br />
Error: Missing Dependency: libtheora.so.0(libtheora.so.1.0) is needed by package ffmpeg<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package ffmpeg<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package a52dec<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package gsm<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package x264<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package xvidcore<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package lame<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package a52dec<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package faad2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package x264<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package lame<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package xvidcore<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package faac<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package faad2<br />
Error: Missing Dependency: libgif.so.4 is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package faac<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package gsm<br />
Error: Missing Dependency: libpng12.so.0(PNG12_0) is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package libmp4v2<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package libmp4v2</p>
<p>then most commonly you have GLIB 2.3 installed instead of GLIB 2.4 version. To check the current GLIB version installed on your server. just use</p>
<p>yum list glib*</p>
<p>and it should list the latest GLIB package version.</p>
<p>The reason i was getting this error was my rpmforge packages was pointed to centos 5 versions instead of centos 4.6.</p>
<p><strong>To fix dependency error:</strong></p>
<p>To fix this error, you might need to check your rpmforge packages compatible to the release of your existing CentOS version.<br />
Check the file <strong>/etc/yum.repos.d/rpmforge.repo </strong>and it should look like for Centos 4.6(Final). If you have lines like <strong>http://apt.sw.be/redhat/<span style="color: #0000ff;">el5</span>/en/mirrors-rpmforge </strong> you might need to make changes to the <strong>rpmforge.repos</strong> like shown below</p>
<p><strong>Note:</strong> Backup the original<strong> rpmforge.repo</strong> file before you edit its content.</p>
<p>[rpmforge]<br />
name = Red Hat Enterprise $releasever &#8211; RPMforge.net &#8211; dag<br />
#baseurl = http://apt.sw.be/redhat/<span style="color: #0000ff;"><strong>el4</strong></span>/en/$basearch/dag<br />
mirrorlist = http://apt.sw.be/redhat/<span style="color: #0000ff;"><strong>el4</strong></span>/en/mirrors-rpmforge<br />
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge<br />
enabled = 1<br />
protect = 0<br />
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag<br />
gpgcheck = 1</p>
<p><strong>To know what linux type and version you are running </strong></p>
<p>cat /etc/redhat-release</p>
<p>Once this is done, do again <strong>yum install ffmpeg. </strong></p>
<p>This trick resolved the problem in my linux box running Centos 4.6 and this is the <em>only way</em> i found to install ffmpeg using yum.</p>
<h2>To check the FFmpeg working:</h2>
<p>Finally, check the ffmpeg whether it is working or not.</p>
<p>&gt; ffmpeg<br />
&gt; ffmpeg -formats<br />
&gt; ffmpeg &#8211;help<br />
// This lists path of mpeg, its modules and other path information<br />
ffmpeg -i Input.file Output.file</p>
<h2>To check what audi/video formats are supported</h2>
<p>ffmpeg -formats &gt; ffmpeg-format.txt</p>
<p>Open the <strong>ffmpeg-formats.txt</strong> to see the ooutput</p>
<p>D means decode<br />
E means encode<br />
V means video<br />
A means audio<br />
T = Truncated</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2012%2F03%2F20%2Fhow-to-install-ffmpeg-in-linux%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/"  data-text="How to Install FFmpeg in Linux" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2012/03/20/how-to-install-ffmpeg-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add the EPEL Repository in RHEL/CentOS 5/6</title>
		<link>http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/</link>
		<comments>http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 07:35:23 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[epel]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rhel]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=333</guid>
		<description><![CDATA[EPEL (Extra Packages for Enterprise Linux) is a third party RPM repository for Red Hat Enterprise Linux and CentOS. This article describes how to add the EPEL repository in Red Hat Enterprise Linux and CentOS 5 or 6. Install EPEL1. &#8230; <a href="http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>EPEL (Extra Packages for Enterprise Linux) is a third party RPM repository for Red Hat Enterprise Linux and CentOS. This article describes how to add the EPEL repository in Red Hat Enterprise Linux and CentOS 5 or 6.<br />
Install EPEL1. Install the EPEL package using the command below.</p>
<p><strong>rpm -Uvh http://bit.ly/q7kHBq</strong></p>
<p>NoteThe full link for the RHEL 6 EPEL package and the links for the lower versions of RHEL are provided below. The rpm command prior to RHEL 6 cannot handle http redirects so no bit.ly links have been provided.</p>
<p>http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm</p>
<p>http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm</p>
<p>http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-10.noarch.rpm</p>
<p>yum repolist2. Verify the installation using the command below. You should see epel in the output.</p>
<p><strong>yum repolist</strong></p>
<p>install yum priorities3. Install the Yum priorities package using the command below.</p>
<p><strong>yum install yum-priorities</strong></p>
<p>edit epel.repo4. Edit the file /etc/yum.repos.d/epel.repo and add the line below under the [epel] section.</p>
<p><strong>priority=10</strong></p>
<p>yum check update5. Test your configuration using the command below. You should see a priority protections message in the output.</p>
<p><strong>yum check-update</strong></p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F11%2F25%2Fhow-to-add-the-epel-repository-in-rhelcentos-56%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/"  data-text="How to Add the EPEL Repository in RHEL/CentOS 5/6" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/11/25/how-to-add-the-epel-repository-in-rhelcentos-56/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux defacements and Linux hacking</title>
		<link>http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/</link>
		<comments>http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 17:36:26 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hacking Linux]]></category>
		<category><![CDATA[internet security]]></category>
		<category><![CDATA[Linux hacking]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=329</guid>
		<description><![CDATA[Zone-h.org has an excellent site to see defacements and what is going on across the internet.   Reviewing the archives and live defacements, Linux is defaced (hacked) more times than Windows.   What exactly does this mean?  Is Linux unsafe? &#8230; <a href="http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://zone-h.org/archive/published=0" target="_blank">Zone-h.org </a>has an excellent site to see defacements and what is going on across the internet.   Reviewing the archives and live defacements, Linux is defaced (hacked) more times than Windows.   What exactly does this mean?  Is Linux unsafe?  Not at all.  It truly falls on the administrator who configured Linux.   There is a false sense of security when you install Linux based on all of the sites and forums that support Linux’s ability to be safe and reliable.   Truly it can be the safest if the following holds true -</p>
<ul>
<li>Proper configuration</li>
<li>Updates</li>
<li>Reading materials</li>
<li>Frequent penetration tests</li>
<li>Monitoring and logging</li>
<li>Experience with advanced configurations</li>
</ul>
<p><a href="http://zone-h.org/archive/published=0" target="_blank">Zone-h archives</a></p>
<p>All operating systems have vulnerabilities.  And yes Apple, Microsoft and Linux is only as safe as the end user.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F11%2F15%2Flinux-defacements-and-linux-hacking%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/"  data-text="Linux defacements and Linux hacking" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/11/15/linux-defacements-and-linux-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Curl Extension for PHP in Ubuntu</title>
		<link>http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/</link>
		<comments>http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 04:03:57 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[curl extension]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=314</guid>
		<description><![CDATA[Many times we come across web applications which are written in PHP and require curl extension. PHP curl functions can used through use of libcurl. The libcurl was create by Daniel Sternberg. With the help of libcurl you can connect &#8230; <a href="http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Many times we come across web applications which are written in PHP and require curl extension. PHP curl functions can used through use of libcurl. The libcurl was create by Daniel Sternberg. With the help of libcurl you can connect and communicate with webserver using different protocols. To install curl library on your Ubuntu computer, you need to have LAMP (Linux apache mysql php) set up ready. Once you have Lamp setup ready just type in following command in terminal to install curl library,</p>
<p>sudo apt-get install curl libcurl3 libcurl3-dev php5-curl</p>
<p>After installing libcurl you should restart the web server with following command,</p>
<p>sudo /etc/init.d/apache2 restart</p>
<p>If you don&#8217;t have LAMP functionality already installed, then please click on the following link to find out how install LAMP on Ubuntu Linux,</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F09%2F25%2Finstall-curl-extension-for-php-in-ubuntu%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/"  data-text="Install Curl Extension for PHP in Ubuntu" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/09/25/install-curl-extension-for-php-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set Ubuntu Server Time through Terminal</title>
		<link>http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/</link>
		<comments>http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 04:38:14 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[time zone]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=304</guid>
		<description><![CDATA[Get the current server time by just typing “date” in the terminal. Install Time Zone 1 $sudo aptitude install tzdata 2 $dpkg-reconfigure tzdata 3 $sudo vim /etc/ntp.conf Add NTP server 1 driftfile /var/lib/ntp/ntp.drift 2 server 0.pool.ntp.org 3 server 1.pool.ntp.org 4 &#8230; <a href="http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Get the current server time by just typing “date” in the terminal.</p>
<p>Install Time Zone<br />
1 $sudo aptitude install tzdata<br />
2 $dpkg-reconfigure tzdata<br />
3 $sudo vim /etc/ntp.conf</p>
<p>Add NTP server<br />
1 driftfile /var/lib/ntp/ntp.drift<br />
2 server 0.pool.ntp.org<br />
3 server 1.pool.ntp.org<br />
4 server 2.pool.ntp.org<br />
5 server pool.ntp.org</p>
<p>Manually update the time by “$sudo ntpdate pool.ntp.org”</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F08%2F30%2Fset-ubuntu-server-time-through-terminal%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/"  data-text="Set Ubuntu Server Time through Terminal" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/08/30/set-ubuntu-server-time-through-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>changing port tomcat</title>
		<link>http://namhuy.org/blog/2011/07/25/changing-port-tomcat/</link>
		<comments>http://namhuy.org/blog/2011/07/25/changing-port-tomcat/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 09:14:58 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[catalina]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=269</guid>
		<description><![CDATA[If you get this message after start tomcat SEVERE: Error initializing endpoint java.net.BindException: Address already in use:8080 Means you will to change tomcat&#8217;s port, here is how to do, go to $CATALINA_HOME/conf/server.xml change &#60;connector port:8080 to &#60;connector port:8083 If you &#8230; <a href="http://namhuy.org/blog/2011/07/25/changing-port-tomcat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you get this message after start tomcat</p>
<pre>SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080</pre>
<p>Means you will to change tomcat&#8217;s port, here is how to do, go to<br />
<strong>$CATALINA_HOME/conf/server.xml</strong></p>
<p>change</p>
<pre>&lt;connector port:8080</pre>
<p>to</p>
<pre>&lt;connector port:8083</pre>
<p>If you running in multiple catalina services, you should create new shell script and include different $CATALINE_HOME and $CATALINA_BASE into it</p>
<p>First, check on your $CATALINA_HOME/conf/server.xml</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F07%2F25%2Fchanging-port-tomcat%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/07/25/changing-port-tomcat/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/07/25/changing-port-tomcat/"  data-text="changing port tomcat" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/07/25/changing-port-tomcat/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/07/25/changing-port-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install all programs on a newly installed ubuntu system</title>
		<link>http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/</link>
		<comments>http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 20:51:17 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=259</guid>
		<description><![CDATA[If you&#8217;re running Ubuntu there is a neat way of installing all of your programs on a newly installed Ubuntu system. Run the following command on the &#8216;old&#8217; Ubuntu installation. &#8220;dpkg &#8211;get-selections &#62; installed-software&#8221; You&#8217;ll end up with a file &#8230; <a href="http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running Ubuntu there is a neat way of installing all of your programs on a newly installed Ubuntu system.<br />
Run the following command on the &#8216;old&#8217; Ubuntu installation.<br />
&#8220;dpkg &#8211;get-selections &gt; installed-software&#8221;</p>
<p>You&#8217;ll end up with a file called installed-software. Copy the file to a usb key and copy it to a location on your backtrack machine.<br />
Run: &#8220;dpkg &#8211;set-selections &lt; installed-software&#8221; in the directory where you copied the file installed-software.<br />
Finally the &#8220;sudo apt-get dselect-upgrade&#8221; commands completes all of this. Be aware that is might take while until the installtion finishes.</p>
<p>If the above doesn&#8217;t work, you probably do not have dselect installed.<br />
In that case, run &#8220;apt-get install deselect&#8221;<br />
The above instructions also work on BackTrack 5</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F07%2F22%2Finstall-all-programs-on-a-newly-installed-ubuntu-system%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/"  data-text="Install all programs on a newly installed ubuntu system" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/07/22/install-all-programs-on-a-newly-installed-ubuntu-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hard and Soft Linking in Linux</title>
		<link>http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/</link>
		<comments>http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 08:37:08 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[hard]]></category>
		<category><![CDATA[linking]]></category>
		<category><![CDATA[soft]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=253</guid>
		<description><![CDATA[Sometimes it’s nice to have files accessible from more than one location on your computer, but to only actually have one copy of the file (it can save on drive space for really big files!). An example of where I &#8230; <a href="http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes it’s nice to have files accessible from more than one location on your computer, but to only actually have one copy of the file (it can save on drive space for really big files!). An example of where I have needed this most, actually, has been with the use of Dropbox on my laptop. Many times I’ve been working out of a folder somewhere on my computer and I’ve needed to make the files accessible to other computers in the research lab. I’ve had to physically copy and paste these directories to my Dropbox folder (or usb drive, before I discovered Dropbox) and then once all the edits had been made elsewhere, had to copy and paste them back to where they belong. If, however, I could place a link to the files in my Dropbox folder, both copy and paste steps could be avoided (as well as the simultaneous confusion of which files were updated, and in what order etc.).<span id="more-253"></span></p>
<p>In linux systems this “linking” process is called “symlinking” (softlinking) or “hardlinking.” The difference between the two is a little subtle and can be understood in that unix files have two parts the “file header” (which includes the name) and the “data” part. The header part contains the file name, permissions, etc, and also contains an inode number. This inode number is like the data part’s address on the hard drive…and points/associates the file name to the data it contains. One way to think about it is through this schematic:</p>
<p><img class="alignnone" title="Inode data file" src="http://img703.imageshack.us/img703/3834/inodedatafile.png" alt="" width="300" height="37" /></p>
<p>&nbsp;</p>
<p>You can imagine that linking to the file can be accomplished through one of two methods. One method is to simply have two filenames associated with the same inode. These two filenames (file header information) can reside in different physical locations on the hard disk and thus in two different locations in your folder tree of your computer. This process is called “hardlinking” and looks like this:</p>
<p><img class="alignnone" title="Hard linking" src="http://img202.imageshack.us/img202/2650/hardlinking1.png" alt="" width="300" height="96" /></p>
<p>Hardlinking is great. If you delete filename1, filename2 still has the data stored in itself even though the file was originally created with filename1. Dropbox supports this linking feature. The only drawback to this kind of linking is that the link literally looks like and feels like the file in any file system–you can’t really tell the difference. So you better remember what was supposed to be the link! The filename doesn’t show up as a link because it has the same properties as a normal file… file header information (stored in the filename1, including the inode number), which links to the data.</p>
<p>Through command line, the way you create one of these hardlinks is through the following command:</p>
<p><strong><code>ln file-to-be-linked.txt linking-file-name.txt</code></strong></p>
<p>Now, the other way of linking files is a literal link: its a special unique file that has a file header portion with an inode link, but instead of that inode pointing straight to the file data inode, it points to the inode of its own file within which contains a “link” to the file you’re linking too. It’s much like a shortcut in Windows…and this is called soft-linking, or forming a symbolic link or “symlink.” It works in the following manner:</p>
<p><img class="alignnone" title="soft link" src="http://img15.imageshack.us/img15/3049/softlink.png" alt="" width="300" height="35" /></p>
<p>Obviously that “to.txt” file is the file header information that contains the inode number of where the data actually resides…so soft links are literally a special file that points to another file and the operating system treats it as such…its obvious that its a link and if you delete the symlink it just no longer points to the file anymore. And if you delete the original file and the symlink still links to it, the data is lost…it is not kept.</p>
<p>To access this kind of linking in the command line, you run the following command:</p>
<p><code>ln -s file-to-be-linked.txt name-of-link-to-file</code></p>
<p>Notice how I dropped the file extension off of the name of the link…you can do that because it is its own type of file that just points to the real thing. Dropbox also supports this kind of file linking. And it comes in handy particularly if you want the file to show up as a symlink.</p>
<p>Now you might be asking yourself why bother with the soft linking if hard linking works so well? The answer might be baffling: all directories in unix/linux systems are soft links that contain a name and point to a data file that contains all the file header information location of all the files associated with that directory. I mean, what are folders anyways? They aren’t “files” in that they don’t have data intrinsic to themselves. But they are “containers” that tell you what is associated with them. Brilliant? Yes. Immediately intuitive? No.</p>
<p>So a “directory” or “folder” has its own file header information which points to an inode number that contains all the addresses of all the files associated with itself. When you go to one of these addresses of the contained files you get pointed to the inode that contains all the data associated with that file. That’s how folders work–and if you want to use a symlink to point to a directory, you have to add a special flag to the linking command:</p>
<p><code> ln -sd directory-to-be-symlinked name-of-link</code></p>
<p>Of course, you can also hardlink a directory, then the code would just be:</p>
<p><code> ln -d directory-to-be-hardlinked name-of-link</code></p>
<p>I think I mostly use symlinking so I remember its a link and not the actual file, but I’m very appreciative that Dropbox supports this option. Makes changing files in different directories on my computer remotely very easy to do!</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F07%2F21%2Fhard-and-soft-linking-in-linux%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/"  data-text="Hard and Soft Linking in Linux" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/07/21/hard-and-soft-linking-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install tomcat 7 from source in ubuntu 11.04 manually ?</title>
		<link>http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/</link>
		<comments>http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 23:12:02 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[timcat]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=230</guid>
		<description><![CDATA[In this post, i will show you how to install tomcat 7 in ubuntu 11.04. 1. First download apache tomcat 7 linux version zipped file, then extract it. 2. now u place the tomcat wherever you like using following command &#8230; <a href="http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In this post, i will show you how to install tomcat 7 in ubuntu 11.04.</p>
<p>1. First download apache tomcat 7 linux version zipped file, then extract it.</p>
<p>2. now u place the tomcat wherever you like using following command</p>
<p><strong>sudo mv apachetomcat /usr/local/tomcat</strong><br />
<span id="more-230"></span><br />
3. make *.sh file executable inside /usr/local/tomcat/bin folder</p>
<p><strong>sudo chmod +x *.sh</strong></p>
<p>make sure you are inside the /usr/local/tomcat/bin folder..</p>
<p>4. you can install open jdk and jre or sun jdk and jre.</p>
<p>define JAVA_HOME path in .bashrc file or /etc/environment file</p>
<p>export JAVA_HOME=/usr/lib/jvm/sun-java-jdk…in my case..check yours</p>
<p>5. now write the script to run the tomcat at startup..</p>
<p>by creating a file tomcat in /etc/init.d directory</p>
<p><strong>sudo nano /etc/init.d/tomcat</strong></p>
<p>after that</p>
<p>in tomcat script file..</p>
<p>write script to start stop and restart</p>
<p>case “$1″ in</p>
<p>start)</p>
<p><strong>sh /etc/local/tomcat/bin/startup.sh</strong></p>
<p>;;</p>
<p>stop)</p>
<p><strong>sh /etc/local/tomcat/bin/shutdown.sh</strong></p>
<p>;;</p>
<p>restart)</p>
<p><strong>sh /etc/local/tomcat/bin/shutdown.sh</strong></p>
<p><strong>sh /etc/local/tomcat/bin/startup.sh</strong></p>
<p>;;</p>
<p><strong>esac</strong></p>
<p><strong>exit 0</strong></p>
<p>6. to run this tomcat script at startup, you can run this script in rc.local script which runs at startup or rc0 which is run at rebooting or rc6 which runs at shutdown..</p>
<p>for automatic handling by ubuntu,you can run following command</p>
<p><strong>sudo update-rc.d tomcat defaults</strong></p>
<p>it may show some warning message like LSB ..but you can ignore it because it is just a comment to write in any script in standard pattern.</p>
<p>reboot you computer or just login logout, you are ready to run your apache tomcat 7..</p>
<p><strong>issue:: http://localhost:8080</strong></p>
<p>for manager and host manager application of tomcat 7, you need to write following code..</p>
<p><strong>sudo nano /usr/local/tomcat/conf/tomcat-users.xml</strong></p>
<p>That’s all done..</p>
<p>For check..some commands can be useful..</p>
<p><strong>echo $JAVA_HOME</strong></p>
<p><strong>sudo update-alternatives –config java</strong></p>
<p><strong>sudo update-alternatives –config javac</strong></p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F07%2F16%2Fhow-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/"  data-text="How to install tomcat 7 from source in ubuntu 11.04 manually ?" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/07/16/how-to-install-tomcat-7-from-source-in-ubuntu-11-04-manually/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing Ubuntu Cache Memory</title>
		<link>http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/</link>
		<comments>http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 23:09:17 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=228</guid>
		<description><![CDATA[Did a search for help on clearing up Ubuntu’s Cache System as my system keeps using up my memory for cache system. Though using up my memory for cache doesn’t actually hinder my system’s operation, I find it quite irritating &#8230; <a href="http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Did a search for help on clearing up Ubuntu’s Cache System as my system keeps using up my memory for cache system. Though using up my memory for cache doesn’t actually hinder my system’s operation, I find it quite irritating to see it being used up even though I have 8GB of RAM. This command should work for most Debian based Linux Operating System, but I haven’t try them as I don’t own any now. Here is the link to the document.<br />
<span id="more-228"></span><br />
Before using the below commands, do a sync to flush any cache data to the disk so data that’s required isn’t lost.</p>
<p>To free pagecache:<br />
echo 1 &gt; /proc/sys/vm/drop_caches</p>
<p>To free dentries and inodes:<br />
echo 2 &gt; /proc/sys/vm/drop_caches</p>
<p>To free pagecache, dentries and inodes:<br />
echo 3 &gt; /proc/sys/vm/drop_caches</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2011%2F07%2F16%2Fclearing-ubuntu-cache-memory%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:21px;"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/"  data-text="Clearing Ubuntu Cache Memory" data-count="horizontal"></a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2011/07/16/clearing-ubuntu-cache-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.404 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-18 06:19:11 -->
<!-- Compression = gzip -->
