<?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>PinQ &#124; st. Mudo &#187; Linux</title>
	<atom:link href="http://blog.nazmi.web.id/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nazmi.web.id</link>
	<description>Lembar Coretan Memori ku</description>
	<lastBuildDate>Thu, 24 Jun 2010 11:28:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Alamat Repositories Debian Lenny untuk Server Indonesia</title>
		<link>http://blog.nazmi.web.id/2010/06/24/alamat-repositories-debian-lenny-untuk-server-indonesia/</link>
		<comments>http://blog.nazmi.web.id/2010/06/24/alamat-repositories-debian-lenny-untuk-server-indonesia/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 11:27:55 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/?p=122</guid>
		<description><![CDATA[Referensi repo server yang bisa digunakan untuk instalasi dan update Debian Lenny :
Universitas Indonesia (Kambing)
deb http://kambing.ui.edu/debian lenny main non-free contrib
deb http://kambing.ui.edu/debian-volatile lenny/volatile main contrib
deb http://kambing.ui.edu/debian-security lenny/updates main non-free contrib
deb http://kambing.ui.edu/debian lenny-proposed-updates main non-free contrib
PENS ITS – Surabaya
deb http://kebo.vlsm.org/debian lenny main non-free contrib
deb http://kebo.vlsm.org/debian-volatile lenny/volatile main contrib
deb http://kebo.vlsm.org/debian-security lenny/updates main non-free contrib
deb http://kebo.vlsm.org/debian stable-proposed-updates main non-free [...]]]></description>
			<content:encoded><![CDATA[<p>Referensi repo server yang bisa digunakan untuk instalasi dan update Debian Lenny :</p>
<p><strong>Universitas Indonesia (Kambing)</strong></p>
<p>deb http://kambing.ui.edu/debian lenny main non-free contrib<br />
deb http://kambing.ui.edu/debian-volatile lenny/volatile main contrib<br />
deb http://kambing.ui.edu/debian-security lenny/updates main non-free contrib<br />
deb http://kambing.ui.edu/debian lenny-proposed-updates main non-free contrib</p>
<p><strong>PENS ITS – Surabaya</strong></p>
<p>deb http://kebo.vlsm.org/debian lenny main non-free contrib<br />
deb http://kebo.vlsm.org/debian-volatile lenny/volatile main contrib<br />
deb http://kebo.vlsm.org/debian-security lenny/updates main non-free contrib<br />
deb http://kebo.vlsm.org/debian stable-proposed-updates main non-free contrib</p>
<p><strong>Institut Teknologi Sepuluh Nopember – Surabaya</strong></p>
<p>deb http://mirror.its.ac.id/debian lenny main non-free contrib<br />
deb http://mirror.its.ac.id/debian-volatile lenny/volatile main contrib<br />
deb http://mirror.its.ac.id/debian-security lenny/updates main non-free contrib<br />
deb http://mirror.its.ac.id/debian stable-proposed-updates main non-free contrib<br />
<span id="more-122"></span><br />
<strong>Universitas Jember</strong></p>
<p>deb http://mirror.unej.ac.id/debian lenny main non-free contrib<br />
deb http://mirror.unej.ac.id/debian-volatile lenny/volatile main contrib<br />
deb http://mirror.unej.ac.id/debian-security lenny/updates main non-free contrib<br />
deb http://mirror.unej.ac.id/debian stable-proposed-updates main non-free contrib</p>
<p><strong>UGM</strong></p>
<p>deb http://repo.ugm.ac.id/debian lenny main non-free contrib<br />
deb http://repo.ugm.ac.id/debian-volatile lenny/volatile main contrib<br />
deb http://repo.ugm.ac.id/debian-security lenny/updates main non-free contrib<br />
deb http://repo.ugm.ac.id/debian stable-proposed-updates main non-free contrib</p>
<p><strong>Indika</strong></p>
<p>deb http://debian.indika.net.id/debian lenny main non-free contrib<br />
deb http://debian.indika.net.id/debian-volatile lenny/volatile main contrib<br />
deb http://debian.indika.net.id/debian-security lenny/updates main non-free contrib<br />
deb http://debian.indika.net.id/debian stable-proposed-updates main non-free contrib</p>
<p><strong>KLAS</strong></p>
<p>deb http://buaya.klas.or.id/debian lenny main non-free contrib<br />
deb http://buaya.klas.or.id/debian-volatile lenny/volatile main contrib<br />
deb http://buaya.klas.or.id/debian-security lenny/updates main non-free contrib<br />
deb http://buaya.klas.or.id/debian stable-proposed-updates main non-free contrib</p>
<p><strong>Oregon State University</strong></p>
<p>deb ftp://ftp.us.debian.org/debian lenny main non-free contrib<br />
deb ftp://ftp.us.debian.org/debian-volatile lenny/volatile main contrib<br />
deb ftp://ftp.us.debian.org/debian-security lenny/updates main non-free contrib<br />
deb ftp://ftp.us.debian.org/debian stable-proposed-updates main non-free contrib</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2010/06/24/alamat-repositories-debian-lenny-untuk-server-indonesia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cara blok situs porno dengan squid proxy di linux</title>
		<link>http://blog.nazmi.web.id/2008/11/05/cara-blok-situs-porno-dengan-squid-proxy-di-linux/</link>
		<comments>http://blog.nazmi.web.id/2008/11/05/cara-blok-situs-porno-dengan-squid-proxy-di-linux/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 09:49:06 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/?p=111</guid>
		<description><![CDATA[Akses browsing ke situs-situs porno dapat diblok jika kita menggunakan squid sebagai  proxy pada linux/unix server, ada beberapa teman yang bertanya bagaimana cara blokir situs porno pada squid proxy tersebut, nah dibawah ini saya jelaskan salah satu tips untuk blok situs porno tersebut.
Squid memiliki Access List atau ACL yang bisa digunakan sebagai sarana untuk [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.nazmi.web.id/wp-content/uploads/2008/11/no-porn.gif"><img class="alignleft size-medium wp-image-119" title="no-porn" src="http://blog.nazmi.web.id/wp-content/uploads/2008/11/no-porn.gif" alt="" width="86" height="86" /></a>Akses browsing ke situs-situs porno dapat diblok jika kita menggunakan squid sebagai  proxy pada linux/unix server, ada beberapa teman yang bertanya <strong>bagaimana cara blokir situs porno pada squid proxy</strong> tersebut, nah dibawah ini saya jelaskan salah satu tips untuk blok situs porno tersebut.</p>
<p>Squid memiliki <em>Access List</em> atau <em>ACL</em> yang bisa digunakan sebagai sarana untuk memfilter akses terhadap alamat url (situs) tertentu, <em>acl</em> yang digunakan disini adalah &#8220;<em>url_regex</em>&#8220;.</p>
<p><strong><em>url_regex</em></strong> ini digunakan untuk memfilter berdasarkan alamat <em>url</em>-nya, misalkan kita ingin blok situs &#8220;<strong>www.playboy.com</strong>&#8220;, nah yang kita gunakan sebagai keyword untuk &#8220;<em>url_regex</em>&#8221; nya adalah &#8220;<strong>playboy.com</strong>&#8220;. Efek dari <em>acl</em> ini adalah akses ke seluruh situs yang menggunakan alamat domain &#8220;<strong>*.playboy.com</strong>&#8221; akan diblokir.</p>
<p>Namun jika kita hanya ingin blok akses ke subdomain saja dan akses ke domain induknya tetap bisa, maka kita bisa gunakan subdomain-nya sebagai keyword <em>acl</em> nya. Misalnya disini kita mau blok akses ke situs &#8220;<em>pornstar.playboy.com</em>&#8221; saja dan akses ke &#8220;<em>www.playboy.com</em>&#8221; dibolehkan, maka disini kita masukkan &#8220;<em>pornstar.playboy.com</em>&#8221; sebagai keyword <em>acl</em>-nya.</p>
<p>Cukup dengan penjelasan dan teori-teorinya, bosan kali yaa&#8230;pengennya langsung praktek..Kita lanjuut..<span id="more-111"></span></p>
<p>Kita asumsikan disini anda telah menginstall squid proxy dengan baik dan sudah berfungsi, dan file konfigurasi squid berada pada lokasi &#8220;<em>/etc/squid/squid.conf</em>&#8221;</p>
<p><strong>Langkah-langkah yang kita lakukan untuk konfigurasi squid nya :</strong></p>
<p>1. Bikin file baru untuk simpan list dari alamat situs yang akan kita blok aksesnya, disini saya  menggunakan &#8220;<em>vi</em>&#8221; karena memang editor favorit saya..</p>
<p><strong># vi /etc/squid/porn.block.txt</strong></p>
<p>2. Tambahkan list alamat situs yang sudah kita data untuk di blok pada file &#8220;<em>/etc/squid/porn.block.txt</em>&#8220;, contoh penulisannya adalah sbb :</p>
<p><em>playboy.com<br />
penthouse.com<br />
duniasex.com<br />
17tahun.com<br />
bangbros.com</em></p>
<p>Jumlah baris dari alamat tersebut, tergantung dari jumlah situs yang ingin anda blok, untuk database   situs porno lainnya bisa anda ambil dari <em>squidguard.org</em>. Kemudian simpanlah file tersebut.</p>
<p>3. Edit file &#8220;<em>/etc/squid/squid.conf</em>&#8221; dan tambahkan konfigurasi <em>ACL url_regex </em>berikut :</p>
<p><strong> acl porn url_regex &#8220;/etc/squid/porn.block.txt&#8221;</strong></p>
<p>konfigurasi ini ditambahkan pada bagian <em>acl</em> dari file &#8220;<em>squid.conf</em>&#8221; nya, contohnya spt dibawah ini :</p>
<p><em>&#8212;&#8211;potongan file squid.conf &#8212;&#8212;</em></p>
<p><em>acl all src 0.0.0.0/0.0.0.0<br />
acl manager proto cache_object<br />
acl localhost src 127.0.0.1/255.255.255.255<br />
acl Lan src 192.168.10.0/24<br />
<strong> acl porn url_regex &#8220;/etc/squid/porn.block.txt&#8221; </strong></em>&lt;&#8212; ACL ditambahkan pada baris ini</p>
<p><em>&#8212;&#8211;potongan file squid.conf &#8212;&#8212;</em></p>
<p>Penjelasan terhadap <em>acl</em> ini adalah, kita mendefinisikan &#8220;<em>porn</em>&#8221; sebagai nama <em>access list</em> dengan tipe &#8220;<em>url_regex</em>&#8220;, dimana list dari <em>url</em> tersebut disimpan pada file dengan nama &#8220;<em>/etc/squid/porn.block.txt</em>&#8221;</p>
<p>4. Setelah <em>acl porn</em> kita definisikan, kita lanjutkan dengan definisi <em>http_access</em> terhadap list <em>url</em> dari <em>acl porn</em> tadi, dengan cara kita tambahkan lagi pada file &#8220;<em>squid.conf</em>&#8221; konfigurasi berikut :</p>
<p><strong><em>http_access deny porn</em></strong></p>
<p>konfigurasi ini ditambahkan pada bagian <em>http_access</em> dari <em>squid.conf</em>, contohnya spt dibawah ini :</p>
<p><em>&#8212;&#8211; potongan file squid.conf &#8212;&#8211;</em></p>
<p><strong><em>http_access deny porn </em></strong>&lt;&#8212; ditambahkan pada urutan paling atas dari http_access nya<em><br />
http_access allow manager localhost<br />
http_access allow lan<br />
http_access deny manager<br />
http_access deny !Safe_ports<br />
http_access deny CONNECT !SSL_ports<br />
http_access allow CONNECT !irc_ports<br />
http_access deny all</em></p>
<p><em>&#8212;&#8211; potongan file squid.conf &#8212;&#8211;</em></p>
<p>penjelasan dari <em>http_access</em> ini adalah, akses http terhadap acl dengan nama &#8220;<em>porn</em>&#8221; akan diblok (<em>deny</em>),<br />
dimana isi dari <em>acl porn</em> ini adalah alamat-alamat situs porno yang memang ingin kita blok.</p>
<p>Contoh file <em>squid.conf </em>setelah dikonfigurasi akan seperti ini :</p>
<p><em>&#8212;&#8211;potongan file squid.conf &#8212;&#8212;</em></p>
<p><em>acl all src 0.0.0.0/0.0.0.0<br />
acl manager proto cache_object<br />
acl localhost src 127.0.0.1/255.255.255.255<br />
acl Lan src 192.168.10.0/24<br />
<strong>acl porn url_regex &#8220;/etc/squid/porn.block.txt&#8221; </strong></em></p>
<p><em><strong>http_access deny porn </strong><br />
http_access allow manager localhost<br />
http_access allow lan<br />
http_access deny manager<br />
http_access deny !Safe_ports<br />
http_access deny CONNECT !SSL_ports<br />
http_access allow CONNECT !irc_ports<br />
http_access deny all</em></p>
<p><em>&#8212;&#8211;potongan file squid.conf &#8212;&#8212;</em></p>
<p>5. Selanjutnya kita instruksikan supaya <strong><em>squid</em></strong> untuk membaca ulang file konfigurasi &#8220;<em>squid.conf</em>&#8221; nya, kita lakukan dengan perintah berikut ini :</p>
<p><strong><em># squid -k reconfigure</em></strong></p>
<p>6. Sekarang kita ujicoba blok akses ke situs pornonya, buka browser favorit kamu misalnya Firefox, kemudian ketikkan salah satu alamat situs yang ada pada file acl porn, misalnya &#8220;<em>www.playboy.com</em>&#8220;. Jika muncul halaman error &#8220;<em>acess denied</em>&#8221; maka blokir situs dengan squid nya sukses..</p>
<p>kalo masih bisa diakses..coba di croscheck lagi langkah-langkah diatas&#8230;Good Luck..!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2008/11/05/cara-blok-situs-porno-dengan-squid-proxy-di-linux/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Perintah dasar Linux</title>
		<link>http://blog.nazmi.web.id/2008/06/01/perintah-dasar-linux/</link>
		<comments>http://blog.nazmi.web.id/2008/06/01/perintah-dasar-linux/#comments</comments>
		<pubDate>Sat, 31 May 2008 18:00:51 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/2008/06/01/perintah-dasar-linux/</guid>
		<description><![CDATA[Secara umum perintah-perintah Linux dan UNIX memiliki sintaks sbb :
 
perintah [option…] [argumen…]
Option merupakan pilihan yang dapat kita gunakan untuk memberikan hasil tertentu dari suatu perintah. Argumen umumnya merupakan sesuatu yang akan diproses oleh perintah, misalnya nama file atau nama direktori.
Tanda [ ] merupakan simbol bahwa option dan argumen tidak harus selalu digunakan dalam menjalankan [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><img title="Linux" src="http://www.aboutdebian.com/linux-logo.jpg" alt="Linux" width="89" height="123" align="left" />Secara umum perintah-perintah Linux dan UNIX memiliki sintaks sbb :<br />
<em> </em></p>
<p align="left"><strong><em>perintah [option…] [argumen…]</em></strong></p>
<p align="left">Option merupakan pilihan yang dapat kita gunakan untuk memberikan hasil tertentu dari suatu perintah. Argumen umumnya merupakan sesuatu yang akan diproses oleh perintah, misalnya nama file atau nama direktori.</p>
<p align="left">Tanda [ ] merupakan simbol bahwa option dan argumen tidak harus selalu digunakan dalam menjalankan perintah. Tanda titik-titik menandakan bahwa baik option dan argumen dapat lebih dari satu. Seluruh perintah dalam Linux dan UNIX bersifat case sensitive, jadi perintah LS akan dianggap berbeda dengan ls.</p>
<p align="left">Sekarang kita mulai dengan perintah-perintah dasar yang umum digunakan dalam Linux :</p>
<p align="left"><strong>ls</strong><br />
Perintah ini merupakan perintah untuk menampilkan isi suatu direktori. Perintah ini mirip seperti perintah dir dalam DOS.<br />
Ada beberapa cara untuk menggunakan perintah ini, misalnya :<br />
# ls<br />
# ls -l<br />
Untuk mengetahui lebih lengkap tentang perintah ls, silakan lihat di manual dengan perintah man ls.</p>
<p align="left"><strong> more</strong><br />
Perintah more dapat digunakan untuk melihat isi suatu file teks dengan layar per layar. untuk keluar dari tampilan more dengan menekan tombol q.</p>
<p align="left"><strong>cat</strong><br />
Perintah ini digunakan untuk menampilkan isi file ke layar tanpa fasilitas tampilan layar per layar.<br />
Biasanya digunakan bersamaan dengan pipeline atau redirection. Misal untuk menampilkan isi file /etc/passwd dan /etc/group, gunakan perintah :<br />
# cat /etc/passwd /etc/group</p>
<p align="left"><strong>cd</strong><br />
Perintah ini mirip seperti perintah cd dalam DOS yaitu digunakan untuk pindah ke direktori tertentu. Contoh perintah :<br />
# cd /home/adje<br />
Untuk menuju kembali ke direktori /home, maka digunakan perintah :<br />
# cd ..<span id="more-108"></span></p>
<p align="left"><strong>cp</strong><br />
Perintah ini digunakan untuk mengkopi suatu file atau direktori. misalnya :<br />
# cp contoh1 contoh2<br />
Perintah di atas maksudnya akan mengkopi contoh1 ke file contoh2. Untuk mengkopi seluruh direktori menggunakan perintah :<br />
# cp -R /home/adje /home/afri</p>
<p align="left"><strong>mv</strong><br />
Perintah ini digunakan untuk memindahkan suatu file ke lokasi lain atau dengan nama lain. Contoh :</p>
<p align="left"># mv contoh1.php contoh2.php<br />
#mv contoh1.php /home/adje/contoh2.php</p>
<p align="left"><strong>rm<br />
</strong> Perintah ini digunakan untuk menghapus direktori atau file. Perintah ini mirip dengan perintah del dalam DOS. Dalam menggunakan perintah ini agar hati-hati karena dalam Linux tidak ada perintah undelete atau unerase. Contoh penggunaan rm sbb :<br />
#rm contoh1.php<br />
Untuk menghapus suatu direktori gunakan perintah :<br />
#rm /home/adje/temp</p>
<p align="left"><strong>mkdir</strong><br />
Perintah ini digunakan untuk membuat direktori. Misalnya :<br />
#mkdir contoh</p>
<p align="left"><em><strong>Pipeline</strong></em><br />
Pada Linux dan UNIX, hasil keluaran suatu proses program dapat diberikan sebagai input pada proses lainnya. Contohnya :</p>
<p align="left">#ls -l /home/adje | more</p>
<p align="left"><strong> grep</strong><br />
Perintah grep digunakan untuk men-filter masukan dan menampilkan dalam bentuk baris-baris yang sesuai dengan pola yang anda inginkan. Contoh :</p>
<p align="left"># ps ax | grep wvdial</p>
<p align="left"><em><strong>Redirection</strong></em><br />
Di dalam Linux atau UNIX, anda dapat membelok-belokkan standar input, output ataupun standar error menuju tujuan lain.</p>
<p align="left">Misalnya anda dapat membelokkan standar output suatu program ke file atau membelokkan standar input suatu program dari suatu file. Proses pembelokkan ini disebut redirection dan di *NIX digunakan simbol &#8220;&gt;&#8221; (untuk membelokkan standar output ke file) dan simbol &#8220;&lt;&#8221; (untuk membelokkan standar input dari file). Contoh :</p>
<p align="left">Untuk menyimpan tampilan isi seluruh directori /etc ke sebuah file, gunakan perintah :</p>
<p align="left">#ls -lR /etc &gt; isi-etc</p>
<p align="left">Untuk menambahkan isi file isi-etc dengan data lain, gunakan simbol &#8220;&gt;&gt;&#8221; (append) pada redirection, misal :</p>
<p align="left">#ls -lR /home/adje &gt;&gt; isi-etc</p>
<p align="left">Untuk membuat perintah mensortir data yang terdapat pada file contoh.txt dapat digunakan perintah :</p>
<p align="left">#sort &lt; contoh.txt</p>
<p align="left">Perintah-perintah di atas adalah perintah-perintah yang sering digunakan dalam Linux atau UNIX. Bila anda masih merasa kesulitan silakan baca manual-nya terlebih dahulu. Karena membaca manual itu sangat penting bila kita sering meng-oprek Linux atau UNIX. Dari manual itu kita bisa mendapat solusi dari masalah yang kita hadapi</p>
<p align="left"><em>Copy from http://aceh.linux.or.id/archives/182 </em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2008/06/01/perintah-dasar-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perintah dasar Linux 2</title>
		<link>http://blog.nazmi.web.id/2008/04/29/perintah-dasar-linux-2/</link>
		<comments>http://blog.nazmi.web.id/2008/04/29/perintah-dasar-linux-2/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 18:03:32 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/2008/06/01/perintah-dasar-linux-2/</guid>
		<description><![CDATA[Perintah untuk berbagai operasi dasar di sistem operasi linux, beserta penjelasannya, dapat saudara lihat pada tabel yang telah penulis susun sebagai berikut:


Perintah
Keterangan


any_command --help
Menampilkan keterangan bantu tentang pemakaian perintah. &#8220;&#8211;help&#8221; sama dengan perintah pada DOS &#8220;/h&#8221;.


ls
Melihat isi file dari direktori aktif. Pada linux perintah dir hanya berupa alias dari perintah ls. Untuk perintah ls sendiri sering [...]]]></description>
			<content:encoded><![CDATA[<p>Perintah untuk berbagai operasi dasar di sistem operasi linux, beserta penjelasannya, dapat saudara lihat pada tabel yang telah penulis susun sebagai berikut:<span id="more-103"></span></p>
<table style="border-collapse: collapse" border="1" cellpadding="2">
<tr>
<th>Perintah</th>
<th>Keterangan</th>
</tr>
<tr>
<td><tt><em>any_command</em> --help</tt></td>
<td>Menampilkan keterangan bantu tentang pemakaian perintah. &#8220;&#8211;help&#8221; sama dengan perintah pada DOS &#8220;/h&#8221;.</td>
</tr>
<tr>
<td><tt>ls</tt></td>
<td>Melihat isi file dari direktori aktif. Pada linux perintah <tt>dir</tt> hanya berupa alias dari perintah <tt>ls</tt>. Untuk perintah <tt>ls</tt> sendiri sering dibuatkan alias <tt>ls --color</tt>, agar pada waktu di <tt>ls</tt> ditampilkan warna-warna sesuai dengan file-filenya, biasanya hijau untuk execute, dsb.</td>
</tr>
<tr>
<td><tt>ls -al</tt></td>
<td>Melihat seluruh isi file pada direktori aktif beserta file hidden, lalu ditampilkan layar per layar.</td>
</tr>
<tr>
<td><tt>cd <em>directory</em></tt></td>
<td>Change directory. Menggunakan <tt>cd</tt> tanpa nama direktori akan menghantarkan anda ke home direktori. Dan <tt>cd -</tt> akan menghantarkan anda ke direktori sebelumnya.</td>
</tr>
<tr>
<td><tt>cp <em>source destination</em></tt></td>
<td>Mengopi suatu file</td>
</tr>
<tr>
<td><tt>mcopy <em>source destination</em> </tt></td>
<td>Mengcopy suatu file dari/ke dos filesystem. Contoh &lt;tt&gt;mcopy a:autoexec.bat ~/junk . Gunakan <tt>man mtools</tt> untuk command yang sejenis : mdir, mcd, mren, mmove, mdel, mmd, mrd, mformat&#8230;.</td>
</tr>
<tr>
<td><tt>mv <em>source destination</em></tt></td>
<td>Memindahkan atau mengganti nama file</td>
</tr>
<tr>
<td><tt>ln -s <em>source destination</em> </tt></td>
<td>Membuat Simbolic Links, contoh &lt;tt&gt;ln -sf /usr/X11R6/bin/XF86_SVGA /etc/X11/X, membuat Simbolic link dari file XF86_SVGA ke X</td>
</tr>
<tr>
<td><tt>rm <em>files</em></tt></td>
<td>Menghapus file</td>
</tr>
<tr>
<td><tt>mkdir <em>directory</em></tt></td>
<td>Membuat direktori baru</td>
</tr>
<tr>
<td><tt>rmdir <em>directory</em></tt></td>
<td>Menghapus direktori yang telah kosong</td>
</tr>
<tr>
<td><tt>rm -r <em>files</em></tt></td>
<td>(recursive remove) Menghapus file, direktori dan subdirektorinya. Hati-hati menggunakan perintah ini apabila anda login sebagai root, karena root dengan mudah dapat menghapus seluruh file pada sistem dengan perintah di atas, tidak ada perintah untuk undelete di Linux</td>
</tr>
<tr>
<td><tt>more</tt></td>
<td>Untuk melihat isi suatu file, dengan tambahan perintah more, maka isi file tersebut ditampilkan layar per layar.</td>
</tr>
<tr>
<td><tt>less <em>filename</em></tt></td>
<td>Melihat suatu file layar per layar, dan tekan tombol &#8220;q&#8221; apabila ingin keluar,</td>
</tr>
<tr>
<td><tt>pico <em>filename</em></tt></td>
<td>Edit suatu text file.</td>
</tr>
<tr>
<td><tt>pico -w <em>filename</em></tt></td>
<td>Edit suatu text file, dengan menonaktifkan fungsi word wrap, sangat berguna untuk mengedit file seperti /etc/fstab.</td>
</tr>
<tr>
<td><tt>lynx <em>file.html</em></tt></td>
<td>Melihat file html atau browse ke net dengan text mode, dimana gambar/image tidak dapat ditampilkan, tapi lynx adalah suatu browser yang sangat cepat, sangat berguna bila anda hanya menginginkan suatu artikel tanpa image.</td>
</tr>
<tr>
<td><tt>tar -zxvf <em>filename.tar.gz</em></tt></td>
<td>Meng-untar sebuah file tar sekaligus meng-uncompress file tersebut (*.tar.gz atau *.tgz), untuk meletakkannya direktori yg diinginkan tambahkan option -C direktori, contoh <tt>tar -zxvf filename.tar.gz -C /opt</tt> (meletakkan file tersebut di direktori /opt</td>
</tr>
<tr>
<td><tt>tar -xvf <em>filename.tar</em></tt></td>
<td>Meng-untar sebuah file tar yang tidak terkompress (*.tar).</td>
</tr>
<tr>
<td><tt>gunzip <em>filename.gz</em></tt></td>
<td>Meng-uncompress sebuah file zip (*.gz&#8221; or *.z). dengan menggunakan gzip (juga zip atau compress) jika anda menginginkan mengompress file.</td>
</tr>
<tr>
<td><tt>bunzip2 <em>filename.bz2</em></tt></td>
<td>Meng-uncompress file dengan format (*.bz2) dengan utiliti &#8220;bzip2&#8243;, digunakan pada file yang besar.</td>
</tr>
<tr>
<td><tt>unzip <em>filename.zip</em></tt></td>
<td>Meng-uncompress file dengan format (*.zip) dengan utiliti &#8220;unzip&#8221; yang kompatibel dengan pkzip for DOS.</td>
</tr>
<tr>
<td><tt>find / -name <em>"filename"</em></tt></td>
<td>Mencari &#8220;namafile&#8221; pada komputer anda dimulai dengan direktori /. Namafile tersebut mungkin saja berisi wildcard (*,?).</td>
</tr>
<tr>
<td><tt>locate <em>filename</em></tt></td>
<td>Mencari file dengan string &#8220;filename&#8221;. Sangat mudah dan cepat dari perintah di atas.</td>
</tr>
<tr>
<td><tt>pine</tt></td>
<td>Email reader yang sangat mudah digunakan, dan menjadi favorit banyak pemakai mesin Unix. Atau anda bisa pakai email yang sangat customize, yaitu <tt>mutt</tt> ,</td>
</tr>
<tr>
<td><tt>talk <em>username1</em></tt></td>
<td>Berbicara dengan keyboard dengan user lain yg sedang login pada mesin kita (atau gunakan <tt>talk username1@machinename&lt;/t&gt; untuk berbicara dengan komputer lain). Untuk menerima undangan percakapan, ketikkan &lt;tt&gt;talk username2</tt>. Jika seseorang mencoba untuk berbicara dengan anda dan itu dirasakan mengganggu, anda bisa menggunakan perintah <tt>mesg n</tt> untuk menolak pesan tersebut. Dan gunakan perintah <tt>who</tt> atau <tt>rwho</tt> untuk melihat siapa user yang mengganggu tersebut.</td>
</tr>
<tr>
<td><tt>mc</tt></td>
<td>Menjalankan &#8220;Morton Commander&#8221; &#8230; eh&#8230; salah maksudnya &#8220;Midnight Commander&#8221; sebagai file manager, cepat dan bagus.</td>
</tr>
<tr>
<td><tt>telnet <em>server</em></tt></td>
<td>Untuk menghubungkan komputer kita ke komputer lain dengan menggunakan protokol TELNET. Gunakan nama mesin atau Nomor IP mesin, dan anda akan mendapatkan prompt login name dari mesin tersebut, masukkan passwordnya, oh ya .. anda juga harus punya account di mesin remote tersebut. Telnet akan menghubungkan anda dengan komputer lain dan membiarkan anda untuk mengoperasikan mesin tersebut. Telnet sangat tidak aman, setiap yang anda ketik menjadi &#8220;open text&#8221;, juga dengan password anda! Gunakan <a href="http://wiki.linux.or.id/Ssh" title="Ssh">ssh</a> alih-alih telnet untuk mengakses mesin secara remote.</td>
</tr>
<tr>
<td><tt>rlogin <em>server</em></tt></td>
<td>(remote login) Menghubungkan anda kekomputer lain. Loginname dan password, tetapi apabila account anda tersebut telah dipakai, maka anda akan mendapatkan pesan kesalahan pada password anda. Sangat tidak aman juga, gunakan <a href="http://wiki.linux.or.id/Ssh" title="Ssh">ssh</a> sebagai gantinya.</td>
</tr>
<tr>
<td><tt>rsh <em>server</em></tt></td>
<td>(remote shell) Jalan lain untuk menghubungkan anda ke remote machine. Apabila login name/password anda sedang dipakai di remote mesin tsb, maka password anda tidak akan berlaku. Idem dengan rlogin, gantikan dengan <a href="http://wiki.linux.or.id/Ssh" title="Ssh">ssh</a>.</td>
</tr>
<tr>
<td><tt>ftp <em>server</em></tt></td>
<td>Ftp ke mesin lain, ini sangat berguna untuk mengopy file ke/dari remote mesin. Juga tidak aman, gunakan <a href="http://wiki.linux.or.id/Scp" title="Scp">scp</a> dari keluarga <a href="http://wiki.linux.or.id/Ssh" title="Ssh">ssh</a> sebagai gantinya.</td>
</tr>
<tr>
<td><tt>minicom</tt></td>
<td>Program Minicom (dapat dikatakan seperti &#8220;Procomm/Hyperterminal for Linux&#8221;).</td>
</tr>
<tr>
<td><tt>./program_name</tt></td>
<td>Menjalankan program pada direktori aktif, yang mana tidak terdapat pada PATH anda</td>
</tr>
<tr>
<td><tt>xinit</tt></td>
<td>Menjalankan X-window server (tanpa windows manager).</td>
</tr>
<tr>
<td><tt>startx</tt></td>
<td>Menjalankan X-window server dan meload default windows manager. Sama seperti perintah &#8220;win&#8221; under DOS dengan Win3.1</td>
</tr>
<tr>
<td><tt>startx -- :1</tt></td>
<td>Menjalankan sesi X-windows berikutnya pada display 1 (default menggunakan display 0). Anda dapat menjalankan banyak GUI terminal secara bersamaan, untuk pindah antar GUI gunakan &lt;Ctrl&gt;&lt;Alt&gt;&lt;F7&gt;, &lt;Ctrl&gt;&lt;Alt&gt;&lt;F8&gt;, etc, tapi ini akan lebih banyak memakan memori.</td>
</tr>
<tr>
<td><tt>xterm</tt></td>
<td>(pada X terminal) ,menjalankan X-windows terminal. Untuk keluar ketikkan <tt>exit</tt></td>
</tr>
<tr>
<td><tt>xboing</tt></td>
<td>(pada X terminal). Sangat lucu deh &#8230;., seperti games-games lama &#8230;..</td>
</tr>
<tr>
<td><tt>gimp</tt></td>
<td>(pada X terminal) Program image editor yang sangat bagus, bisa disamakan dengan Adobe Photoshop, yang membedakan adalah program ini gratis.</td>
</tr>
<tr>
<td><tt>netscape</tt></td>
<td>(pada X terminal) menjalankan netscape, versi pada waktu tulisan ini dibuat telah mencapai versi 4.7</td>
</tr>
<tr>
<td><tt>netscape -display host:0.0</tt></td>
<td>(pada X terminal) menjalankan netscape pada mesin yang aktif dan menampilkan outputnya pada mesin yang bernama <tt>host</tt> display 0 screen 0. Anda harus memberikan akses untuk mesin aktif untuk menampilkannya pada mesin <tt>host</tt> dengan perintah <tt>xhost</tt></td>
</tr>
<tr>
<td><tt>shutdown -h now</tt></td>
<td>(sebagai root) Shut down sistem. Umumnya digunakan untuk remote shutdown. Gunakan &lt;Ctrl&gt;&lt;Alt&gt; untuk shutdown pada konsol (dapat dijalankan oleh user).</td>
</tr>
<tr>
<td><tt>halt</tt></td>
<td>reboot (sebagai root) Halt atau reboot mesin. Lebih simple dari perintah di atas.</td>
</tr>
<tr>
<td><tt>man <em>topic</em></tt></td>
<td>Menampilkan daftar dari sistem manual pages (help) sesuai dengan topic. Coba <tt>man man</tt>. lalu tekan <tt>q</tt> untuk keluar dari viewer. Perintah <tt>info topic</tt> Manual pages dapat dibaca dilhat dengan cara <tt>any_command --help</tt>.</td>
</tr>
<tr>
<td><tt>apropos <em>topic</em></tt></td>
<td>Menampilkan bantuan manual berdasarkan topik..</td>
</tr>
<tr>
<td><tt>pwd</tt></td>
<td>Melihat direktori kerja saat ini</td>
</tr>
<tr>
<td><tt>hostname</tt></td>
<td>Menampilkan nama local host (mesin dimana anda sedang bekerja). Gunakan perintah <tt>netconf</tt> (sebagai root) untuk merubah nama host dari mesin tersebut, atau edit file /etc/hosts</td>
</tr>
<tr>
<td><tt>whoami</tt></td>
<td>Mencetak login name anda</td>
</tr>
<tr>
<td><tt>id <em>username</em></tt></td>
<td>Mencetak user id (uid) atau group id (gid)</td>
</tr>
<tr>
<td><tt>date</tt></td>
<td>Mencetak atau merubah tanggal dan waktu pada komputer, contoh merubah tanggal dan waktu ke 2000-12-31 23:57 dengan perintah; <tt>date 123123572000</tt></td>
</tr>
<tr>
<td><tt>time</tt></td>
<td>Melihat jumlah waktu yg ditangani untuk penyelesaian suatu proses + info lainnya. Jangan dibingungkan dengan perintah <tt>date</tt></td>
</tr>
<tr>
<td><tt>who</tt></td>
<td>Melihat user yang login pada komputer kita.</td>
</tr>
<tr>
<td><tt>rwho -a</tt></td>
<td>Melihat semua user yg login pada network anda. Layanan perintah rwho ini harus diaktifkan, jalankan setup sebagai root untuk mengaktifkannya.</td>
</tr>
<tr>
<td><tt>finger <em>username</em></tt></td>
<td>Melihat informasi user, coba jalankan; <tt>finger root</tt></td>
</tr>
<tr>
<td><tt>last</tt></td>
<td>Melihat user sebelumnya yang telah login di komputer.</td>
</tr>
<tr>
<td><tt>uptime</tt></td>
<td>Melihat jumlah waktu pemakaian komputer oleh seseorang, terhitung proses reboot terakhir.</td>
</tr>
<tr>
<td><tt>ps</tt></td>
<td>(=print status) Melihat proses-proses yang dijalankan oleh user</td>
</tr>
<tr>
<td><tt>ps axu</tt></td>
<td>Melihat seluruh proses yang dijalankan, walaupun tanpa terminal control, juga ditampilkan nama dari user untuk setiap proses.</td>
</tr>
<tr>
<td><tt>top</tt></td>
<td>Melihat proses yang berjalan, dengan urutan penggunaan cpu.</td>
</tr>
<tr>
<td><tt>uname -a</tt></td>
<td>Informasi system kernel anda</td>
</tr>
<tr>
<td><tt>free</tt></td>
<td>Informasi memory (dalam kilobytes).</td>
</tr>
<tr>
<td><tt>df -h</tt></td>
<td>(=disk free) Melihat informasi pemakaian disk pada seluruh system (in human-readable form)</td>
</tr>
<tr>
<td><tt>du / -bh</tt></td>
<td>(=disk usage) Melihat secara detil pemakaian disk untuk setiap direktori, dimulai dari root (in human legible form).</td>
</tr>
<tr>
<td><tt>cat /proc/cpuinfo</tt></td>
<td>Cpu info. Melihat file pada /proc directori yang bukan merupakan file nyata (not real files).</td>
</tr>
<tr>
<td><tt>cat /proc/interrupts</tt></td>
<td>Melihat alamat interrupt yang dipakai.</td>
</tr>
<tr>
<td><tt>cat /proc/version</tt></td>
<td>Versi dari Linux dan informasi lainnya.</td>
</tr>
<tr>
<td><tt>cat /proc/filesystems</tt></td>
<td>Melihat filesystem yang digunakan.</td>
</tr>
<tr>
<td><tt>cat /etc/printcap</tt></td>
<td>Melihat printer yang telah disetup</td>
</tr>
<tr>
<td><tt>lsmod</tt></td>
<td>(as root) Melihat module-module kernel yang telah di load.</td>
</tr>
<tr>
<td><tt>set</tt></td>
<td>Melihat environment dari user yang aktif</td>
</tr>
<tr>
<td><tt>echo $PATH</tt></td>
<td>Melihat isi dari variabel <tt>PATH</tt>. Perintah ini dapat digunakan untuk menampilkan variabel environmen lain dengan baik. Gunakan <tt>set</tt> untuk melihat environmen secara penuh.</td>
</tr>
<tr>
<td><tt>dmesg</tt></td>
<td>Mencetak pesan-pesan pada waktu proses boot. (menampilkan file: /var/log/dmesg).</td>
</tr>
<tr>
<td><tt>clear</tt></td>
<td>Membersihkan layar.</td>
</tr>
<tr>
<td><tt>adduser</tt></td>
<td>Menambah pengguna.</td>
</tr>
</table>
<p><em>Copy from http://wiki.linux.or.id/Perintah_dasar_Linux</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2008/04/29/perintah-dasar-linux-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Transparent proxy di squid versi 2.6.xx</title>
		<link>http://blog.nazmi.web.id/2008/02/16/transparent-proxy-di-squid-versi-26xx/</link>
		<comments>http://blog.nazmi.web.id/2008/02/16/transparent-proxy-di-squid-versi-26xx/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 04:12:03 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/2008/02/16/transparent-proxy-di-squid-versi-26xx/</guid>
		<description><![CDATA[Untuk menjadikan squid sebagai Transparent proxy pada squid versi 2.6.xx, terdapat perbedaan pada settingan squid.conf nya. Untuk versi 2.5.xx ke bawah biasanya ditambahkan konfigurasi berikut :
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
Namun untuk squid dengan versi 2.6.xx cukup dengan menambahkan konfigurasi berikut pada squid.conf nya :
http_port 3128 transparent
always_direct allow all
Sepertinya untuk versi squid 2.6.xx, transparent proxy bisa [...]]]></description>
			<content:encoded><![CDATA[<p>Untuk menjadikan squid sebagai Transparent proxy pada squid versi 2.6.xx, terdapat perbedaan pada settingan squid.conf nya. Untuk versi 2.5.xx ke bawah biasanya ditambahkan konfigurasi berikut :</p>
<p>httpd_accel_host virtual<br />
httpd_accel_port 80<br />
httpd_accel_with_proxy on<br />
httpd_accel_uses_host_header on</p>
<p>Namun untuk squid dengan versi 2.6.xx cukup dengan menambahkan konfigurasi berikut pada squid.conf nya :</p>
<p>http_port 3128 transparent<br />
always_direct allow all</p>
<p>Sepertinya untuk versi squid 2.6.xx, transparent proxy bisa di set lebih gampang <img src='http://blog.nazmi.web.id/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2008/02/16/transparent-proxy-di-squid-versi-26xx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Script for monitoring memory usage with MRTG</title>
		<link>http://blog.nazmi.web.id/2007/06/21/monitor-your-memory-usage-with-mrtg/</link>
		<comments>http://blog.nazmi.web.id/2007/06/21/monitor-your-memory-usage-with-mrtg/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 04:26:11 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/21/06/2007/monitor-your-memory-usage-with-mrtg/</guid>
		<description><![CDATA[ With MRTG you can graph your network traffic, but you can also use it to gather other network information, such as monitoring your system&#8217;s swap and memory usage. MRTG is useful for more than just graphing network traffic. If you look at the MRTG Companion Sites page, you&#8217;ll see numerous links to different scripts [...]]]></description>
			<content:encoded><![CDATA[<p class="clearfix" id="story"><img src="http://oss.oetiker.ch/mrtg/images/mrtg_logo.gif" width="205" vspace="5" hspace="10" height="71" align="left" /> With MRTG you can graph your network traffic, but you can also use it to gather other network information, such as monitoring your system&#8217;s swap and memory usage. MRTG is useful for more than just graphing network traffic. If you look at the MRTG Companion Sites page, you&#8217;ll see numerous links to different scripts and tools to put all kinds of information into an MRTG graph.</p>
<p>Here, we will look at monitoring the local system&#8217;s swap and memory usage over time. This assumes that MRTG is already configured or you have an understanding of how to configure MRTG .The first step is to create the script, which is very simplistic. Save it as <em>/usr/local/bin/memstat.sh</em> with the following contents:<span id="more-94"></span>
<pre>#!/bin/sh/usr/bin/free -b | /bin/awk 'NR==2 {ramUsed = $3 }NR==4 {swapUsed = $3 }END { print swapUsed "n" ramUsed "n0n0" }'</pre>
<p>The output, for a human, is not very interesting:
<pre># /usr/local/bin/memstat.sh0154800947200</pre>
<p>For MRTG, however, with the appropriate configuration, it becomes very interesting. Add the following snippet to <em>/etc/mrtg.cfg</em>. Ideally, MRTG should be running every five minutes for a good sampling.
<pre>Target[localmem]: `/usr/local/bin/memstat.sh`Title[localmem]: Mem and Swap Usage [surtr]PageTop[localmem]: &lt;h1&gt;Memory and Swap Usage [surtr]&lt;/h1&gt;MaxBytes[localmem]: 100000000000ShortLegend[localmem]: BYLegend[localmem]: MemoryLegendI[localmem]: SwapLegendO[localmem]: MemLegend1[localmem]: SwapLegend2[localmem]: MemOptions[localmem]: gauge,growright,nopercentkMG[localmem]: k,M,G,T,P,XColours[localmem]: RED#bb0000,BLUE#1000ff,GREEN#006600,VIOLET#ff00ff</pre>
<p>This code tells MRTG to execute the <em>/usr/local/bin/memstat.sh</em> script and take the numbers it provides as output as input for itself, which will then be used to create a typical MRTG graph of the data. This will then give you a sampling of memory and swap usage over time. MRTG will create graphs for yearly, monthly, weekly, and daily statistics.Using the same, you could perform the same data analysis for CPU usage, disk usage, e-mail statistics, Web traffic, and much more.<em>(from  www.builderau.com.au)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2007/06/21/monitor-your-memory-usage-with-mrtg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squid &#8211; File Descriptor Limits</title>
		<link>http://blog.nazmi.web.id/2007/06/20/squid-file-descriptor-limits/</link>
		<comments>http://blog.nazmi.web.id/2007/06/20/squid-file-descriptor-limits/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 08:00:31 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/20/06/2007/squid-file-descriptor-limits/</guid>
		<description><![CDATA[File descriptor limits are a common problem for new Squid users.   This happens because some operating systems have relatively low   per-process and system-wide limits.  In some cases, you must take   steps to tune your system before compiling Squid.A file descriptor is simply a number that represents an open [...]]]></description>
			<content:encoded><![CDATA[<p><span id="intelliTxt">File descriptor limits are a common problem for new Squid users.   This happens because some operating systems have relatively low   per-process and system-wide limits.  In some cases, you must take   steps to tune your system before compiling Squid.</span>A file descriptor is simply a number that represents an open file   or socket.  Every time a process opens a new file or socket, it   allocates a new file descriptor.  These descriptors are reused   after the file or socket is closed.  Most Unix systems place a limit   on the number of simultaneously open file descriptors.  There are   both per-process and per-system limits.<!-- sidebar begins --> <!-- don't move sidebars --> <!-- sidebar ends -->How many file descriptors does Squid need?  The answer depends   on how many users you have, the size of your cache, and which particular   features that you have enabled.  Here are some of the things that   consume file descriptors in Squid:<span id="intelliTxt"></span>
<ul>
<li>Client-side TCP connections</li>
<li>Server-side TCP connections</li>
<li>Writing cachable responses to disk</li>
<li>Reading cache hits from disk</li>
<li>Log files</li>
<li>Communication with external helper processes, such as redirectors and authenticators</li>
<li>Idle (persistent) HTTP connections</li>
</ul>
<p><span id="more-93"></span>Even when Squid is not doing anything, it has some number of file   descriptors open for log files and helpers.  In most cases, this   is between 10 and 25, so it&#8217;s probably not a big deal.  If   you have a lot of external helpers, that number goes up.  However,   the file descriptor count really goes up once Squid starts serving   requests.  In the worst case, each concurrent request requires   three file descriptors: the client-side connection, a server-side   connection for cache misses, and a disk file for reading hits or   writing misses.A Squid cache with just a few users might be able to get by with   a file descriptor limit of 256.  For a moderately busy Squid,   1024 is a better limit.  Very busy caches should use 4096 or more.   One thing to keep in mind is that file descriptor usage often   surges above the normal level for brief amounts of time.  This   can happen during short, temporary network outages or other   interruptions in service.There are a number of ways to determine the file descriptor limit   on your system.  One is to use the built-in shell commands <code>limit</code>   or <code>ulimit</code>.For Bourne shell users:<span id="intelliTxt"></span>
<pre><code>root# ulimit -n1024</code></pre>
<p>For C shell users:
<pre><code>root# limit descdescriptors     1024</code></pre>
<p>If you already have Squid compiled and installed, you can   just look at the <em>cache.log</em> file for a line like this:
<pre><code>2003/12/12 11:10:54| With 1024 file descriptors available</code></pre>
<p>If Squid detects a file descriptor shortage while it is running,   you&#8217;ll see a warning like this in <em>cache.log</em>:
<pre><code>WARNING! Your cache is running out of file descriptors</code></pre>
<p>If you see the warning, or know in advance that you&#8217;ll need more   file descriptors, you should increase the limits.   The technique for increasing the file descriptor limit varies   between operating systems.<br />
<h4>For Linux Users</h4>
<p>Linux users need to edit one of the system include files and   twiddle one of the system parameters via the <code>/proc</code> interface.   First, edit <em>/usr/include/bits/types.h</em> and change the value for   <code>__FD_SETSIZE</code>.  Then, give the kernel a new limit with this command:
<pre><code>root# echo 1024 &gt; /proc/sys/fs/file-max</code></pre>
<p>Finally, before compiling or running Squid, execute this shell command   to set the process limit equal to the kernel limit:
<pre><code>root# ulimit -Hn 1024</code></pre>
<p>After you have set the limit in this manner, you&#8217;ll need to   reconfigure, recompile, and reinstall Squid.  Also note that these   two commands do not permanently set the limit.  They must be   executed each time your system boots.  You&#8217;ll want to add them to   your system startup scripts.<br />
<h3>For NetBSD/OpenBSD/FreeBSD Users</h3>
<p>On BSD-based systems, you&#8217;ll need to compile a new kernel.   The kernel   configuration file lives in a directory such as <em>/usr/src/sys/i386/conf</em> or   <em>/usr/src/sys/arch/i386/conf</em>.  There you&#8217;ll find a file, possibly named   <em>GENERIC</em>, to which you should add a line like this:
<pre><code>options       MAXFILES=8192</code></pre>
<p>For OpenBSD, use <code>option</code> instead of <code>options</code>.  Reboot your   system after you&#8217;ve finished configuring, compiling, and installing   your new kernel.  Then, reconfigure, recompile, and reinstall   Squid.<br />
<h4>For Solaris Users</h4>
<p>Add this line to your <em>/etc/system</em> file:
<pre><code>set rlim_fd_max = 1024</code></pre>
<p>Then, reboot the system, reconfigure, recompile, and reinstall Squid.For further information on file descriptor limits, see Chapter 3, &#8220;Compiling and Installing&#8221;, of <em>Squid: The Definitive Guide</em> or section 11.4 of   the <a href="http://www.squid-cache.org/Doc/FAQ/FAQ.html">Squid FAQ</a>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2007/06/20/squid-file-descriptor-limits/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Squid: WARNING! Your cache is running out of filedescriptors</title>
		<link>http://blog.nazmi.web.id/2007/06/20/squid-warning-your-cache-is-running-out-of-filedescriptors/</link>
		<comments>http://blog.nazmi.web.id/2007/06/20/squid-warning-your-cache-is-running-out-of-filedescriptors/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 07:49:25 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/20/06/2007/squid-warning-your-cache-is-running-out-of-filedescriptors/</guid>
		<description><![CDATA[So you have a LAN with 50+ users and you set up a nice Squid w3cache as a transparent proxy with 100GB of space reserved for the cache (hdds are so cheap nowadays…). Weeks pass and suddenly you notice that something is messing up your
web experience as Firefox suddenly decides to run painfully slow. About [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">So you have a LAN with 50+ users and you set up a nice Squid w3cache as a transparent proxy with 100GB of space reserved for the cache (hdds are so cheap nowadays…). Weeks pass and suddenly you notice that something is messing up your</p>
<p class="entry"><em>web experience</em> as Firefox suddenly decides to run painfully slow. About 30 minutes wasted on finding the culprit (like changing your DNS servers, clearing browser cache, etc.) until you decide to check the router and then <a href="http://www.squid-cache.org/">Squid</a> and then its logs. And then you find something <em>fishy</em>:</p>
<pre class="code">WARNING! Your cache is running out of filedescriptors</pre>
<p><span id="more-92"></span><br />
I won’t be explaining why this happens. Others <a href="http://www.onlamp.com/pub/a/onlamp/2004/02/12/squid.html">have</a> <a href="http://www.onlamp.com/pub/a/onlamp/2004/02/12/squid.html">done it</a> <a href="http://wiki.squid-cache.org/SquidFaq/TroubleShooting#head-eb3240fe8e61368056af86138a2b5dcbc9781a54">before</a>. What I’m going to do is present you with a solution that <strong>does not</strong> require a complete Squid recompilation/reinstallation procedure.</p>
<p>However, I <em>believe</em> it requires a fairly modern setup to work. I was using Squid 2.6 STABLE6 on Fedora Core 6 with 2.6.18 kernel. Your mileage may vary.</p>
<h3>Stopping the Squid</h3>
<p>This is important:</p>
<pre class="code">/etc/init.d/squid stop</pre>
<h3>/etc/squid/squid.conf</h3>
<p>At the very end of this file there is a line which needs adding/changing so it reads:</p>
<pre class="code">max_filedesc 8192</pre>
<h3>/etc/init.d/squid</h3>
<p>Just after the comments (before any code) add this line:</p>
<pre class="code">ulimit -HSn 8192</pre>
<h3>/usr/include/bits/typesizes.h</h3>
<p>Edit the <code>__FD_SETSIZE</code> line so it reads:</p>
<pre class="code">#define __FD_SETSIZE            8192</pre>
<h3>Starting the squid</h3>
<pre class="code">/etc/init.d/squid start</pre>
<p>And now watch the <code>/var/log/squid/cache.log</code> for a similar line:</p>
<pre class="code">2007/01/01 18:32:27| With 8192 file descriptors available</pre>
<p>If it still says <code>1024 file descriptors available</code> (or similarly low value) you are out of luck (or you’ve just messed something up).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2007/06/20/squid-warning-your-cache-is-running-out-of-filedescriptors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Controlling Squid&#8217;s Memory Usage</title>
		<link>http://blog.nazmi.web.id/2007/06/20/controlling-squids-memory-usage/</link>
		<comments>http://blog.nazmi.web.id/2007/06/20/controlling-squids-memory-usage/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 06:56:16 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/20/06/2007/controlling-squids-memory-usage/</guid>
		<description><![CDATA[Squid tends to be a bit of a memory hog.  It uses memory for many   different things, some of which are easier to control than others.   Memory usage is important because if the Squid process size exceeds   your system&#8217;s RAM capacity, some chunks of the process must be [...]]]></description>
			<content:encoded><![CDATA[<p><span id="intelliTxt">Squid tends to be a bit of a memory hog.  It uses memory for many   different things, some of which are easier to control than others.   Memory usage is important because if the Squid process size exceeds   your system&#8217;s RAM capacity, some chunks of the process must be   temporarily swapped to disk.  Swapping can also happen if you   have other memory-hungry applications running on the same system.   Swapping causes Squid&#8217;s performance to degrade very quickly.</span></p>
<p>An easy way to monitor Squid&#8217;s memory usage is with standard   system tools such as <code>top</code> and <code>ps</code>.  You can also ask Squid   itself how much memory it is using, through either the cache   manager or SNMP interfaces.  If the process size becomes too large,   you&#8217;ll want to take steps to reduce it.  A good rule of thumb is   to not let Squid&#8217;s process size exceed 60% to 80% of your RAM capacity.<span id="more-91"></span></p>
<p>One of the most important uses for memory is the main cache index.   This is a hash table that contains a small amount of metadata for   each object in the cache.  Unfortunately, all of these &#8220;small&#8221; data   structures add up to a lot when Squid contains millions of objects.   The only way to control the size of the in-memory index is to   change Squid&#8217;s disk cache size (with the <code>cache_dir</code> directive).   Thus, if you have plenty of disk space, but are short on RAM, you   may have to leave the disk space underutilized.</p>
<p>Squid&#8217;s in-memory cache can also use significant amounts of RAM.   This is where Squid stores incoming and recently retrieved objects.   Its size is controlled by setting the <code>cache_mem</code> directive.  Note   that the <code>cache_mem</code> directive only affects the size of the memory   cache, not Squid&#8217;s entire memory footprint.</p>
<p>Squid also uses some memory for various I/O buffers.  For example,   each time a client makes an HTTP request to Squid, a number of   memory buffers are allocated and then later freed.  Squid uses   similar buffers when forwarding requests to origin servers, and   when reading and writing disk files.  Depending on the amount and   type of traffic coming to Squid, these I/O buffers may require a   lot of memory.  There&#8217;s not much you can do to control memory   usage for these purposes.  However, you can try changing the TCP   receive buffer size with the <code>tcp_recv_bufsize</code> directive.</p>
<p>If you have a large number of clients accessing Squid, you may   find that the &#8220;client DB&#8221; consumes more memory than you would   like.  It keeps a small number of counters for each client IP   address that sends requests to Squid.  You can reduce Squid&#8217;s   memory usage a little by disabling this feature.  Simply put   <code>client_db off</code> in <em>squid.conf</em>.</p>
<p>Another thing that can help is to simply restart Squid periodically,   say, once per week.  Over time, something may happen (such as a   network outage) that causes Squid to temporarily allocate a large   amount of memory.  Even though Squid may not be using that memory,   it may still be attached to the Squid process.  Restarting Squid   allows your operating system to truly free up the memory for other   uses.</p>
<p>You can use Squid&#8217;s <code>high_memory_warning</code> directive to warn you   when its memory size exceeds a certain limit.  For example, add   a line like this to <em>squid.conf</em>:</p>
<pre><code>high_memory_warning 400 MB</code></pre>
<p>Then, if the process grows beyond that value, Squid writes warnings   to <em>cache.log</em> and syslog if configured.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2007/06/20/controlling-squids-memory-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block spam relay with squid.conf</title>
		<link>http://blog.nazmi.web.id/2007/06/20/block-spam-relay-with-squid-conf/</link>
		<comments>http://blog.nazmi.web.id/2007/06/20/block-spam-relay-with-squid-conf/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 06:51:14 +0000</pubDate>
		<dc:creator>Irving</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips & Trik]]></category>

		<guid isPermaLink="false">http://blog.nazmi.web.id/20/06/2007/squid-how-to-not-be-a-spam-relay/</guid>
		<description><![CDATA[Unless you&#8217;ve been living under a rock, you&#8217;re aware of the spam   problem on the Internet.  Spam senders used to take advantage of   open email relays.  These days, a lot of spam comes from open   proxies.  An open proxy is one that allows outsiders to make [...]]]></description>
			<content:encoded><![CDATA[<p><span id="intelliTxt">Unless you&#8217;ve been living under a rock, you&#8217;re aware of the spam   problem on the Internet.  Spam senders used to take advantage of   open email relays.  These days, a lot of spam comes from open   proxies.  An open proxy is one that allows outsiders to make   requests through it.  If others on the Internet receive spam email   from your proxy, your IP address will be placed on one or more   of the various blackhole lists.  This will adversely affect your   ability to communicate with other Internet sites.</span></p>
<p>Use the following access control rules to make sure this never   happens to you.  First, always deny all requests that don&#8217;t come   from your local network.  Define an ACL element for your subnet:</p>
<pre><code>acl MyNetwork src 10.0.0.0/16</code></pre>
<p><span id="more-90"></span><br />
Then, place a deny rule near the top of your <code>http_access</code> rules   that matches requests from anywhere else:</p>
<pre><code>http_access deny !MyNetwork
http_access ...
http_access ...</code></pre>
<p>While that may stop outsiders, it may not be good enough.  It   won&#8217;t stop insiders who intentionally, or unintentionally, try   to forward spam through Squid.   To add even more security, you   should make sure that Squid never connects to another server&#8217;s   SMTP port:</p>
<pre><code>acl SMTP_port port 25
http_access deny SMTP_port</code></pre>
<p>In fact, there are many well-known TCP ports, in addition to SMTP,   to which Squid should never connect.  The default <em>squid.conf</em> includes some rules to address this.  There, you&#8217;ll see a   <code>Safe_ports</code> ACL element that defines good ports.  A <code>deny   !Safe_ports</code> rule ensures that Squid does not connect to any of   the bad ports, including SMTP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nazmi.web.id/2007/06/20/block-spam-relay-with-squid-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

