tag:blogger.com,1999:blog-91617518585442423742023-11-16T14:57:30.839+08:00Angkat Bahusebab kami tak tahu.Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.comBlogger29125tag:blogger.com,1999:blog-9161751858544242374.post-46142272398733855612011-03-12T15:10:00.007+08:002011-03-12T22:24:06.787+08:00MySQL LOAD_FILE() in Ubuntu, It Works!Recently, I want to create a php site that will display images retrieved from MySQL database. I always prefer to work with CLI mode other than using <a href="http://dev.mysql.com/doc/query-browser/en/">query browser</a> for create databases, tables, updating etc.</div><p>LOAD_FILE can be used to store images into database through MySQL command line (client). I'm using MySQL version 5.1.41 on my Ubuntu 10.04. Here are the simple steps:
<br />
<br /><b>Step 1: Initially we will create a database and tables</b>
<br /><pre><b>mysql> create database testdb;</b>
<br />Query OK, 1 row affected (0.00 sec)
<br /><b>mysql> use testdb;</b>
<br />Database changed
<br /><b>mysql> create table myimages
<br /> -> (
<br /> -> id integer unsigned not null auto_increment,
<br /> -> name varchar(20),
<br /> -> type varchar(10),
<br /> -> picture mediumblob not null,
<br /> -> primary key (id),
<br /> -> unique (name)
<br /> -> );</b>
<br />Query OK, 0 rows affected (0.09 sec)
<br /><b>mysql> desc myimages;</b></pre>
<br /><meta equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: Georgia, serif; font-size: 16px; -webkit-text-decorations-in-effect: underline; white-space: normal; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr_17YsH7FY6lz6bUIZ0kjUiYkfqjOeBXlRYVkVLUjmmdUI3LK3zENCFi0lxICBnjO2lAX-ZNOQD8oxbfatx-5jny4hoXM4eZu0E-1N-rxyIlB_44v5vQ4Uumix-VXZs_Nu-v88FWpBhE/s320/desc.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5583084525075069330" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 100px; " /></span>
<br /><b>Step 2: Upload an image </b>
<br />At first, I've tried to upload an image from a directory located at '/home/user1/Pictures/ubuntu_logo.jpg'.
<br /><pre><b>mysql> insert into myimages (name, type, picture) values ('xyz', 'jpeg', LOAD_FILE('/home/user1/Pictures/ubuntu_logo.jpg'));</b>
<br />ERROR 1048 (23000): Column 'picture' cannot be null</pre>
<br />This error occurred because the result of LOAD_FILE('/home/user1/Pictures/ubuntu_logo.jpg') has return the NULL value probably due to privileges and permission of the /home/user1 directory which is belongs to user1.
<br />The same problem also has been brought up in mysql <a href="http://forums.mysql.com/read.php?20,404122,404122">forum</a>.
<br />After checked on /etc/passwd, it shows that the mysql's home directory is located at /var/lib/mysql/, where permission is fully given for mysql user.
<br />Simply login as root user and copy the image to /var/lib/mysql or you may created your own directory such as /var/lib/mysql/all_images
<br /><pre><b>$ sudo su
<br />$ mkdir /var/lib/mysql/all_images
<br />$ cp /home/user1/Pictures/ubuntu_logo.jpg /var/lib/mysql/all_images</b></pre>
<br />Now, try to run the same insert command again with different directory.
<br /><pre><b>mysql> insert into myimages (name, type, picture) values ('bz', 'jpeg', LOAD_FILE('/var/lib/mysql/all_images/ubuntu_logo.jpg'));</b>
<br />Query OK, 1 row affected (0.00 sec)</pre>
<br />Yeah, it works!!Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com6tag:blogger.com,1999:blog-9161751858544242374.post-55246050958909740372010-12-31T18:57:00.009+08:002011-03-12T15:15:35.574+08:00Manisnya 2010 :)<div style="text-align: left;">Sedar atau pun tidak, tahun 2010 dah nak berakhir pun. Biasa aku takde kisah sangat, tapi bile pikir2 cam banyak lak kenangan 2010 ni..dan yang paling touching sekali, banyak kenagan2 tu di lalu bersama :)</div><div>
<br /></div><div><b>Computer Science Final Year Project (FYP), IIUM</b></div><div>awal2 tahun ktorang da wat FYP bersama, Alhamdulillah topic yang ktorang pilih tu agak simple dan ade research value, "Performance Evaluation of Clustered Memcached". </div><div>
<br /></div><div>Terima kasih kepada Dr. Mohiuddin yang banyak membantu dan guide kami tuk siap kan sampai hari presentation (dah la ktorang present 1st, gile gementar.. haha ) dan sebelum hantar untuk conference. Tak lupe jugak pada parents, kawan2 yang sesame wat FYP, sume da banyak bagi semangat and tolong mane yang patot.. terbaek lah.. hehe.. ^_^</div><div>
<br />
<br /></div><div><meta equiv="content-type" content="text/html; charset=utf-8"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA5wiuax-tpR3aoJ5HHYEjn5DDdkxEyA9kflNK-OjM8RunhJFQPRNQFwc5gFyphZdfdiZKhjFtjSvKeFPvktdPH7JIrqFUe6eRPzpFRm0AJZ8OX1iS6Gv_76-zkjg-wiuvxHOHECV59Q0/s1600/1_fyp.jpg"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA5wiuax-tpR3aoJ5HHYEjn5DDdkxEyA9kflNK-OjM8RunhJFQPRNQFwc5gFyphZdfdiZKhjFtjSvKeFPvktdPH7JIrqFUe6eRPzpFRm0AJZ8OX1iS6Gv_76-zkjg-wiuvxHOHECV59Q0/s320/1_fyp.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5556889142439132786" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a></div><div style="text-align: center;"><span class="Apple-style-span">Ni time final presentation..</span></div><div>
<br /></div><div><b>Internship at MIMOS Berhad</b></div><div>Bile FYP selesai pada pertengahan tahun (malas aku nak ingat bulan bape.. hoho), kami pun bergegas mencari tempat tuk 6 bulan internship atau nama mesra nye 'practical'.. actually, banyak gak tempat ktorang apply.. erm, banyak gak ktorang dapat.. tapi nak wat camne, dapat tempat intern pun same.. hehehe.. seronok kan (xtau la korang camne, aku for sure happy.. haha) kitorang pun dapat kt Mimos, Bukit Jalil under Wireless and Communication Solution Cluster, 6LoWPAN group. </div><div>
<br /></div><div>Kalau nak citer camne life kat sini, memang sampai bsok xhabis2.. hahaha.. Pendek kata, </div><div>- Supervisor and staff BEST!!!! Special thanks to Reza Khosdel, Zeldi, Gopi (examiner aku mase present FYP), Shariq, Abbdu, Moshi, Dr Mazlan, Kak Lina dan Mdm Normi.. dapat A tu, Alhamdulillah :)</div><div>- Geng Intern pun best, Abul, Kok Jin, Mint, Dayang, Chui and Fakrol</div><div>- dan last, ofkos la my partner.. sporting gilerrr woo.. hihi</div><div>- lupe lak, yang paling obvious aku naik 8 kilo kat sini, supervisor ktorang pun sebenarnya da macam mentor makanan.. Terbaek! Filosofi dia, "People who enjoy foods, will enjoy life" Ktorang salu makan kat Halfmoon, Pizza hut, MMU food court etc sume sodap2 belaka.. lapo pulak rasa.. :P </div><div>
<br /></div><div><meta equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAwBSOhEkAuFpAxHL764UIgL1h39IkQImWA3PTlcftfRs-hCGP2usgTO5grJIowEFWG9lbe2KKFX7FhWPwVoDYS0Cb0DTmR7gxpIcruPYMCHXG5jHuI4bJCWtZIBfsDUlv34Fh9bSYX2k/s320/intern4.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5556891872852929954" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 214px; " /></span></div><div style="text-align: center;"><span class="Apple-style-span">Supervisor ktorang, amacm?? hensem x? Reza Khosdel dan Zeldi Suryadi..</span></div><div>
<br /></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmXgdokRgABAhAf8AC6-JKc0BcQkFDKQmFWSB9ctZ_v3mDWxI_7CuwhGljZv6-E05pMwp_9Yh8t4amo-TIhwCuK4XBeldc0s0Qu-vYB0gN5duljc9sLBqXlfXkXBgn1aw14H-LLARpko/s1600/intern5.jpg"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmXgdokRgABAhAf8AC6-JKc0BcQkFDKQmFWSB9ctZ_v3mDWxI_7CuwhGljZv6-E05pMwp_9Yh8t4amo-TIhwCuK4XBeldc0s0Qu-vYB0gN5duljc9sLBqXlfXkXBgn1aw14H-LLARpko/s320/intern5.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5556891871016337250" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 240px; " /></a><div style="text-align: center;"><span class="Apple-style-span">Geng intern (dayang, mint, ina, aku yg xbape nak nerd nidan kok jin) </span></div><div style="text-align: center;"><span class="Apple-style-span">minus abul, chui dan fakrol :)</span></div></div><div>
<br /></div><div><b>ICT4M 2010 Conference, Jakarta</b></div><div>
<br /></div><div>9 Dec 2010, 9.00 pm, Tiba di jakarta</div><div>Hoho.. nak ikot kan ni yang paling best bile kami dapat2 jalan Bandung dan Jakarta, shoping sakan kot. Tapi paling lame kat bandung la, 3 hari. Ada 1 hari tu, dekat 6 jam ktorang pusing 1 pasar baru tu.. dasyat2..hahaha</div><div>
<br /></div><div>Pengalaman yang tak dapat dilupakan bile time conference, sume authors tu lecturer, master dan Phd.. tekezut aku.. tapi best sebab makanan bes.. hehe :D</div><div>Aku pun da malas tulis panjang2.. aku post je la.. hahaha.. </div><div>
<br /></div><div><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzxtkBl7BKWFmvcffwdhvYuQLhLAhvaz_6en6__ho-RjOASWh9lU1UP-6JLfcsMN-Frli2-_jE_Wa9O8ip5zLBq8OHM9wU8v-tLb1XqDUnNNvIq0cJryYwrL8DbrwjT-PzKY0KKC9zv0/s1600/SAM_1485.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzxtkBl7BKWFmvcffwdhvYuQLhLAhvaz_6en6__ho-RjOASWh9lU1UP-6JLfcsMN-Frli2-_jE_Wa9O8ip5zLBq8OHM9wU8v-tLb1XqDUnNNvIq0cJryYwrL8DbrwjT-PzKY0KKC9zv0/s320/SAM_1485.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5556897579501201202" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 180px; " /></a></div></div><div style="text-align: center;"><span class="Apple-style-span">Jalan2 di Bandung..</span></div><div style="text-align: center;">
<br /></div><div style="text-align: center;"><meta equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCuqLzaIViUlbe9C29s6qv2coofa3oGeYN6HcGw8P8U85JoV6rzTXCFSfPfm3KTkCOgV7PLH-krrAI1iQ_IB0YoriX3Rmgm_JQPFmSmPqJSiy_eDsvJJ-Dnur3AQvDGhpDa4tnfW5EbCw/s320/ict4m_1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5556897584741443730" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 180px; " /></span></div><div style="text-align: center;"><span class="Apple-style-span">UIN, Jakarta: hepi nampak cik kak..haha</span></div><div style="text-align: center;">
<br /></div><div style="text-align: center;"><meta equiv="content-type" content="text/html; charset=utf-8"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihUlBqB98EvVDCd8m-BIhnsh8Phpb4XxjpzgzSD88aBhaPdFHotr0_TIs5LKxA6uY9CoZTbVEMmpUTIyW6ZFE2iKmRCH71lmPIc02jhHH2G2x62_Z55wLhpTlh9dcGIkGYO7TW4fJsVWQ/s1600/SAM_1664.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihUlBqB98EvVDCd8m-BIhnsh8Phpb4XxjpzgzSD88aBhaPdFHotr0_TIs5LKxA6uY9CoZTbVEMmpUTIyW6ZFE2iKmRCH71lmPIc02jhHH2G2x62_Z55wLhpTlh9dcGIkGYO7TW4fJsVWQ/s320/SAM_1664.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5556898876692266882" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 180px; " /></a><span class="Apple-style-span">Selepas presentation.. lega rase nye.. hehe</span></div><div style="text-align: center;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg35Kfdk-B7QjzlG9AhFmDsBXuws-5T7LXVooj4w-xTBEFV2PmAEszJdrrktdUHmG2tfBV0EWdMesVaVQbALe5-kF5x9tiovThUy8qDKUrYeHFCscTl71Nf_X109ibe45xQ_s1wneyaF18/s1600/SAM_1668.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg35Kfdk-B7QjzlG9AhFmDsBXuws-5T7LXVooj4w-xTBEFV2PmAEszJdrrktdUHmG2tfBV0EWdMesVaVQbALe5-kF5x9tiovThUy8qDKUrYeHFCscTl71Nf_X109ibe45xQ_s1wneyaF18/s320/SAM_1668.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5556898870327029362" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 180px; " /></a></div><div style="text-align: center;"><span class="Apple-style-span">Slide tuk present..</span></div><div>
<br /></div><div><span class="Apple-style-span">Summary: yang penting.. kerja sama :)</span></div><div>
<br /></div>
<br />Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com6tag:blogger.com,1999:blog-9161751858544242374.post-53537391257776306692010-12-07T12:13:00.000+08:002010-12-07T12:14:41.541+08:00Salam Maal HijrahBismillah..Azam tahun baru ..Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-77631850058941396672010-10-30T11:48:00.005+08:002010-10-30T12:17:13.745+08:00\WINDOWS\SYSTEM32\CONFIG\SYSTEM corrupted<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR7T4KGpAunvlq36_MGEHzN1-PoibhM3LmwJVfXz-MIfzCTr9pcxyvR2w62rjNQTUusV6iH5X0PnfgTJxasW_9WiH1KYeu6Cr7tQzCZDm5hXoyS0DwuAMGN-Bvfihubtb8zTlsWq-wrN4/s1600/boot_reg_corrupt.gif"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 96px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR7T4KGpAunvlq36_MGEHzN1-PoibhM3LmwJVfXz-MIfzCTr9pcxyvR2w62rjNQTUusV6iH5X0PnfgTJxasW_9WiH1KYeu6Cr7tQzCZDm5hXoyS0DwuAMGN-Bvfihubtb8zTlsWq-wrN4/s400/boot_reg_corrupt.gif" border="0" alt="" id="BLOGGER_PHOTO_ID_5533687883696105602" /></a><div style="text-align: left;">
<br /></div>This is common problem in Windows XP that disallow user to boot onto XP. Probably there are files corrupted due to improper shutting down or power failure.<div>
<br /></div><div>What i did to solve is, put on Windows XP CD and boot into CD mode. Then, wait until it will prompt with few options, like for installing fresh windows and repair. Choose option to repair by <b>press 'r'</b>.</div><div>
<br /></div><div>Next step, you will see command line interface (CLI). It will show an option for partition (i.e C: or D: ). Just choose the number where you have installed the windows. In my case I press 1 for partition C. Then, it will ask for administrator password. If you did not set any password for admin, just leave it blank and press ENTER.</div><div>
<br /></div><div>You will see like this.</div><div><span class="Apple-style-span"><span class="Apple-style-span" >C:\WINDOWS></span></span></div><div>
<br /></div><div>Here, I run check disk instead of copying corrupted files.</div><div><span class="Apple-style-span"><span class="Apple-style-span" >C:\WINDOWS>chkdsk c: /P /R</span></span></div><div>
<br /></div><div>Note that c: is the partition drive of the installed windows. See the manuals from run:</div><div><span class="Apple-style-span"><span class="Apple-style-span" >'chkdsk /?</span></span><span class="Apple-style-span" >'</span></div><div>
<br /></div><div><meta equiv="content-type" content="text/html; charset=utf-8"><div>Then wait for about 30 minutes (according to size) until 100% completed. After finish type <span class="Apple-style-span">'exit'</span> to reboot</div></div><div>
<br /></div><div>Thats all, hope it will solve yours =)</div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com3tag:blogger.com,1999:blog-9161751858544242374.post-45091110507986820872010-10-20T17:08:00.004+08:002010-10-22T11:13:39.996+08:00Time is Moving ..<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXKNGC_nrUNBI5byV9glYLrfTppQsXxRCnT1i-ii9wEi-k91TJN8Ij1NAXJe-LAU_dUHuNsdFOKIaV6dkBlB8WjGWL5totnEl9NJ12TWGn2L6IyXsnVO2LyWpSocW00PinXgXFZRqEReI/s1600/animated_clock12.gif"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 252px; height: 228px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXKNGC_nrUNBI5byV9glYLrfTppQsXxRCnT1i-ii9wEi-k91TJN8Ij1NAXJe-LAU_dUHuNsdFOKIaV6dkBlB8WjGWL5totnEl9NJ12TWGn2L6IyXsnVO2LyWpSocW00PinXgXFZRqEReI/s320/animated_clock12.gif" border="0" alt="" id="BLOGGER_PHOTO_ID_5530703279131085106" /></a>Now i realize that i'm about to finish my 6-month internship and start a job at new company..hope everything will be always fine..amin :)Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com5tag:blogger.com,1999:blog-9161751858544242374.post-63615410379584111322010-09-29T17:12:00.003+08:002010-09-29T17:12:54.660+08:00Please explain this<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJY5DcyeS02NsBmecrna7KyhCSl76XlHQyHjj_dFulrRmHeLAoCwLCgmcJvtEYF1qX3XL3-J5a_sIzuwus8TL3EkRPVMAyn_gJ9lfPvDpr2vM4FUXxdtDUTlYsdTgh3XthIesmC3OIoP-v/s1600/Untitled.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJY5DcyeS02NsBmecrna7KyhCSl76XlHQyHjj_dFulrRmHeLAoCwLCgmcJvtEYF1qX3XL3-J5a_sIzuwus8TL3EkRPVMAyn_gJ9lfPvDpr2vM4FUXxdtDUTlYsdTgh3XthIesmC3OIoP-v/s400/Untitled.jpg" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;">Trojan @ Ubuntu</div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-81831417441757277802010-09-20T16:46:00.004+08:002010-09-20T17:12:39.575+08:00Windows Media Center VIRUS: what to do?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV5SRdHDNUeTkzr7nLmLLHH0FrHr89DlaHcL7wnneV0WbumHO-KHoithz13SBMawcIPjguKFyeC-xrDhNSoj8ueK207IIHV7d7L7kRhEHzom67TylADd6TGP6Iy653fC4AuXTZas7kDiQ/s1600/sw.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 190px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV5SRdHDNUeTkzr7nLmLLHH0FrHr89DlaHcL7wnneV0WbumHO-KHoithz13SBMawcIPjguKFyeC-xrDhNSoj8ueK207IIHV7d7L7kRhEHzom67TylADd6TGP6Iy653fC4AuXTZas7kDiQ/s320/sw.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5518921060331968130" /></a><div>Last weekend my friend come to my house and bring his new laptop with new problem. All programs cannot be opened because registry is corrupted. I try to open any program, includes mozilla, yahoo messenger,cmd and regedit, but this crappy windows 7 always redirect to open <a href="http://en.wikipedia.org/wiki/Windows_Media_Center">Windows Media Center</a>. All programs' icon turn to windows media center. I try to ask google and it is actually a virus. What we need is repair the registry that fooling windows user.</div><div><br /></div><div><b>The solution is:</b></div><div><br /></div><div>download this registry file <a href="http://www.mediafire.com/?enye5dj0wjm">HERE</a>, and double click on it. </div><div><br /></div><div>or copy paste these two lines into a file and save it file.reg. Then, double click it.</div><div> </div><div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span" >Windows Registry Editor Version 5.00</span></div><div><span class="Apple-style-span" >[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice]</span></div></div><div><br /></div><div><br /></div><div>Then reboot to restore your icon as normal.</div><div>Hopefully this will help u :)</div><div><br /></div><div>Reference:</div><div><a href="http://en.kioskea.net/forum/affich-363335-windows-media-center-virus">http://en.kioskea.net/forum/affich-363335-windows-media-center-virus</a></div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com1tag:blogger.com,1999:blog-9161751858544242374.post-52094597626591159482010-09-07T14:42:00.002+08:002010-09-07T14:46:23.218+08:00Jom Download Lagu Raye :)Kepada kawan2 ku semua, Selamat Hari Raye Aidilfitri Maaf Zahir Batin.<div>ucapan sudah ku kata kn, maaf pn sudah ko pohon kn.</div><div><br /></div><div>sekarang mari kita bergumbira dgr lagu raye..hehe.</div><div><br /></div><div>download la <a href="http://www.azuanrazi.com/download-mp3-lagu-hari-raya-aidilfitri/">di sini</a> (Thanks to authors, artists and producers)</div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com1tag:blogger.com,1999:blog-9161751858544242374.post-78005715773304940822010-08-30T11:37:00.001+08:002010-08-30T11:38:23.397+08:00Cool GMAILGmail alias Google mail boleh undo send.<br />
<br />
Mulai hari ini jangan risau salah send lagi :)<br />
<br />
<a href="http://mashable.com/2010/08/22/how-to-undo-send-in-gmail/">>> Undo "Send" in Gmail</a>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com2tag:blogger.com,1999:blog-9161751858544242374.post-58386181177641800192010-08-26T16:02:00.001+08:002010-08-26T16:45:43.539+08:00Why Google?<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div>Hai semua.<br />
<br />
Saya mencari-cari Google fact sheet dan saya jumpa ini:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.saadkamal.com/wp-content/uploads/2010/04/google-fact-sheet1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.saadkamal.com/wp-content/uploads/2010/04/google-fact-sheet1.png" /></a></div>**kredit pada Pingdom untuk gambar di atas<br />
<br />
<br />
Google memang hebat. Sudah jadi bisnes yang sangat menguntungkan. Tapi apa yang saya nak kongsi ini sangat tak ada kaitan dengan gambar di atas. Sejak belajar dalam kelas Pengurusan Sistem Rangkaian dengan guru yg saya sangat hormati, saya menjadikan Google sebagai 'best friend' nombor 1 saya. Hari ini saya rasa kawan baik saya yang ini boleh jadi lucu. Dan saya rasa sangat lucu, sampai saya menulis entry ini dalam bahasa Melayu. :e<br />
<br />
Gambar di bawah berbicara dengan sendiri (self-explanatory)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkmTqPAZV7VxC1jNHJxQYrwTWMDYXhSGpr__HFK5pPGIEmd7lXfBDUEHOPDwFbSPShWLZvXfyQ0HpgIBM-Hz6NBtqMi5t65KzF4obdO5BST_qb6dXr3yacO_COCzLB4DL27d8OsU6Qks9c/s1600/why+google.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkmTqPAZV7VxC1jNHJxQYrwTWMDYXhSGpr__HFK5pPGIEmd7lXfBDUEHOPDwFbSPShWLZvXfyQ0HpgIBM-Hz6NBtqMi5t65KzF4obdO5BST_qb6dXr3yacO_COCzLB4DL27d8OsU6Qks9c/s320/why+google.jpg" width="320" /></a></div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com4tag:blogger.com,1999:blog-9161751858544242374.post-76771559533155015362010-08-21T15:39:00.009+08:002010-08-21T16:53:23.523+08:00Intel Dual Core Processor: Core 2 Duo vs Core i3 (new generation)<div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9n-vML_iE8Fn7v3Kd6mX3ELKvSHLkX_G_Ute84HuA5v_uI-3udUXylfW3ekMS5HFxH8jJIgHD2iFjoveSc2_4LkYStt7yQJpJP2hdfiY4G_btrVArYi361A8NWVv1AZOlfe7yj57kVpU/s1600/logo_intel.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 90px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9n-vML_iE8Fn7v3Kd6mX3ELKvSHLkX_G_Ute84HuA5v_uI-3udUXylfW3ekMS5HFxH8jJIgHD2iFjoveSc2_4LkYStt7yQJpJP2hdfiY4G_btrVArYi361A8NWVv1AZOlfe7yj57kVpU/s320/logo_intel.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5507774998279589490" /></a></div><div>My head has been playing with the difference between core 2 duo (older) and core i3. Then, I start exploring Intel website and find what i3, i5 i7 are all about.</div><div>In this post, I simply compare this two processors. I referred to the site on <a href="http://www.intel.com/products/processor/core2duo/specifications.htm?iid=prod_core2duo+tab_"><span class="Apple-style-span" >core 2 duo</span></a> and <a href="http://www.intel.com/consumer/products/processors/corei3-specs.htm"><span class="Apple-style-span">core i3</span></a> specification. Both are similar in term of processor number (2 cores). </div><div><br /><div><i>The main differences are the number of threads and cache type. </i></div><div>Older dual core processor doesn't enable thread for each core as compared to current generation such as i3, i5 and i7. Core i3 has the capability to run dual thread on each core, thus total threads number can run in core i3 is 4 threads. Same as goes to other processor in this family, i7 has up to 8 threads can be ran on (each 2 or 4 core). </div><div><br /></div><div>Core i3 used new smart cache (L3 cache) instead of L2 cache, as defined by Intel:</div><div>"Smart Cache is Intel’s performance-maximized data storage, which allows each processor core to dynamically utilize up to 100% of available cache and obtain data from the cache at higher throughput rates"</div><div><br /></div><div>For gamers, here is a benchmark i found.</div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib1UyY5jCTVfxZBnFXsBqtulNO99Lh-BY8NTzsivzt9TZE6HubctizkZ4T-iGCVnnhNby_mHVfssKAPdJvLOwAgGYNkj3gGLujvHMUQe33YrCzesSs-k3lrjYCOk9QOQMRXeDOEXkV0JE/s320/core_i3_vs_core_2_duo.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5507782792361315234" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 196px; " /></span></div><div>References:</div><div><a href="http://www.intel.com/consumer/products/processors/"><span class="Apple-style-span">http://www.intel.com/consumer/products/processors/</span></a></div><div><a href="http://www.basitali.com/2010/05/difference-between-core-2-duo-and-core-i3.html"><span class="Apple-style-span">http://www.basitali.com/2010/05/difference-between-core-2-duo-and-core-i3.html</span></a></div></div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-87773585531541286522010-08-19T12:49:00.011+08:002010-08-19T15:22:38.137+08:00Fedora: Install & configure Net-SNMP running on IPv6I've install net-snmp on my fedora machine for 'secret' purpose :P <div>Here are some basic tutorial but it works for me and perhaps all fedora user. I've experienced some errors if directly install the net-snmp. Thus, I try to install perl first (latest version) before installing and afterwards I didn't face any error to install.<div><br /></div><div><b>Step 1: Installing Perl from source</b></div><div>Download tar ball (.tar.gz) of the latest version with type (maint) <a href="http://www.cpan.org/src/">here</a></div><div><br /></div><div>login as root, go to directory where the tar ball is located, extract and go inside directory</div><div><span class="Apple-style-span">$ su</span></div><div><span class="Apple-style-span"># tar xzvf perl-version</span><version><span class="Apple-style-span">.tar.gz</span></version></div><div><span class="Apple-style-span"># cd perl-version<version></version></span></div><div><br /></div><div>now, we configure (with default setting) to confirm with your platform</div><div><span class="Apple-style-span"># ./Configure -de</span></div><div><br /></div><div>compile and install</div><div><span class="Apple-style-span"># make && make install</span></div><div><br /></div><div>Note that it won't be installed if there is an error</div><div><br /></div><div>if it is successfully installed, try . .</div><div><span class="Apple-style-span">$ perl -v</span></div><div><br /></div><div>output will be the version of newly installed perl. In my case:</div><div><div><span class="Apple-style-span">This is perl 5, version 12, subversion 1 (v5.12.1) built for i686-linux</span></div></div><div><br /></div><div><b>Step 2: Installing net-snmp from source</b></div><div>Go to <a href="http://www.net-snmp.org/download.html">net-snmp page</a> and download source file (.tar.gz) under 'current release'. Same thing, extract the tar file</div><div><span class="Apple-style-span"># tar xzvf net-snmp-version<version>.tar.gz</version></span></div><div><span class="Apple-style-span"># cd net-snmp-version<version></version></span></div><div><br /></div><div>Then, configure using several option (press enter for each prompt)</div><div><span class="Apple-style-span"># ./configure --enable-ipv6 --with-transports="UDP UDPIPv6" --with-libs=-lpthread --with-perl-modules</span></div><div><br /></div><div>finally compile and install</div><div><span class="Apple-style-span"># make && make test && make install</span></div><div><br /></div><div>remember, if any error occurs installation won't finish</div><div><br /></div><div><b>Step 3: snmpd configuration file</b></div><div>Go to snmp directory</div><div><span class="Apple-style-span"># cd /usr/local/share/snmp</span></div><div><br /></div><div>Then, we can create snmpd.conf file using this command</div><div><span class="Apple-style-span"># snmpconf</span></div><div><span class="Apple-style-span"><br /></span></div><div><div><span class="Apple-style-span">Would you like me to read them in? Their content will be merged with the</span></div><div><span class="Apple-style-span">output files created by this session.</span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span">Valid answer examples: "all", "none","3","1,2,5"</span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span">Read in which (default = all): </span><b><span class="Apple-style-span">none</span></b></div></div><div><b><br /></b></div><div>next . .</div><div><br /></div><div><div><span class="Apple-style-span">I can create the following types of configuration files for you.</span></div><div><span class="Apple-style-span">Select the file type you wish to create:</span></div><div><span class="Apple-style-span">(you can create more than one as you run this program)</span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span"> 1: snmpd.conf</span></div><div><span class="Apple-style-span"> 2: snmptrapd.conf</span></div><div><span class="Apple-style-span"> 3: snmp.conf</span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span">Other options: quit</span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span">Select File: </span><b><span class="Apple-style-span">1</span></b></div></div><div><b><br /></b></div><div>Lastly, type 'finished' and 'quit'. You will get output like this</div><div><div>The following files were created:</div><div><br /></div><div> snmpd.conf</div></div><div><br /></div><div>Now, edit this file and replace with all content posted <a href="http://angkatbahu.blogspot.com/2010/02/snmp-cacti-configuration-part-2.html">here</a></div><div><span class="Apple-style-span"># gedit snmpd.conf</span></div><div><br /></div><div>and add this line after this line '# sec.name source community'</div><div><span class="Apple-style-span">[...]</span></div><div><span class="Apple-style-span"><br /></span></div><div><div><span class="Apple-style-span">com2sec6 local ::1 public</span></div></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span">[...]</span></div><div><br /></div><div>save the file and close.</div><div><br /></div><div>Now, Run snmpd first just on udp with IPv6 on port 161 (as root)</div><div><span class="Apple-style-span"># snmpd udp6:161</span></div><div><br /></div><div>Then, try snmpwalk (You should have IPv6 configured)</div><div><div><span class="Apple-style-span"># snmpwalk -v 1 -c public 'ipv6:[::1]' IP-MIB::ipAdEntIfIndex</span></div><div><br /></div><div>Output will be somehow like this</div><div><span class="Apple-style-span">IP-MIB::ipAdEntIfIndex.10.1.27.140 = INTEGER: 3</span></div><div><span class="Apple-style-span">IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1</span></div></div><div><br /></div><div>If you got this, so i think it works ;)</div></div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com3tag:blogger.com,1999:blog-9161751858544242374.post-19432863627484724162010-08-18T10:06:00.000+08:002010-08-18T10:07:17.806+08:00Where is my installed Wireshark?<blockquote>So this is what happen this morning where <i>we</i> installed wireshark on my Fedora 12 PC. It is successfully installed but executable file doesn't appear anywhere. </blockquote><br />
To install<span style="font-family: "Courier New",Courier,monospace;"></span>:<br />
<span style="font-family: "Courier New",Courier,monospace;">yum install wireshark</span><br />
<div style="font-family: inherit;"><br />
</div><div style="font-family: inherit;">What you have to do is just further install: </div><div style="font-family: "Courier New",Courier,monospace;">yum install wireshark-gnome</div><div style="font-family: inherit;"><br />
</div><div style="font-family: inherit;">Bye2 :D</div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-10633087165236850232010-08-17T12:46:00.000+08:002010-08-17T12:59:35.949+08:00Net-SNMP TutorialJust followed good tutorial to configure Net-SNMP <a href="http://ashokachakra.blogspot.com/2010/03/using-net-snmp-1.html">>> click here</a><br />
<br />
Anyway, I experienced error while 'make' where I got this error<span style="font-family: "Courier New",Courier,monospace;"> </span>>><span style="font-family: "Courier New",Courier,monospace;">/usr/bin/ld: cannot find -lperl</span><br />
<br />
<span style="font-family: inherit;">I find the solution <a href="http://www.mail-archive.com/freeradius-users@lists.cistron.nl/msg13462.html">here</a></span><br />
<br />
First, <span style="font-family: "Courier New",Courier,monospace;">locate libperl</span>.<br />
<br />
Output:<br />
<div style="font-family: "Courier New",Courier,monospace;">/usr/lib/libperl.so.5.10<br />
/usr/lib/libperl.so.5.10.0</div><div style="font-family: "Courier New",Courier,monospace;">...</div><br />
(or similar)<br />
<br />
Create soft link;<br />
<div style="font-family: "Courier New",Courier,monospace;">sudo ln -s /usr/lib/libperl.so.5.10 /usr/lib/libperl.so</div><div style="font-family: "Courier New",Courier,monospace;"></div><div style="font-family: "Courier New",Courier,monospace;"><div style="font-family: Arial,Helvetica,sans-serif;"><br />
<div style="font-family: inherit;">Make sure the link is in the /usr/lib **same directory with the link point. </div><div style="font-family: inherit;">That's all. Thank you.</div></div></div><div style="font-family: inherit;"><br />
**Credit to http://ashokachakra.blogspot.com/ </div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-49430621621928333132010-08-05T11:12:00.000+08:002010-08-05T11:12:05.870+08:00Playing your favorite radio station using Octoshape -- Linux (Little addition)Okeh, I forgot to mention-- Uninstalling Octoshape.<br />
<br />
<br />
In case your Octoshape doesnt work, or have any problem, or just you hate it, u want to remove it from your machine. Easy easy...<br />
<br />
<br />
Just uninstall it from your machine. How to uninstall? Easy easy... -- Delete octoshape folder.<br />
<br />
That is all.<br />
<br />
If you want it back, re-install and enjoy. That's all. Have a nice day.Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-4301814572043247202010-08-03T10:20:00.000+08:002010-08-03T10:39:21.036+08:00Playing your favorite radio station using Octoshape -- Linux<div style="font-family: Arial,Helvetica,sans-serif;">1) Download <a href="http://www.octoshape.com/?page=get_octo/get_octo">Octoshape Linux plugin (octosetup-linux_i386.bin)</a></div><div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div><div style="font-family: Arial,Helvetica,sans-serif;">2) Open terminal, go to the path you download the plugin . Then, </div><div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">3)</span> $ chmod +x octosetup-linux_i386.bin</div><br />
<span style="font-family: Arial,Helvetica,sans-serif;">4) </span><span style="font-family: "Courier New",Courier,monospace;">$ ./o</span><span style="font-family: "Courier New",Courier,monospace;">ctosetup-linux_i386.bin</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">5) Go through the license agreement by clicking enter or space and reply yes when being prompted. </span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">Do you agree to these license terms? [yes|no] </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">yes<br />
Archive: octoshape.installer.6085<br />
inflating: octoshape/eula.rtf <br />
inflating: octoshape/eula.txt <br />
inflating: octoshape/OctoshapeClient <br />
inflating: octoshape/setup.xml <br />
extracting: octoshape/sua-1002170-0-confirmed.txt <br />
extracting: octoshape/sua-1002170-0-dynfiles.zip <br />
extracting: octoshape/sua-1002170-0-marker.txt <br />
inflating: octoshape/sua-1002170-0-module.xml <br />
inflating: octoshape/sua-1002170-0-OctoshapeClientSUA <br />
extracting: octoshape/sua-1002170-0-OctoshapeClientSUA.sig <br />
inflating: octoshape/sua-1002170-0-suapack-versions.txt <br />
Go to octoshape and execute ./OctoshapeClient -url:octoshape:BROADCASTER.channel</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;"> </span> </span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">Done installing.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">6) You can play the radio at this point. But Octoshape default player is using MPlayer. You can either get MPlayer installed or, change default radio player by editing setup.xml (in octoshape folder)</span><br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">$ gedit setup.xml</div><span style="font-family: Arial,Helvetica,sans-serif;">I am using rhythmbox, so I add this option.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">Add -- </span><span style="font-family: "Courier New",Courier,monospace;">PlayerExec="rhythmbox $url"</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZ_fwvAZu5Rk0JKZvDolmQAan1H1dGMClNYjf7PPtu6oBf3rbJ-F0gAmiPVDAKMUJtNREb7hYDPXLZtkVD2dwIZHRz3C-GRaH71AV7dqIFx0w-IgBNK1epC9a2_vjN8aZnzVK3CrWqkTh/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="15" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZ_fwvAZu5Rk0JKZvDolmQAan1H1dGMClNYjf7PPtu6oBf3rbJ-F0gAmiPVDAKMUJtNREb7hYDPXLZtkVD2dwIZHRz3C-GRaH71AV7dqIFx0w-IgBNK1epC9a2_vjN8aZnzVK3CrWqkTh/s400/Screenshot.png" width="400" /></a></div><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">Save.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">7) FINALLY, </span><br />
<div style="font-family: "Courier New",Courier,monospace;"><br />
</div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">For FLY FM listener:</span></div><span style="font-family: "Courier New",Courier,monospace;">$ ./OctoshapeClient -url:mpb.flyfm.mp3.high</span><br />
<br />
<div style="font-family: Arial,Helvetica,sans-serif;">For HOT FM listener:</div><span style="font-family: "Courier New",Courier,monospace;">$ ./OctoshapeClient -url:mpb.hotfm.mp3.high</span><br />
<br />
<div style="font-family: Arial,Helvetica,sans-serif;"><br />
</div><span style="font-family: Arial,Helvetica,sans-serif;">The player you chose will automatically started and playing your favorite radio station. ENJOY, cheers.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"></span>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-19503393703747634852010-07-10T09:06:00.000+08:002010-07-11T20:06:40.248+08:00Streamyx: Sharing Internet on Fedora 12<div style="text-align: left;">I'm using <a href="http://www.streamyx.com/"><span class="Apple-style-span" style="color:#3366FF;">streamyx</span></a> for Internet connection at home. I've a laptop with an Ethernet card and a wireless card. Then, I started to google on how to share internet connection with other laptops using wireless connection since my LAN card is occupied with streamyx cable.</div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2Gh3HEcYihd-akAajI4BzYX7R3YJ4B-poYlgA4k1ZJiW9nTouQO6aq71UQokr33kKPd-2cUwbgNOkNETkhFpBMpkxkCIXR3U8-100qyGGHrEXubp9p5bjOfCjZYnuLEbHaJDaVvFSXE/s320/streamyx.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492095371785003714" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 134px; " /></span></div><div>For setting up my machine as a gateway, it quite similar to previous post <a href="http://angkatbahu.blogspot.com/2010/01/setting-up-gateway-in-ubuntu.html"><span class="Apple-style-span" style="color:#3366FF;">here</span></a>, but it can simply be done by configuring firewall. Then, we can create an <a href="http://compnetworking.about.com/cs/wirelessfaqs/f/adhocwireless.htm"><span class="Apple-style-span" style="color:#3366FF;">Ad-Hoc</span></a><span class="Apple-style-span" style="color:#33CCFF;"> </span>connection so that other machines (client) can simply connect to my laptop without the need of access point. In addition, in order to automatically configure IP address, gateway and DNS server address on client machine, we can set up<span class="Apple-style-span" style="color:#3366FF;"> </span><a href="http://compnetworking.about.com/cs/protocolsdhcp/g/bldef_dhcp.htm"><span class="Apple-style-span" style="color:#3366FF;">DHCP</span></a> server in the laptop (gateway machine). Following are the steps for make it works :</div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Note that all configuration is done on gateway machine.</span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Step 1: Connect to streamyx</b></span></div><div><span class="Apple-style-span" style="font-size:small;">Right-click on network manager applet, then choose <span class="Apple-style-span" style="font-family:georgia;"><i>'Edit Connections..'</i></span> </span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3kCaZlReA_s1oCpT65PXH11HeOAK8gcVsVOmR7nGin47miNO-grmrusdbFnc-e1aF5kEUvdg22EmBld0mzmafKzZuvaLp1h1wvHR93sbWWEaAlfpa4YpeVbq-dKdGKd2z5cVjTCsMTr8/s320/0.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492080330920522178" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 314px; height: 222px; " /></span></span></div><div>Select DSL tab and click <i>'Add'</i> to add new connection. Then rename connection name to <i>'streamyx'</i> or anything you want. Enter your username, password and service as shown in picture below. Tick connect automatically if want to allow connection on startup. Click <i>'Apply</i>' to finish</div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg120mwlOQwQQHBgdcPeg2CgF3tqOPr1owlCLk7mgdTA-x7srxH70g6MtO3chHwXeYXrpI9PZ80BmpoTlMMWAIePaIOywUA_-mjflrIxF9aSzNeXSIxcoTgA3cxTafHRGtt_BM1j7pos6g/s320/2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492081182237324850" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 242px; height: 320px; " /></span></span></div><div>Click on applet again, and now streamyx connection should be appear under<i> 'Wired Networks'</i>. Select to connect.</div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfAn1gnVrvBmopSey17rADpzG5ujZWKsjdE0kHYZBptb5Y0FA0Yyy2GquCb7Gx78-EsQIxbnMcmSvm7_FBh1TVPJEBzoZkCsSb7-oi1KeP3ZWi9_rvvfClgL4yIo6q3dP3PrHGJeFVhto/s320/4.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492081747962270210" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 300px; height: 222px; " /></span></span></div><div><b>Step 2: Configure Firewall </b>(from this step, all need to be done as root)</div><div><span class="Apple-style-span" style="font-size:small;">Open terminal and type </span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ su</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># system-config-firewall</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Select <i>'Masquerading'</i> and tick as bellow (thanks to<span class="Apple-style-span" style="color:#3366FF;"> </span><a href="http://blog.kagesenshi.org/"><i><span class="Apple-style-span" style="color:#3366FF;">KageSenshi</span></i></a>)</span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnDZ92go1Ym-x5xXLT7UthN8XQF902ir7WomCfinWKYl5N8MuVrPC-i3bocM3aYWzU49ELm5Hl3tasPEnDqiqpj-0MbY47IeVG6aE5SZsgs8zAcUS8NSqsFo8OJWQSq8eelDPhKNd1sE8/s320/5.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492082080248410898" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 223px; " /></span></div><div><b>Step 3: Setup DHCP server</b></div><div><span class="Apple-style-span" style="font-size:small;">First, install dhcpd (in fedora 12, dhcp package is using version 4)</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># 'yum install dhcp</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Check your DNS server to be used in dhcp configuration file</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ less /etc/resolv.conf</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Output should be appear like this</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># Generated by NetworkManager</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">nameserver 204.177.0.3</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">nameserver 204.177.1.12</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, edit dhcpd configuration file (use familiar text editor such as gedit, vi or nano)</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ su -c 'gedit /etc/dhcp/dhcpd.conf'</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, make it similar as bellow and match the address of DNS at <span class="Apple-style-span" style="font-family:'courier new';">'option domain-name-servers'</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># beginning of file</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">default-lease-time 86400;</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">max-lease-time 604800;</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">authoritative;</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">ddns-update-style interim;</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">option domain-name-servers 204.177.0.3</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">,204.177.1.12</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">;</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">subnet 192.168.1.0 netmask 255.255.255.0 {</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"> range 192.168.1.1 192.168.1.5; # only 5 person can connect</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"> option broadcast-address 192.168.1.6; </span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"> option routers 192.168.1.1; # gateway address</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">}</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># end of file</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Step 4: Create an Ad-Hoc connection</b></span></div><div><span class="Apple-style-span" style="font-size:small;">Enable wireless connection, then select <i>'Create New wireless Network'</i></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmhlkiK83ouO8M6gCAJY4ww6gPcHFs5jcLRu5WuS_YDPjJk5-OohyRs6D9dMhAXRgA0WyIXGFFQU7j-jhLZBcTxxk94SKn4-HRN4mAFBIvnjJURCLMAIglIZqXrV096UgecHkygWgX35s/s320/23.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492082980439841522" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 235px; " /></span></span></div><div>Choose any wireless security you want or simply choose none. Click<i> 'Create'</i> to finnish.</div><div><br /></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpH9aJqzqc1v2IklfTYRgG8u9BA72Vb61RiyYn5d9OWimqEd_4kV09tanL6BAhNcgVNSOpBhFhkFyBwCvWleN3NULtvzBYE8Oz8nh9J5Xje0SWzPHtV8cw7FCoSIMUNme9DTFpr7bvBGw/s320/7.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492083279486681666" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 208px; " /></span></span></div><div>Again right-click on the network manager applet and choose <i>'Edit Connections'</i>. Then, under<i> 'Wireless'</i> tab, select your connection name and edit as follow</div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4iPyT8K1gNI8ZrGD0nJXhdLC3KiRpKjs5_pgiou24FzgprKHAqDGZW7QruleUR5RLyrMxE2wKrEPN4N5iw7L-aMbTCAXeMJIk3YaY7aE1aQr6m0Nd2lkrpy99WvPpNZio1fQWonRbGI8/s320/10.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492083927752322274" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 259px; height: 320px; " /></span></span></div><div>Click on applet, and select <i>'Connect to Hidden Wireless Network' </i>and connect.</div><div><br /></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTKMYsRR7fOZ-_sKL_ZUedPCPsqwOTDIRuX3z59SxneyC5K8YGLAfp6bxit4V3sXlGXn8AFMvjHEVwdcZ6sjjUOpRORoFGwyEA9IVPHZQdvkcYYpwHRJp5EjrJFzK_GDt-7UGnquxX3kU/s320/8.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492083692989758274" style="text-align: left;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 200px; " /></span></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheW11oA-ErScqiJq9PMjmCpfDXX8Pr26TJ-4ggTgC7I0fat7OnNWzMl5HCHv0wdjUbEPr90YJMTYROE2zm2_hRwG0-9T__9wi0vC3jwQ-qMu7o0tdWLDWvSzdW0BrqOO-9y1aFUNF7eas/s320/9.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5492084390811244754" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 217px; " /></span></div><div>Finally, restart dhcp server</div><div><span class="Apple-style-span" style="font-size:small;"><i># sudo service dhcpd restart</i></span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Note that you need to connect to the created ad-hoc connection first (in my case, it is <i>'anyname'</i>) before you can start dhcp server.</span></div><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Now, everyone near to you can see you Ad-hoc connection. Configure client's IP address using 'automatic configuration'. Once they connect to your ad-hoc connection through WiFi, they can surf to internet and facebooking all the time <span class="Apple-style-span" style="font-family:arial;">:P</span></span></div><div><br /></div><div>References:</div><div><a href="http://forums.fedoraforum.org/showthread.php?t=227596"><span class="Apple-style-span" style="color:#3333FF;">http://forums.fedoraforum.org/showthread.php?t=227596</span></a></div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-68551476733031497962010-06-13T11:34:00.000+08:002010-06-14T13:29:39.018+08:00IIUM FM<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghAAhzKl0SCe0V7xJsrneUE8e1hTK-1svMcdAhU94LFcBIGu9P-Q-vT-nvfANZI0ZLmNGiu5iapHCis6uTYm6yheo-ZoMdh-5fA9MAognkH4tvFuWQsZqPtsXzvx9ai5SVD31SQq2CsOI/s1600/logo.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 66px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghAAhzKl0SCe0V7xJsrneUE8e1hTK-1svMcdAhU94LFcBIGu9P-Q-vT-nvfANZI0ZLmNGiu5iapHCis6uTYm6yheo-ZoMdh-5fA9MAognkH4tvFuWQsZqPtsXzvx9ai5SVD31SQq2CsOI/s320/logo.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5482097462818350450" /></a><div>
<br /></div><div><span class="Apple-style-span" style="font-size:small;">I'm IIUM student :) and I'm glad that IIUM has it own radio, which is broadcasting over the Internet. Users could simply go to this page </span><span class="Apple-style-span" style="color: rgb(51, 51, 255); "><a href="http://livestream.iiu.edu.my/iiumfm/"><span class="Apple-style-span" style="color:#3333FF;">http://livestream.iiu.edu.my/iiumfm/</span></a> </span> <span class="Apple-style-span" style="font-size:small;">and it will stream the radio using supported player in web browser. Nice huh?.. Hehe. </span></div><meta equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Beside that, for Linux user, you can simply use Rythmbox as follow:</span></div><div><span class="Apple-style-span" style="font-size:small;">Step 1: Make sure plugins are installed</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">ubuntu user,</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install ubuntu-restricted-extras</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">and fedora,</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo yum install gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">It is also necessary to install a bunch of codecs in </span><a href="http://www.mjmwired.net/resources/mjm-fedora-f12.html#binarycodecs"><span class="Apple-style-span" style="color:#3333FF;"><span class="Apple-style-span" style="font-size:small;">here</span></span></a></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Step 2: adding link</span></div><div><span class="Apple-style-span" style="font-size:small;">open your rythmbox, go to menu 'Music',click on 'New Internet Radio Station' and add this url</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">mms://livestream.iiu.edu.my/iiumfm</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, go to side bar on Radio, then double click on the new added link.</span></div><div><span class="Apple-style-span" style="font-size:small;">That's it. Enjoy ;)</span></div><div>
<br /></div>Mohd Hafizhttp://www.blogger.com/profile/12524422833236956908noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-78414026732712684712010-04-19T21:12:00.000+08:002010-05-31T17:26:04.462+08:00Fedora: Change Root Directory of Httpd<span class="Apple-style-span" style="font-size:small;">I recently try to install apache on fedora 12. I need to change the root directory to ease me editing file and avoiding permission. It is quite different when I was configuring on ubuntu. After read through several forums I come to this post. So, I won't be crazy for the next time.. haha</span><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">The default root directory is at <span class="Apple-style-span" style="font-family:'courier new';">/var/www/html</span>. In my case, I want to change it to <span class="Apple-style-span" style="font-family:'courier new';">/home/user1/web</span>.</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Step 1:</b> Edit apache configuration file (as root)</span></div><div><span class="Apple-style-span" style="font-size:small;"><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># gedit /etc/httpd/conf/httpd.conf</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Find these two lines</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">DocumentRoot "/var/www/html"</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">...</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">...</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># This should be changed to whatever you set DocumentRoot to.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;"><directory></directory></span></span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family: 'courier new'; font-size: small; line-height: 20px; "><span class="Apple-style-span" style="color:#FF0000;"></html><<html></html>Directory "/var/www/html"></span></span>
<br />
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, change to</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#000099;"><span class="Apple-style-span" style="font-size:small;">DocumentRoot "/home/user1/web"</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">...</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">...</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># This should be changed to whatever you set DocumentRoot to.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';color:#000099;"><span class="Apple-style-span" style="line-height: 20px; font-size: small;"></html><<html></html>Directory </span><span class="Apple-style-span" style="line-height: 20px; "><span class="Apple-style-span" style="font-size: small;">"</span><span class="Apple-style-span" style="line-height: normal; "><span class="Apple-style-span" style="font-size: small;">/home/user1/web</span></span><span class="Apple-style-span" style="font-size: small;">"</span></span><span class="Apple-style-span" style="line-height: 20px; font-size: small;">></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#000099;"><span class="Apple-style-span" style="font-size:small;"><directory></directory></span></span></span></div></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style=" ;font-family:georgia;">Save and close this file.</span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><div>
<br /></div></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Step 2:</b> Changing permission</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># chmod 711 /home/user1</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># chmod -R 755 /home/user1/web</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><div><span class="Apple-style-span" style="font-size:small;">This step is necessary since in fedora, httpd process will be executed by user 'apache', thus permission need to be change. </span></div><div><span class="Apple-style-span" style="font-size:small;">By default, the permission for each user directory is <span class="Apple-style-span" style="font-family:'courier new';">drwx------</span>, so that other users can't access to files in this directory and its subdirectories.</span></div><a href="javascript:void(0)"></a><div><div><span class="Apple-style-span" style=" ;font-family:'courier new';"># setsebool -P httpd_enable_homedirs 1</span></div></div></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># chcon -R -t httpd_sys_content_t /home/user1/web</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Note: httpd by default is not allowed to access users home directories, see this </span><a href="http://fedoraproject.org/wiki/SELinux/apache"><span class="Apple-style-span" style="font-size:small;">page</span></a></div><div>
<br /></div><div><span class="Apple-style-span" style="font-size:small;"><b>Step 3:</b> Restart apache</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"># service httpd restart</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Hope this will help a little bit :)</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">References:</span></div><div><span class="Apple-style-span" style="font-size:small;"><a href="http://forums.fedoraforum.org/showthread.php?t=233130">http://forums.fedoraforum.org/showthread.php?t=233130</a></span></div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com1tag:blogger.com,1999:blog-9161751858544242374.post-5141130886022620142010-04-18T22:01:00.000+08:002010-05-26T13:14:10.843+08:00Never Ends<span class="Apple-style-span" style="font-size: small;">Now, our FYP is finish but research is just begun :)</span><div><span class="Apple-style-span" style="font-size: small;">Erm..I think the blog title need to be changed. Hehe. </span></div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-27391171338736142372010-02-10T10:50:00.000+08:002010-05-31T17:27:53.398+08:00Setting Up LAMP + memcached on Ubuntu Server 9.10<div><span class="Apple-style-span" style="font-size:small;">This post will show a guide on how to setup LAMP with memcached on three machines. Perhaps this will help us on writing technical report..huahuha</span></div><div><span class="Apple-style-span" style="font-size:small;">We are currently running our performance test on our web and database server using memcached. The test is used to monitor the cpu and memory usage using cacti. Thanks to khairina for </span><a href="http://hafiz-khairina.blogspot.com/2010/02/snmp-cacti-configuration-part-2.html"><span class="Apple-style-span" style="font-size:small;">SNMP and cacti configuration</span></a><span class="Apple-style-span" style="font-size:small;"> :)</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br />We have installed LAMP server in two 64-bit machines, whereas 1 machine running apache2 with php5 while another one running MySQL 5.1.</span></div><div><span class="Apple-style-span" style="font-size:small;">We also have a dedicated memcached server. Since we are using php5, thus we chosen php as our memcached client. </span></div><div><span class="Apple-style-span" style="font-size:small;">Then it can be simply tested using 'ab' (apache bench).</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /><b>Step 1: Setting up Web Server (192.168.0.101)</b></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Installing apache2 and php5</b></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install apache2 php5 libapache2-mod-php5</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Note: In ubuntu, php5 will use <span class="Apple-style-span" style="font-family:'courier new';">php5-prefork</span> by default</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Installing MySQL module for php5</b></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install libapache2-mod-auth-mysql php5-mysql</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, edit php configuration file to add mysql extension</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo vi /etc/php5/apache2/php.ini</span> </span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then add this line</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">extension=msql.so</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Installing memcache module for php5</b></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ apt-get install php5-memcache</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, edit php configuration file to add memcached extension</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo vi /etc/php5/apache2/php.ini </span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then add this line</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">extension=memcache.so</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">To ease us in locating our php file on our web server, we have changed the default location.</span></div><div><span class="Apple-style-span" style="font-size:small;">Edit <span class="Apple-style-span" style="font-family:'courier new';">/etc/apache2/sites-available/default</span>. Don't forget to backup it first. (use gedit,vi or nano)</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo vi /etc/apache2/sites-available/default</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then, find this two lines.</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">DocumentRoot /var/www/</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"><directory var="" www=""></directory></span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Edit it into preferred directory, so it become</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">DocumentRoot /home/username/web/</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"><directory home="" username="" web=""></directory></span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Make sure the directory exists </span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ mkdir /home/username/web/</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Restart apache2</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo /etc/init.d/apache2 restart</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Now, we can create our php code inside the web directory.</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><meta equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="font-size:small;"><b><span class="Apple-style-span" style="font-weight: normal; "><b>Step 2: </b></span>Setting up Database Server (192.168.0.102)</b></span></div><div><span class="Apple-style-span" style="font-size:small;"><b>Installing MySQL server 5.1</b></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install mysql-server</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Then edit mysql configuration file to bind address so it can be connected from any machines</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo vi /etc/mysql/my.cnf </span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Edit this line</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">bind-address</span></span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"> </span></span></span><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">= 127.0.0.1</span></span></div><div><span class="Apple-style-span" style="font-size:small;">to (MySQL server IP address)</span></div><meta equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">bind-address</span></span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';"> </span></span></span><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">= 192.168.0.102</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">then, restart mysql server</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo /etc/init.d/mysql restart</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Add a user to enable to mysql client connect from different host (as mysql server) see the manual <a href="http://dev.mysql.com/doc/refman/5.1/en/adding-users.html">here</a></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><meta equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="font-size:small;"><b><span class="Apple-style-span" style="font-weight: normal; "><b>Step 3: </b></span>Installing Memcached (192.168.0.103)</b></span></div><div><span class="Apple-style-span" style="font-size:small;">Get the latest memcached source file (current version is 1.4.4) that can be download from this <a href="http://code.google.com/p/memcached/downloads/list">site</a>. Then, follow this <a href="http://2bits.com/articles/installing-memcached-125-and-memcache-pecl-223-ubuntu-server.html">guide</a></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Or simply install using apt-get. In ubuntu 9.10 the memcached version is 1.2.8</span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install memcached</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Create a file, put the php code below and save it as index.php into /<span class="Apple-style-span" style="font-family:'courier new';">home/username/web</span> directory (or<span class="Apple-style-span" style="font-family:'courier new';"> /var/www/</span> if haven't do any changes)</span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style=" color: rgb(70, 85, 132); -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family:Courier, 'Courier New', Verdana, Arial;font-size:13px;"><textarea name="textarea" cols="30" rows="4" wrap="hard" readonly="yes"><?php phpinfo(); ?></textarea></span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:georgia;">Open web browser the type </span><span class="Apple-style-span" style="font-family:'courier new';">http://webserver_ipaddress/index.php</span><span class="Apple-style-span" style="font-family:georgia;">. Then, the memcached module for php5 can be found in this page as figure below</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuKB3fqvWVZ-LrhCiti8Rrg_V4gOK45C0A4MCyKRtr6zgjKvDr7C5NpOsvshDPixM4QAIKbTzRC9bJy9VjzGkjDjWE-o2WfAx5gRhzH7d1XzKpHs85bEVs9Sj5BFV9mDS5hovLVZoZmmPR/s1600-h/php.png"><img style="text-align: left;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; width: 320px; height: 174px; " src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuKB3fqvWVZ-LrhCiti8Rrg_V4gOK45C0A4MCyKRtr6zgjKvDr7C5NpOsvshDPixM4QAIKbTzRC9bJy9VjzGkjDjWE-o2WfAx5gRhzH7d1XzKpHs85bEVs9Sj5BFV9mDS5hovLVZoZmmPR/s320/php.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5436458088958418482" /></a></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:georgia;">Now, we can test our web and database server </span><span class="Apple-style-span" style="font-family:arial;">:D</span></span></div><div><span class="Apple-style-span" style="font-size:small;">
<br />
<br /></span></div><div><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="font-family:georgia;">References:</span></span></div><div><span class="Apple-style-span" style="font-size:small;"><a href="https://help.ubuntu.com/community/ApacheMySQLPHP"><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="color:#3366FF;">https://help.ubuntu.com/community/ApacheMySQLPHP</span></span></a></span></div><div><a href="http://ubuntuforums.org/showthread.php?t=440526"><span class="Apple-style-span" style="color:#3366FF;">http://ubuntuforums.org/showthread.php?t=440526</span></a></div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-90518597574853891292010-02-09T20:17:00.000+08:002010-05-26T13:14:10.887+08:00SNMP & Cacti Configuration (PART 2)<div style="text-align: left;"><span class="Apple-style-span" style="font-size:small;">SNMP configuration updated. Previously, I have posted </span><a href="http://hafiz-khairina.blogspot.com/2010/01/snmp-cacti-configuration.html"><span class="Apple-style-span" style="font-size:small;">SNMP & Cacti Configuration</span></a><span class="Apple-style-span" style="font-size:small;">. I want to add some additional necessary information to configure which I have done.</span></div><div><span class="Apple-style-span" style="font-size:small;">Firstly I checked my SNMP if it's working or not:</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">$</span></span><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex</span></span><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> </span></span></span></span></div><div><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="font-size:small;">It suppose to return your ip as output like below:</span></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style=" color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; font-family:Georgia, serif;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYKX3u4BYNbWXHxZ4cQSFQyZHfJTixJhlYwKi7711smCaHCYV5d30NP4BVWjGuOQhaU9VbAn39zkX7omZEPjico13Nh-DwV7og7R7kfmrlPZdhQZmb7YlvuZ5x1kuU8_Jd4ZgkQUIirSc/s400/Screenshot-5.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5436221914319114946" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 41px; " /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-family:Georgia, serif;"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-family:Georgia, serif;"><span class="Apple-style-span" style="font-size:small;">In my case, SNMP is not working and return many different errors. What I have done to solve the problem is just edit snmpd configuration file (snmpd.conf). Below is my snmpd.conf (/etc/snmp/snmpd.conf), you could simply copy paste and try to your PC. (Copy the original file first so you have backup if something happen) -- I put the lines you have to check in red.</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-family:Georgia, serif;"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-family:Georgia, serif;"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style=" -webkit-text-decorations-in-effect: underline; font-family:Georgia, serif;"><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># EXAMPLE.conf:</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># An example configuration file for configuring the ucd-snmp snmpd agent.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># This file is intended to only be an example. If, however, you want</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># to use it, it should be placed in /etc/snmp/snmpd.conf.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># When the snmpd agent starts up, this is where it will look for it.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># You might be interested in generating your own snmpd.conf file using</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># the "snmpconf" program (perl script) instead. It's a nice menu</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># based interface to writing well commented configuration files. Try it!</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># Note: This file is automatically generated from EXAMPLE.conf.def.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># Do NOT read the EXAMPLE.conf.def file! Instead, after you have run</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># configure & make, and then make sure you read the EXAMPLE.conf file</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># instead, as it will tailor itself to your configuration.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># All lines beginning with a '#' are comments and are intended for you</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># to read. All other lines are configuration commands for the agent.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># PLEASE: read the snmpd.conf(5) manual page as well!</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># Access Control</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># By far, the most common question I get about the agent is "why won't</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># it work?", when really it should be "how do I configure the agent to</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># allow me to access it?"</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># By default, the agent responds to the "public" community for read</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># only access, if run out of the box without any configuration file in </span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># place. The following examples show you other ways of configuring</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># the agent so that you can change the community names, and give</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># yourself write access as well.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># The following lines change the access permissions of the agent so</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># that the COMMUNITY string provides read-only access to your entire</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># NETWORK (EG: 10.10.10.0/24), and read/write access to only the</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># localhost (127.0.0.1, not its real ipaddress).</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># For more information, read the FAQ as well as the snmpd.conf(5)</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># manual page.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># First, map the community name (COMMUNITY) into a security name</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># (local and mynetwork, depending on where the request is coming</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># from):</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># sec.name source community</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">com2sec local localhost public</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">com2sec mynetwork 10.101.95.0/24 public</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># Second, map the security names into group names:</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># </span></span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"> </span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">sec.model sec.name</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">group MyROSystem v1 paranoid</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">group MyROSystem v2c paranoid</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">group MyROSystem usm paranoid</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">group MyROGroup v1 local</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">group MyROGroup v2c local</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">group MyROGroup usm local</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">group MyRWGroup v1 mynetwork</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">group MyRWGroup v2c mynetwork</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">group MyRWGroup usm mynetwork</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># Third, create a view for us to let the groups have rights to:</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># incl/excl subtree mask</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">view all included .1 80</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">view system included .iso.org.dod.internet.mgmt.mib-2.system</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">##########################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># Finally, grant the 2 groups access to the 1 view with different</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># write permissions:</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># context sec.model sec.level match read write notif</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">access MyROSystem "" any noauth exact system none none</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">access MyROGroup "" any noauth exact all none none</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">access MyRWGroup "" any noauth exact all all none</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#--------------------------------------------</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">#############################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># System contact information</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># It is also possible to set the sysContact and sysLocation system</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># variables through the snmpd.conf file. **PLEASE NOTE** that setting</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># the value of these objects here makes these objects READ-ONLY</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># (regardless of any access control settings). Any attempt to set the</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># value of an object whose value is given here will fail with an error</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"># status of notWritable.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">#Editing this value is optional, i dont do any changes</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">syslocation Unknown (configure /etc/snmp/snmpd.local.conf)</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">syscontact Root </span><root@localhost><span class="Apple-style-span" style="font-size:small;"> (configure /etc/snmp/snmpd.local.conf)</span></root@localhost></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="color:#FF0000;"><span class="Apple-style-span" style="font-size:small;">End changes. Leave code below this line as it is</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">################################################</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;">After edit this file, save it. Then restart SNMP. Make sure you restart.</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">$sudo service snmpd restart</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;">Then, do check again. </span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-family:Georgia, serif;"><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">$</span></span><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;">snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex</span></span></span></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-family:Georgia, serif;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></span></span></div><div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;">That's all. :)</span></span></span></div><div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="white-space: pre;"><a href="http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/mrtg_config_step_3.php"><span class="Apple-style-span" style="font-size: small;">http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/mrtg_config_step_3.php</span></a></span></span></div><div><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="white-space: pre;"><a href="http://www.debianhelp.co.uk/snmp.htm"><span class="Apple-style-span" style="font-size: small;">http://www.debianhelp.co.uk/snmp.htm</span></a></span></span></div></span></span></span></div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0tag:blogger.com,1999:blog-9161751858544242374.post-24315389957390700122010-02-05T21:23:00.000+08:002010-05-26T13:14:10.910+08:00Join Freenode<div style="text-align: left;">I had joined <a href="http://freenode.net/">Freenode</a> :)</div><div>I am cool <span class="Apple-style-span" style="font-family:arial;">:P</span></div><div style="text-align: left;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; ">I am using X-Chat (also could use Pidgin, web or other IRC)</span></div><div style="text-align: left;">$sudo apt-get install xchat</div><div style="text-align: left;"><span class="Apple-style-span" style="color:#0000EE;"><br /></span></div><div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9BMoiTswzVrDb9XcipKMU5-K6N3PWre9QCcjSl3vAePxBxeAT6aBC2JJZwWNQFSSQ4EyhbCsZb14tDa0BjVE8NiJTsfYoBiMwpv3TITZDvTcTkuOLVOY6eGv5xH3OnXMp07KSoSZZqx8/s1600-h/Screenshot-2.png"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9BMoiTswzVrDb9XcipKMU5-K6N3PWre9QCcjSl3vAePxBxeAT6aBC2JJZwWNQFSSQ4EyhbCsZb14tDa0BjVE8NiJTsfYoBiMwpv3TITZDvTcTkuOLVOY6eGv5xH3OnXMp07KSoSZZqx8/s400/Screenshot-2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5434751916503564226" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 297px; " /></a>You can use any <a href="http://irc.netsplit.de/channels/?net=freenode">channel available</a> on freenode. (In the picture, I joined #ubuntu). After connecting to a channel, you could add channel, so dont worry :)</div><div>You could also build your <a href="http://blog.freenode.net/2008/04/registering-a-channel-on-freenode/">own channel</a>.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitcO_Jr3VRbA3hQooBF10jOvrcSqTaGl9qmLNL0Htz-33XAwOHHLe7tpWkD7gZHNuVYyEKSJqK6euXhr-mH8dBgw9yHe4bZ5Z_ZQk8DXEmmrRYO5Pwd_PUIjoh36pKXYhIqZRMjwnQT24/s1600-h/Screenshot-3.png"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitcO_Jr3VRbA3hQooBF10jOvrcSqTaGl9qmLNL0Htz-33XAwOHHLe7tpWkD7gZHNuVYyEKSJqK6euXhr-mH8dBgw9yHe4bZ5Z_ZQk8DXEmmrRYO5Pwd_PUIjoh36pKXYhIqZRMjwnQT24/s400/Screenshot-3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5434751905060699890" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 267px; " /></a></div><div>Done. Happy chatting :)</div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com1tag:blogger.com,1999:blog-9161751858544242374.post-2995170385799888232010-01-29T13:36:00.000+08:002010-05-26T13:14:10.924+08:00SNMP & Cacti Configuration<div style="text-align: left;">Basically, i refer my SNMP and Cacti installation <a href="http://www.debuntu.org/how-to-monitor-your-servers-with-snmp-and-cacti">here</a>. It works nicely. I would like to paste here everything i have done to make it works in my PC.</div><div><br /></div><div>Below is how the architecture looks since I want Cacti to monitor many devices at a time. Firstly, assign one PC as manager (which Cacti will be installed) and all of devices to be monitored. They are connected using SNMP.</div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjyQvANmJGtRjp8sOfSjyRlFff7xfVtcoGV_3jIiX7Z_Kc6sbEc_W61FTEvmR2XWP9Eo1YWgtjHjg-BqevFnnTRZlnHnPEmxWY68zM2U4vlitfhlljTwi3npTziR687K7IqTb2c9ozjKc/s1600-h/Diagram1.bmp"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 163px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjyQvANmJGtRjp8sOfSjyRlFff7xfVtcoGV_3jIiX7Z_Kc6sbEc_W61FTEvmR2XWP9Eo1YWgtjHjg-BqevFnnTRZlnHnPEmxWY68zM2U4vlitfhlljTwi3npTziR687K7IqTb2c9ozjKc/s200/Diagram1.bmp" alt="" id="BLOGGER_PHOTO_ID_5432071656946905442" border="0" /></a><div style="text-align: center;"><br /></div><div>Below is the setting I had done to my manager:</div><div><br /></div><div>1) Firstly, install SNMP</div><div><span class="Apple-style-span" style="font-family:'courier new';">$sudo apt-get install snmpd</span></div><div><br /></div><div>2) Then check</div><div><span class="Apple-style-span" style="font-family:'courier new';">$sudo gedit /etc/default/snmpd</span></div><div><br /></div><div>Make sure</div><div><span class="Apple-style-span" style="font-family:'courier new';"># snmpd control (yes means start daemon).</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">SNMPDRUN=yes</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"># snmpd options (use syslog, close stdin/out/err).</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia,serif;">3) Next,</span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$sudo gedit /etc/snmp/snmpd.conf</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-family:Georgia,serif;"><br /></span></span></div><div>In the line of com2sec setting, I have adjusted as below (slightly different from How-To)</div><div><span class="Apple-style-span" style="font-family:'courier new';"># sec.name source community</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">com2sec readonly localhost public</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div>If you have your own community, you could use it for better security.</div><div><br /></div><div>4) Check SNMP configuration</div><div><span class="Apple-style-span" style="font-family:'courier new';">$snmpwalk -Os -c public -v 1 localhost system</span></div><div><br /></div><div>(If you use your community, replace 'public' with your community name)</div><div><br /></div><div>This command will return result something like this:</div><div><br /></div><div style="text-align: center;"><span class="Apple-style-span" style="color: rgb(0, 0, 238);"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="color: rgb(0, 0, 0);"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha2kKKft81_e1Zl8AEY_SnP_d6b4zr8UopSVXTVIcx6rnT05EX_V7vT3x40XDuaSiX8cUMQS7yz_X2qT48vRZ-1WVKZJP-CUn5D7z1BN6YAE9cZKgJ2p3-4QtZnSdibH24N8JcPfTk0a0/s1600-h/bla.gif"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha2kKKft81_e1Zl8AEY_SnP_d6b4zr8UopSVXTVIcx6rnT05EX_V7vT3x40XDuaSiX8cUMQS7yz_X2qT48vRZ-1WVKZJP-CUn5D7z1BN6YAE9cZKgJ2p3-4QtZnSdibH24N8JcPfTk0a0/s400/bla.gif" alt="" id="BLOGGER_PHOTO_ID_5432076482039126530" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" border="0" /></a></span></span></span></div><div style="text-align: left;"><span class="Apple-style-span" style="color: rgb(0, 0, 238);"><u><br /></u></span></div><div style="text-align: left;">5) <b>CACTI- Installation</b></div><div style="text-align: left;">I did exactly like <a href="http://www.debuntu.org/how-to-monitor-your-servers-with-snmp-and-cacti-p2">here</a>. </div><div style="text-align: left;"><br /></div><div style="text-align: left;">For all other devices, configure SNMP server same like above. That's all :)</div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com3tag:blogger.com,1999:blog-9161751858544242374.post-66464275364860123672010-01-17T18:34:00.000+08:002010-05-26T13:14:10.955+08:00Mysql Cluster with Mysql 5.1 on Ubuntu Server 9.10We're currently implementing memcached on mysql cluster using mysql 5.1. So, to make it quick, i followed a guide from <a href="http://www.howtoforge.com/"><span class="Apple-style-span" style="color:#3366FF;">howtoforge</span></a> written by Peter Okupski in this <a href="http://www.howtoforge.com/setting-up-a-loadbalanced-mysql-cluster-with-mysql5.1"><span class="Apple-style-span" style="color:#3366FF;">site</span></a>. It works for me. <div><br /></div><div>There are several things need to be concerned before implementing this guide on ubuntu server 9.10.</div><div><ol><li>Don't install mysql-server5.1 from the repository using apt-get.<br />For me, it's easier to install mysql cluster by using source code in ubuntu. Source code can be downloaded form mysql <a href="http://dev.mysql.com/downloads/cluster/"><span class="Apple-style-span" style="color:#3366FF;">site</span></a>. On 'select platform' option, choose 'source code' and download the tar file mysql-cluster-gpl-[version].tar.gz<br />(Note: register, it is free!)<br /><br /></version></version></li><li>Install build-essential package to allow compiling source file<br /><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install build-essential</span><br /><br /></li><li>Install developer's library for ncurses<br /><span class="Apple-style-span" style="font-family:'courier new';">$ sudo apt-get install libncurses5-dev</span><br /><br />This will avoid an error:<br /><span class="Apple-style-span" style="font-family:'courier new';">configure error: No curses/termcap library found</span><br /></li></ol><div>Now, it's ready :-)</div><div><br /></div><div>References:</div><div><a href="http://www.howtoforge.com/setting-up-a-loadbalanced-mysql-cluster-with-mysql5.1"><span class="Apple-style-span" style="color:#3366FF;">http://www.howtoforge.com/setting-up-a-loadbalanced-mysql-cluster-with-mysql5.1</span></a><br /><a href="http://www.spiration.co.uk/post/1391/Ubuntu%20-%20configure%20error:%20No%20curses/termcap%20library%20found"><span class="Apple-style-span" style="color:#3366FF;">http://www.spiration.co.uk/post/1391/</span></a></div><div><br /></div></div>Anonymoushttp://www.blogger.com/profile/02429580908692830802noreply@blogger.com0