Copyright © Ari Kuswanto
Design by Dzignine
Tampilkan postingan dengan label IT Articles. Tampilkan semua postingan
Tampilkan postingan dengan label IT Articles. Tampilkan semua postingan
Selasa, 14 Desember 2010

Masalah Umum Instalasi Sharing Printer

Ada beberapa masalah yang kita alami dalam membuat printer kita di share dan bisa di pakai di komputer lain. Biasanya kasus kayak gini nih terjadi di kantor. Jadi klo kalian udah kerja di kantor, nanti pengalaman tuh gimana pusingnya hanya buat sharing printer doank. Nah lho ?

Apa ajah masalahnya ? ini dia masalahnya ?
1. Network gak jalan
2. Nama printer yang di share tidak valid

3. Connect printer di server tidak bisa masuk 4. Printer yang udah connect gak muncul di option printer.

Nah, giamana mengatasi masalahnya?

ini dia... kita coba satu persatu gimana menjawabnya.

1. kenapa pas di find printer network nya gak ketemu ?

jawab :

itu cuman masalah LAN nya ajah kali. pastikan cabel RJ45 nya udah tercolok belum. kalau udah, coba Ping deh ke IP Servernya. kalau udah bisa. lakukan perintah run, lalu ketik \\alamat IP , kemudian lihat tuh apakah ada printernya atau tidak. kalau ada, tinggal klik kanan, connect dah. Buzzz,,, harusnya sih udah connect.

2. Nama printer yang di share tidak valid ?

Jawab :

Pasti pas di klik konek printer pada klik kanan, muncul error "the printer name was incorrect ....." , nah tinggal konfigure di printer server nya ajah. Terus kalian masukin nama yang benar, kalau printernya epson ya epson dan type nya. klo gak , hapus ajah. terus add printer lagi dan masukin ajah nama defaultnya. Insya Allah beres deh. terus di client nya masukin nama yang bener waktu add printer , kan di search di local network tuh, jadi nyantai ajah. ok ?

3. Koneksi di printer server gak bisa masuk.

Jawab:
ini mah sama saja ma yang no 1. tapi ada additional masalah kayak gini nih, dia minta di install drivernya dari server. sedangkan servernya gak punya tuh drivernya. jadi gimana ? yawdh,., install ajah driver nya di komputer client. walaupun gak da printernya tapi nanti di jamin bisa baca tuh printer yang ada di server. so.. kalian jangan mpe ilang tuh CD nya, apalagi yang jadi admin nya... klo ilang,, beuhh,,, keterlaluan bangetz..

4. Printer yang udah konek gak muncul di option printer

Jawab:
maksud nya ketika kita gunakan aplikasi word trus pas kita lakukan perintah print, printer server kita gak ke detect nih. ya kalian harus lakuin perintah ini nih, masuk ke control panel, masuk ke printer, klik kanan add printer, cari printer servernya, bisa juga pake alamat IP Address, terus ketemu deh, kalau di jelasin detail nanti kalian gak belajar lagi.. hehe.. so.. ini mudah kan ?

Saya udah kasih tahu garis2 besarnya ajah. selanjutnya terserah anda. IT Admin pasti bisa memikirkan beribu2 cara untuk mengatasi masalah printer ini. ini kan gampang? haha..

note : pastikan service sharing and printer jg sudah di enabled baik di server maupun client

Minggu, 21 November 2010

Beberapa Code Program PHP (Koneksi, Input, simpan, cetak dan grafik)

  1. File koneksi (inc.connect.php)


    <?php

    $host ="localhost";

    $user ="root";

    $passwd ="123456789";

    $dbh ="n2online";

    $connect=mysql_connect($host,$user,$passwd);

    if (!$connect)

    {

    echo "Tidak bisa konek pada Server";

    }

    // memilih database pda server

    mysql_select_db($dbh) or die ( " Database nggak ada tuh ");

    ?>


  1. File Input N2 (input_n2.php)


    <form action="kpc.php?id=6" method="post" enctype="multipart/form-data" name="form1" onSubmit="MM_validateForm('asal_srt','','R','no_srt','','R','perihal','','R','keterangan','','R');return document.MM_returnValue">

    <tr>

    <td><table width="83%" border="0" bgcolor="#ffffff">

    <tr valign="top">

    <td height="40" colspan="3" valign="middle"><div align="center" class="style1">INPUT DATA KEUANGAN N2 </div>

    <div align="justify">

    <div align="right"></div>

    </div> <div align="left"></div></td>

    </tr>


    <tr valign="top">

    <td width="49%"><div align="left">Tanggal</div> </td>

    <td width="1%">:</td>

    <td width="50%"><? echo "$hari, $tgl $bln $thn" ?></td>

    </tr>

    <tr valign="top">

    <td>Kode Pos </td>

    <td>:</td>

    <td ><? echo $username ?></td>

    </tr>

    <tr valign="top">

    <td>Remmitance Penerimaan </td>

    <td>:</td>

    <td ><div align="left">

    <input type="text" name="rs1">

    </div></td>

    </tr>

    <tr valign="top">

    <td>Remmitance Pengeluaran </td>

    <td>:</td>

    <td ><input type="text" name="rs2"></td>

    </tr>

    <tr valign="top">

    <td>SOPP Penerimaan </td>

    <td>:</td>

    <td><input type="text" name="sopp1"></td>

    </tr>

    <tr valign="top">

    <td>SOPP Pengeluaran </td>

    <td>:</td>

    <td><input type="text" name="sopp2"></td>

    </tr>

    <tr valign="top">

    <td>IPOS Penerimaan</td>

    <td>:</td>

    <td><input type="text" name="ipos1"></td>

    </tr>

    <tr valign="top">

    <td>IPOS Bea </td>

    <td>:</td>

    <td ><input type="text" name="ipos2"></td>

    </tr>

    <tr valign="top">

    <td>IPOS PPN </td>

    <td>:</td>

    <td ><input type="text" name="ipos3"></td>

    </tr>

    <tr valign="top">

    <td>Panjar Pensiun </td>

    <td>:</td>

    <td ><input type="text" name="p1"></td>

    </tr>

    <tr valign="top">

    <td>Panjar ASABRI </td>

    <td>:</td>

    <td ><input type="text" name="p2"></td>

    </tr>

    <tr valign="top">

    <td>Panjar Kantor Pos </td>

    <td>:</td>

    <td ><div align="left">

    <label></label>

    <input type="text" name="p3">

    </div></td>

    </tr>

    <tr valign="top">

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td >&nbsp;</td>

    </tr>

    <tr valign="top">

    <td><div align="left"></div></td>

    <td>&nbsp;</td>

    <td > <input type="submit" name="submit" value="Simpan"onclick="return confirm ('Apakah Anda yakin menginputkan data ini ?')" >

    <input type="button" name="batal" value="Batal" onClick="document.location.href='kpc.php';">

    <!--<br> <a href="javascript:void(0);" onclick="javascript:history.go(-1);">Back </a>--> </td>

    </tr>

    </table></td>

    </tr>

    </form>


  2. File Simpan N2 (simpan_n2.php)


    <?

    //////////////////////////////////////////////////

    // Created By Ari Kuswanto //

    // Teknik Informatika III-B` //

    // Politeknik Pos Indonesia //

    /////////////////////////////////////////////////

    ?>


    <?

    include"inc/inc.connect.php";

    include "TGL.php";

    $back="<a href=\"javascript:history.bac k();\">Disini</a>";

    $date= date("Y-m-d");

    $kaping=$hari.","." ".$tgl." ".$bln." ".$thn;

    ?>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

    "http://www.w3.org/TR/html4/loose.dtd">

    <html>

    <head>

    <title>lowongan_kerja</title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    </head>

    <body>

    <br><br><br>

    <?

    if(!ereg("^[0-9]",$sopp1))

    {

    $output1="<li>Penulisan SOPP Penerimaan harus dengan Angka</li>";

    }

    else

    { $r1="a"; }

    if(!ereg("^[0-9]",$sopp2))

    {

    $output2="<li>Penulisan SOPP Pengeluaran harus dengan Angka</li>";

    }

    else

    { $r2="a"; }

    if(!ereg("^[0-9]",$rs1))

    {

    $output3="<li>Penulisan Remmitance Penerimaan harus dengan Angka</li>";

    }

    else

    { $r3="a"; }

    if(!ereg("^[0-9]",$rs2))

    {

    $output4="<li>Penulisan Remmitance Pengeluaran harus dengan Angka</li>";

    }

    else

    { $r4="a"; }

    if(!ereg("^[0-9]",$ipos1))

    {

    $output5="<li>Penulisan Ipos Penerimaan harus dengan Angka</li>";

    }

    else

    { $r5="a"; }

    if(!ereg("^[0-9]",$ipos2))

    {

    $output6="<li>Penulisan IPOS Bea harus dengan Angka</li>";

    }

    else

    { $r6="a"; }

    if(!ereg("^[0-9]",$ipos3))

    {

    $output7="<li>Penulisan IPOS Ppn harus dengan Angka</li>";

    }

    else

    { $r7="a"; }

    if(!ereg("^[0-9]",$p1))

    {

    $output8="<li>Penulisan Panjar Pensiun harus dengan Angka</li>";

    }

    else

    { $r8="a"; }


    if(!ereg("^[0-9]",$p2))

    {

    $output9="<li>Penulisan Panjar ASABRI harus dengan Angka</li>";

    }

    else

    { $r9="a"; }


    if(!ereg("^[0-9]",$p3))

    {

    $output10="<li>Penulisan Panjar Kantor harus dengan Angka</li>";

    }

    else

    { $r10="a"; }



    $pesan="<ul><font color='red'>

    $output1

    $output2

    $output3

    $output4

    $output5

    $output6

    $output7

    $output8

    $output9

    $output10


    </font></ul>";


    if($r1!='a' || $r2 !='a' || $r3 !='a' || $r4 !='a' || $r5 !='a' || $r6 !='a' || $r7 !='a' || $r8 !='a' || $r9 !='a' || $r10 !='a' )

    {

    echo "<center><h1>VALIDITAS TAMBAH DATA KEUANGAN N2 $username </h1></center>";

    echo "$pesan <br><br>";

    ?>

    &copy;&nbsp;&nbsp;Klik <a href='kpc.php?id=5' onclick='history.back(1);'>di sini</a> untuk kembalike form input Data Keuangan.

    <?

    }


    elseif($r1=='a' && $r2 =='a' && $r3 =='a' && $r4 =='a' && $r5 =='a' && $r6 =='a' && $r7 =='a' && $r8 =='a' && $r9 =='a' && $r10 =='a' )

    {

    $perintah=mysql_query("INSERT INTO kpc ( tanggal ,


    kdpos, rsterima , rskeluar , soppterima , soppkeluar ,


    ipos , bea , ppn , panjarpensiun , panjarasabri ,


    panjarkantor )

    VALUES (

    '$date' , '$username', '$rs1', '$rs2', '$sopp1',


    '$sopp2', '$ipos1', '$ipos2', '$ipos3', '$p1', '$p2',


    '$p3'

    );");

    echo "<center><h1>Input Data KPC Sukses</h1></center>";

    echo "<br><center><h3>Silahkan Anda Menginputkan Esok Hari</h3></center>";

    echo "<br>";


    ?>


    <?

    }

    ?>

    </body>

    </html>


  3. File Cetak Laporan (laporan_n2.php)


    <?php

    session_start();

    include "inc/inc.connect.php";

    include "inc/switch.php";

    include "TGL.php";

    if (!empty($username) and !empty($password) )

    {

    ?>

    <html>

    <body>

    <div align="center" class="style10">LAPORAN KEUANGAN N2</div>

    <table width="873" height="216" border="0">

    <tr>

    <td width="365" valign="top"><p align="right">&nbsp;</p> </td>

    <td width="498">&nbsp;</td>

    </tr>


    <tr>

    <td height="69" valign="top"><table width="342" border="0">

    <tr>

    <td width="336"><div align="left">Tanggal Hari ini :

    <font color="#FF6600"><? echo "$hari, $tgl $bln $thn" ?></font> </div></td>

    </tr>

    <tr>

    <td><div align="left">

    <table width="200" border="1" bordercolor="#000000">

    <tr>

    <td><div align="center"><strong>Kode Pos : <? echo $username ?> </strong></div></td>

    </tr>

    </table>

    </div> </td>

    </tr>

    </table>


    </p>


    </p></td>

    <td><p><img src="images/Poslogo.jpg" alt="ok" width="86" height="67" />

    </p>

    <p>&nbsp;</p></td>

    </tr>

    <tr>

    <td colspan="2"><p align="left">Laporan Keuangan N2 ini adalah sebagai berikut : </p>

    <div align="left">

    <table width="841" border="1" cellpadding="1" cellspacing="1">


    <tr bgcolor="#666666" align="center">

    <td width="61" height="16" bgcolor="#33FF33"><span class="style7">Tanggal</span> </td>

    <td width="85" bgcolor="#33FF33"><span class="style7">RS3</span> </td>

    <td width="68" bgcolor="#33FF33"><span class="style7">RS4</span> </td>

    <td width="74" bgcolor="#33FF33"><span class="style7">SOPP1</span></td>

    <td width="57" bgcolor="#33FF33"><span class="style7">SOPP2</span></td>

    <td width="68" bgcolor="#33FF33"><span class="style7">IPOS Terima </span></td>

    <td width="72" bgcolor="#33FF33"><span class="style9">IPOS Bea </span> </td>

    <td width="78" bgcolor="#33FF33"><span class="style9">IPOS PPN </span> </td>

    <td width="81" bgcolor="#33FF33"><span class="style9">Pensiun</span></td>

    <td width="80" bgcolor="#33FF33"><span class="style9">ASABRI</span></td>

    <td width="83" bgcolor="#33FF33"><span class="style9">Kantor </span> </td>

    </tr>

    <?

    include "inc/inc.connect.php";

    include "inc/TGL.php";


    $perintah=mysql_query("select * from kpc where kdpos='$username' order by tanggal desc");

    while($row=mysql_fetch_array($perintah))

    {

    ?>

    <?

    $sum = mysql_query("SELECT SUM(rsterima) AS ttlLaba FROM kpc where kdpos='$username'");

    $ttl = mysql_fetch_array($sum);

    $sum2 = mysql_query("SELECT SUM(rskeluar) AS ttlLaba2 FROM kpc where kdpos='$username'");

    $ttl2 = mysql_fetch_array($sum2);

    $sum3 = mysql_query("SELECT SUM(soppterima) AS ttlLaba3 FROM kpc where kdpos='$username'");

    $ttl3 = mysql_fetch_array($sum3);

    $sum4 = mysql_query("SELECT SUM(soppkeluar) AS ttlLaba4 FROM kpc where kdpos='$username'");

    $ttl4 = mysql_fetch_array($sum4);

    $sum5 = mysql_query("SELECT SUM(ipos) AS ttlLaba5 FROM kpc where kdpos='$username'");

    $ttl5 = mysql_fetch_array($sum5);

    $sum6 = mysql_query("SELECT SUM(bea) AS ttlLaba6 FROM kpc where kdpos='$username'");

    $ttl6 = mysql_fetch_array($sum6);

    $sum7 = mysql_query("SELECT SUM(ppn) AS ttlLaba7 FROM kpc where kdpos='$username'");

    $ttl7 = mysql_fetch_array($sum7);

    $sum8 = mysql_query("SELECT SUM(panjarpensiun) AS ttlLaba8 FROM kpc where kdpos='$username'");

    $ttl8 = mysql_fetch_array($sum8);

    $sum9 = mysql_query("SELECT SUM(panjarasabri) AS ttlLaba9 FROM kpc where kdpos='$username'");

    $ttl9 = mysql_fetch_array($sum9);

    $suma = mysql_query("SELECT SUM(panjarkantor) AS ttlLabaa FROM kpc where kdpos='$username'");

    $ttla = mysql_fetch_array($suma);

    ?>

    <tr bgcolor="ffffff" align="center">

    <td><div align="left"><? echo "$row[tanggal]"; ?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['rsterima'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['rskeluar'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['soppterima'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['soppkeluar'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['ipos'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['bea'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['ppn'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['panjarpensiun'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['panjarasabri'],0,"",".").",-".""?></div></td>

    <td><div align="left"><? echo "Rp.".number_format($row['panjarkantor'],0,"",".").",-".""?></div></td>

    </tr>

    <?

    }

    ?>

    </table>

    </div>

    <br />

    <p align="left"><strong>Dengan Total </strong></p>

    <table width="402" border="0">

    <tr>

    <td width="165">Remmitance Penerimaan </td>

    <td width="10">:</td>

    <td width="205"><? echo "Rp. ".number_format($ttl[ttlLaba],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>Remmitance Pengeluaran <br /></td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl2[ttlLaba2],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>SOPP Penerimaan </td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl3[ttlLaba3],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>SOPP Pengeluaran </td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl4[ttlLaba4],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>IPOS</td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl5[ttlLaba5],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>Bea</td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl6[ttlLaba6],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>PPN</td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl7[ttlLaba7],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>Panjar Pensiun </td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl8[ttlLaba8],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>Panjar Asabri </td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttl9[ttlLaba9],0,"",".").",-".""; ?></td>

    </tr>

    <tr>

    <td>Panjar Kantor </td>

    <td>:</td>

    <td><? echo "Rp. ".number_format($ttla[ttlLabaa],0,"",".").",-".""; ?></td>

    </tr>

    </table>

    <p align="left">&nbsp;</p>

    <p align="center"><strong><u>mengetahui,</u></strong></p>

    <div align="right">

    <p align="right">&nbsp;</p>

    <p align="center">&nbsp;</p>

    <p align="center">( __________________ )</p>

    <p align="center">Kepala Kantor Kode Pos <? echo $username ?></p>

    <p align="center">

    <input name="cmd" type="submit" id="noprint" value="Cetak" onClick="window.print()" />

    </p>

    </div> </td>

    </tr>

    </table>

    <p align="center">&nbsp;</p>

    </body>

    </html>

    <?

    }

    else

    {

    echo"

    <html>

    <head>

    <meta http-equiv='refresh' content='1;url=index.php'>

    </head>


    <table width='557' align='center' height='31' border='0' cellpadding='0' cellspacing='0'>

    <tr>

    <td valign='top'><br><center><h2>AUTHORIZATION NEEDED</h2><h4>Sorry You Can't Access this Page...</h4></center><br>

    </td>

    </tr>

    </table>

    </html>";

    }

    ?>


  4. Grafik File (graf_ipos.php)


    <?

    $varData = array('localhost', 'root', '123456789', 'n2online');

    list($host, $user, $pass, $db) = $varData;

    $con = mysql_connect($host, $user, $pass);

    mysql_select_db($db, $con) or die('ERROR DBASE CON');

    ?>


    <?

    $qry = mysql_query("SELECT * FROM kpc where kdpos='$username'") or die('ERROR REPORT DATA');

    //ambil data MAX dari laba

    $max = mysql_query("SELECT MAX(ipos) FROM kpc where kdpos='$username'") or die('ERROR MAX DATA');

    list ($most_value) = mysql_fetch_row($max);

    mysql_free_result($max);


    //jumlahkan (SUM) seluruh nilai laba dalam baris data sebagai ttlLaba

    $sum = mysql_query("SELECT SUM(ipos) AS ttlLaba FROM kpc where kdpos='$username'") or die('ERROR SUM DATA');

    $ttl = mysql_fetch_array($sum);

    ?>


    <table border=0 align="center" cellpadding=0 cellspacing=5 bgcolor="#333FFF" style="background-color:#333FFF;border:1px solid blue;"><tr>

    <b> Grafik Penerimaan IPOS </b>

    <?

    ## Vertical Graphic for Report Data [dremi.info] ##

    ## © Copyright 2008. PHP Tutorial Forum www.dremi.info ##

    ## http://www.dremi.info/forum/viewtopic.php?p=899#899 ##

    ## PHP Builder by hairul azami [dr.emi] ##


    ##=======================LICENSE========================##

    ## FREE ##

    ##======================================================##


    while($row=mysql_fetch_array($qry))

    {

    if($most_value==0)

    $most_value=1; // menghandle nilai field laba yang nol

    //mulai proses data value untuk graphic

    $graphLineValue = round(($row[ipos] * 100) / $most_value);

    $percent = round(($row[ipos] * 100) / $ttl[ttlLaba], 2);

    ?>

    <td valign="bottom" title="Nama Toko: <? echo $row['ipos']; ?>"><table border=0 cellpadding=0 cellspacing=2>

    <tr align=center valign=bottom><td style="background-color:#ffffff;"><table border=0 cellspacing=0 cellpadding=0 width=100%>

    <tr align=center><td height=102 valign=bottom nowrap style="color:black;font-family:Arial, Helvetica;font-size:12px;"><? echo $percent; ?> %</td>

    </tr><tr align=center valign=bottom><td><table border=0 cellspacing=0 cellpadding=0><tr><td style="border:2px outset white;" bgcolor="#33cccc" title="<? echo "Rp. ".number_format($graphLineValue,3,"",".").",-".""; ?>"><div style="width:20px; height:<? echo $graphLineValue; ?>px; line-height:1px; font-size:1px;"></div></td></tr></table></td></tr></table></td></tr><tr align=center>

    <td style="color:#000000;background-color:#FFFFFF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;" nowrap><?

    echo "Rp. ".number_format($row[ipos],0,"",".").",-"."";

    ?></td>

    </tr><tr><td bgcolor="#C0E0FF" style="color:#000000;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;"><? echo $row['kdpos']; ?>&nbsp;</td>

    </tr>

    </tr><tr><td bgcolor="#FFFFFF" style="color:#000000;background-color:#FFFFFF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;"><? echo $row['tanggal']; ?>&nbsp;</td>

    </tr></table></td>

    <?

    }

    ?>

    </tr></table>


    <div style="font-family:'Courier New'; font-size:24px; font-weight:bold; padding-top:20px; text-align:center;">

    <?

    echo "Total= Rp. ".number_format($ttl[ttlLaba],0,"",".").",-"."";

    ?>

</div>

Kamis, 18 November 2010

Install MonetDB pada Ubuntu Server 9.10

Hufftthh.... seharian ini saya dikerjain monetdb di ubuntu... pagi-pagi saya harus download OS Ubuntu server 9.10 , lumayan lama banget nunggunya... ceritanya saya udah selesai download, lalu saya install deh di komputer kantor, proses kayak gini ajah memakan waktu ampe duhur... lumayan juga...

tapi rasa lelah terobati, karena mba nuni purwani telepon , jadi gak jenuh deh selama proses instalasi.. setelah ngobrol bla.. bla.. bla... , maka akhirnya instalasi ubuntu server 9.10 selesai juga, karena sudah lewat waktu istirahat, saya buru2 makan , dapat nya warteg dengan harga lumayan 6000 rupiah,,, hahaha,,, murah kan ? siapa bilang biaya hidup jakarta mahal.

Kembali ke topik utama, setelah itu saya lakukan konfigurasi network agar bisa konek ke internet nih gan, lalu saya ping deh ke yahoo akhirnya berhasil... nah tinggal saya install monetdb nya... pas instalasi... kok errrooorrrr !!!! ternyata dia minta update kernel menjadi yang versi generic nya gan

yawdh,,,, untung udah ada koneksi internet,,,

jadi lakukan perintah berikut (masuk ke root user dulu, perintahnya #sudo -i ) :

#apt-cache search linux-image

nah nanti ada banyak pilihan kernel tuh , kalian pilih aja kernel linux-image-2.6.31-16 generic , lalu lakukan perintah ini :

#apt-get install linux-image-2.6.31-16-generic

#apt-get update

nah.... udah ini tuh nunggu lagi, llluuaaammmaaaa bbggtttzzz...... bisa sambil tidur deh ... zzzz......

klo udah seleseai , reboot komputermu , dengan masukan perintah ini :

#init 6

, klo udah reboot, login lalu lakukan perintah #uname -a , klo update kernel berhasil maka ubuntu kamu berubah jadi versi baru deh, jadi
linux ubuntuserver 2.6.31-16-generic #53-Ubuntu...

sekarang kita masuk ke dalam instalassi monetdb nya..

ok.. pertama-tama lakukan perintah ini :

Bikin file baru pada direktori /etc/apt/sources.list.d dengan nama monetdb.list , caranya :

# vi /etc/apt/sources.list.d/monetdb.list

masuk ke dalam file nya, lalu inputkan teks berikut ini :
deb http://dev.monetdb.org/downloads/deb/ karmic monetdb
deb-src http://dev.monetdb.org/downloads/deb/ karmic monetdb

simpan filenya , jika udah , yang harus kalian lakukan
adalah download GPG Public Key nya dengan masukan perinta:

# wget --output-document=- http://dev.monetdb.org/downloads
/MonetDB-GPG-KEY | apt-key add -

lalu , lakukan perintah ini : #apt-get update nah
, masuk ke proses yang lama lagi nih... lalu ,
setelah itu tinggal tahap install
software nya ajah kita lakukan dengan memasukan perintah
sebagai berikut :

#apt-get install monetdb5-sql monetdb-client
# apt-get install monetdb-xquery monetdb-client

lalu kalau mau memasukan salah satu user ke dalam group
di dalam monet db , maka lakukan perintah ini :

#sudo usermod -a -G monetdb $USER


ok deh,,, selamat mencoba !







Senin, 15 November 2010

Konfigurasi Network Ubuntu

Namanya lagi belajar ya harus coba-coba .. ya gak.. nah... sekarang saya mau buat artikel mengenai bagaimana membuat network konfigurasi IP dan lain-lain melalui console di Ubuntu..

Ok.. langkah-langkahnya sebagai berikut :

masuk dulu ke consol ubuntu lalu ketik

sudo vi /etc/network/intervaces

kalau konfigurasinya masih pake auto , maka akan tampil seperti ini :

auto eth0
iface eth0 inet dhcp

Nah, sekarang ganti konfigurasi dengan ini nih :

# The primary network interface

auto eth0
iface eth0 inet static
address 192.168.3.90 ( Alamat IP )
gateway 192.168.3.1
( Alamat gateway)
netmask 255.255.255.0 ( Alamat netmask)
network 192.168.3.0 ( Alamat network)
broadcast 192.168.3.255 ( Alamat broadcast)


kemudian save file tersebut dengan cara ketik :wq,


kalau udah.. langkah terakhir lakukan perintah

sudo /etc/init.d/networking restart

, cek IP kalian dengan command


ifconfig -a

kalau berhasil maka eth0 IP nya akan berubah..


Thats It !



Sabtu, 06 November 2010

Instalasi ZEBRA pada UNIX


Daftar Materi :

I. Zebra (Linux Router Software)

II. SNMP / NET-SNMP (Simple Network Management Protocol)

III. MRTG (Multi Router Traffic Graph)


I. Zebra (Linux Router Software) :



Zebra is TCP/IP routing software that supports BGP-4, BGP-4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng. It is distributed under the GNU General Public License and runs on Linux as well as other UNIX variants. Zebra is included in most modern distributions as routing software. The latest version, along with documentation, is available at the GNU Zebra Web.


The original Zebra package was written by Kunihiro Ishiguro and Yoshinari Yoshikawa back in 1996. Today, the package is maintained primarily by IP Infusion -- of which Mr. Ishiguro is the CTO -- with the assistance of networking engineers and open source volunteers.

Zebra is unique in its design because it takes a modular approach to the protocols that it manages. Protocols can be enabled or disabled as network requirements dictate.


By far the most useful feature we found with Zebra was its close similarity to the Cisco IOS configuration formats. While there are some differences from IOS, the feel is close enough that network engineers already familiar with IOS will feel very comfortable in the environment.


While Zebra has not yet hit version 1.0 -- the version at the time of this writing is 0.93b -- the quality of the product is adequate for small networks that need a core router.


I.a File konfigurasi :

Konfigurasi file terdapat di file zebra.conf, untuk konfigurasi routing protocol terdapat di file rip.conf dan ospf.conf. (Terletak di /usr/local/zebra/etc).



hostname speedmetal

password zebra

enable password zebra


I.b Cara konfigurasi zebra : dengan melakukan telnet ke port 2601 :



[root@speedmetal zebra]# telnet 127.0.0.1 2601

Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is '^]'.


Hello, this is zebra (version 0.93b).

Copyright 1996-2002 Kunihiro Ishiguro.


User Access Verification


Password: zebra

speedmetal> enable

Password: zebra

speedmetal# ?

  configure  Configuration from vty interface

  copy       Copy configuration

  debug      Debugging functions (see also 'undebug')

  disable    Turn off privileged mode command

  end        End current mode and change to enable mode.

  exit       Exit current mode and down to previous mode

  help       Description of the interactive help system

  list       Print command list

  no         Negate a command or set its defaults

  quit       Exit current mode and down to previous mode

  show       Show running system information

  terminal   Set terminal line parameters

  who        Display who is on vty

  write      Write running configuration to memory, network, or terminal

speedmetal#


I.c Installasi Zebra.

- Unpack source : gunzip dan tar –xvf

- Konfigurasi dengan :


#./configure –prefix=/usr/local/zebra –enable-snmp

# make

# make install

# make clean

  • Pindah ke direktori /usr/local/zebra/etc
  • Kopi zebra.conf.example menjadi zebra.conf, edit jika diperlukan.
  • Pindah ke direktori /usr/local/zebra/sbin
  • Jalankan Zebra dengan :


#./zebra&

  • Lakukan telnet ke local :



I.d Konfigurasi dengan MRLG (Multi Router Looking Glass) :



The Multi-Router Looking Glass, or MRLG, written by John Frazier of EnterZone, is a Web-based utility that can be used to display the interfaces and routes recognized by Zebra. MRLG is really nothing more than a Web interface to the Zebra shell with a limited set of commands, but in the course of our testing, we found it to be a quick and useful way to display routes. So, before getting to the configuration of the Zebra protocols, we'll show you how we installed it.

  • Unpack source : Gunzip dan tar –xvf
  • Jalankan perintah :

# perl MakeFile.PL

# make

# make test

# make install

  • Pindah ke direktori source Zebra : /tmp/zebra-0.94/tools/
  • Kopikan file mrlg.cgi ke /var/www/cgi-bin.
  • Modifikan file mrlg.cgi:

    a. Baris ke 36 :


$url="http://www.sample.com/mrlg.cgi";

to:

$url="http://127.0.0.1/cgi-bin/mrlg.cgi";


b. Baris ke 168 dan 174 :



if ($Form{'router'} eq 'router1')

        {

$server = '127.0.0.1';

$login_pass = 'zebra';

$bgpd = "2605";

$zebra = "2601";

$full_tables=1;



I.e Lab. Simulation (RIP)




Konfigurasi Router C :

  • set dummy interface :

# modprobe dummy
# ifconfig dummy0


  • Konfigurasi IP :


User Access Verification


Password: zebra

speedmetal> enable

Password: zebra

speedmetal# configure terminal

speedmetal(config)# interface eth0

speedmetal(config-if)# ip address 192.168.2.1/30

speedmetal(config-if)# quit

speedmetal(config)# interface eth1

speedmetal(config-if)# ip address 192.168.1.1/30

speedmetal(config-if)# quit

speedmetal(config)# interface dummy0

speedmetal(config-if)# ip address 10.0.2.1/24

speedmetal(config-if)# write

Configuration saved to /etc/zebra/zebra.conf

speedmetal(config-if)# end

speedmetal# show run


Current configuration:

!

hostname speedmetal

password zebra

enable password zebra

!

interface lo

!

interface eth0

 ip address 192.168.2.1/30

!

interface dummy0

 ip address 10.0.2.1/24

!

interface eth1

 ip address 192.168.1.1/30

!

!

line vty

!

end


  • Set RIP protocol :

a. Set rip konfigurasi /usr/local/zebra/etc, kopikan rip.conf.example menjadi rip.conf.

b. Jalankan rip service di /usr/local/zebra/sbin/ : #>./ripd&

c. Konfigurasi RIP :

User Access Verification


Password: zebra

speedmetal-rip> enable

Password: zebra

speedmetal-rip# configure terminal

speedmetal-rip(config)# router rip

speedmetal-rip(config-router)# network 10.0.0.0/8

speedmetal-rip(config-router)# network 192.168.0.0/16

speedmetal-rip(config-router)# end

speedmetal-rip# show run


Current configuration:

!

hostname speedmetal-rip

password zebra

enable password zebra

!

interface lo

!

interface eth0

!

interface dummy0

!

router rip

 network 0.0.0.0/0

 network 192.168.0.0/16

!

line vty

!

end

speedmetal-rip# write

Configuration saved to /etc/zebra/ripd.conf

speedmetal-rip#


Konfigurasi Router A :

  • set dummy interface :

# modprobe dummy
# ifconfig dummy0


  • Konfigurasi IP :


User Access Verification


Password: zebra

speedmetal> enable

Password: zebra

speedmetal# configure terminal

speedmetal(config)# interface eth0

speedmetal(config-if)# ip address 192.168.2.2/30

speedmetal(config-if)# quit

speedmetal(config)# interface eth1

speedmetal(config-if)# ip address 192.168.0.1/30

speedmetal(config-if)# quit

speedmetal(config)# interface dummy0

speedmetal(config-if)# ip address 10.0.0.1/24

speedmetal(config-if)# write

Configuration saved to /etc/zebra/zebra.conf

speedmetal(config-if)# end

speedmetal# show run


Current configuration:

!

hostname speedmetal

password zebra

enable password zebra

!

interface lo

!

interface eth0

 ip address 192.168.2.2/30

!

interface dummy0

 ip address 10.0.0.1/24

!

interface eth1

 ip address 192.168.0.1/30

!

!

line vty

!

end


  • Set RIP protocol :

a. Set rip konfigurasi /usr/local/zebra/etc, kopikan rip.conf.example menjadi rip.conf.

b. Jalankan rip service di /usr/local/zebra/sbin/ : #>./ripd&

c. Konfigurasi RIP :

User Access Verification


Password: zebra

speedmetal-rip> enable

Password: zebra

speedmetal-rip# configure terminal

speedmetal-rip(config)# router rip

speedmetal-rip(config-router)# network 10.0.0.0/8

speedmetal-rip(config-router)# network 192.168.0.0/16

speedmetal-rip(config-router)# end

speedmetal-rip# show run


Current configuration:

!

hostname speedmetal-rip

password zebra

enable password zebra

!

interface lo

!

interface eth0

!

interface dummy0

!

router rip

 network 0.0.0.0/0

 network 192.168.0.0/16

!

line vty

!

end

speedmetal-rip# write

Configuration saved to /etc/zebra/ripd.conf

speedmetal-rip#


Konfigurasi Router B :

  • set dummy interface :

# modprobe dummy
# ifconfig dummy0


  • Konfigurasi IP :


User Access Verification


Password: zebra

speedmetal> enable

Password: zebra

speedmetal# configure terminal

speedmetal(config)# interface eth0

speedmetal(config-if)# ip address 192.168.0.2/30

speedmetal(config-if)# quit

speedmetal(config)# interface eth1

speedmetal(config-if)# ip address 192.168.1.2/30

speedmetal(config-if)# quit

speedmetal(config)# interface dummy0

speedmetal(config-if)# ip address 10.0.1.1/24

speedmetal(config-if)# write

Configuration saved to /etc/zebra/zebra.conf

speedmetal(config-if)# end

speedmetal# show run


Current configuration:

!

hostname speedmetal

password zebra

enable password zebra

!

interface lo

!

interface eth0

 ip address 192.168.0.2/30

!

interface dummy0

 ip address 10.0.1.1/24

!

interface eth1

 ip address 192.168.1.2/30

!

!

line vty

!

end


  • Set RIP protocol :

a. Set rip konfigurasi /usr/local/zebra/etc, kopikan rip.conf.example menjadi rip.conf.

b. Jalankan rip service di /usr/local/zebra/sbin/ : #>./ripd&

c. Konfigurasi RIP :

User Access Verification


Password: zebra

speedmetal-rip> enable

Password: zebra

speedmetal-rip# configure terminal

speedmetal-rip(config)# router rip

speedmetal-rip(config-router)# network 10.0.0.0/8

speedmetal-rip(config-router)# network 192.168.0.0/16

speedmetal-rip(config-router)# end

speedmetal-rip# show run


Current configuration:

!

hostname speedmetal-rip

password zebra

enable password zebra

!

interface lo

!

interface eth0

!

interface dummy0

!

router rip

 network 0.0.0.0/0

 network 192.168.0.0/16

!

line vty

!

end

speedmetal-rip# write

Configuration saved to /etc/zebra/ripd.conf

speedmetal-rip#


- Cek routing table Router C :


Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

       B - BGP, > - selected route, * - FIB route


R>* 10.0.0.0/24 [120/2] via 192.168.2.2, eth0, 00:11:05

R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:02:08

C>* 10.0.2.0/24 is directly connected, dummy0

K * 127.0.0.0/8 is directly connected, lo

C>* 127.0.0.0/8 is directly connected, lo

R>* 192.168.0.0/30 [120/2] via 192.168.2.2, eth0, 00:11:05

C>* 192.168.1.0/30 is directly connected, eth1

C>* 192.168.2.0/30 is directly connected, eth0


- Cek ping ke 10.0.0.1 dan 10.0.1.1

- Test router failover : matikan interface / kabel eth0 dari router A : (Tunggu > 2 menit)

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

       B - BGP, > - selected route, * - FIB route


R>* 10.0.0.0/24 [120/3] via 192.168.1.2, eth0, 00:00:26

R>* 10.0.1.0/24 [120/2] via 192.168.1.2, eth1, 00:06:02

C>* 10.0.2.0/24 is directly connected, dummy0

K * 127.0.0.0/8 is directly connected, lo

C>* 127.0.0.0/8 is directly connected, lo

R>* 192.168.0.0/30 [120/2] via 192.168.1.2, eth1, 00:00:26

C>* 192.168.1.0/30 is directly connected, eth1

C>* 192.168.2.0/30 is directly connected, eth0


  • Cek routing table router A sebelum failover :


RouterA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route


Gateway of last resort is not set


     10.0.0.0/24 is subnetted, 3 subnets

R       10.0.2.0 [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0

C       10.0.0.0 is directly connected, Loopback0

R       10.0.1.0 [120/1] via 192.168.0.2, 00:00:18, FastEthernet0/1

     192.168.0.0/30 is subnetted, 1 subnets

C       192.168.0.0 is directly connected, FastEthernet0/1

     192.168.1.0/30 is subnetted, 1 subnets

R       192.168.1.0 [120/1] via 192.168.0.2, 00:00:18, FastEthernet0/1

                    [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0

     192.168.2.0/30 is subnetted, 1 subnets

C       192.168.2.0 is directly connected, FastEthernet0/0



  • Cek routing table router A setelah failover :


RouterA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route


Gateway of last resort is not set


     10.0.0.0/24 is subnetted, 3 subnets

R       10.0.2.0 [120/2] via 192.168.0.2, 00:00:09, FastEthernet0/1

C       10.0.0.0 is directly connected, Loopback0

R       10.0.1.0 [120/1] via 192.168.0.2, 00:00:09, FastEthernet0/1

     192.168.0.0/30 is subnetted, 1 subnets

C       192.168.0.0 is directly connected, Serial0/0

     192.168.1.0/30 is subnetted, 1 subnets

R       192.168.1.0 [120/1] via 192.168.0.2, 00:00:09, FastEthernet0/1

     192.168.2.0/30 is subnetted, 1 subnets

R       192.168.2.0 [120/2] via 192.168.0.2, 00:00:10, FastEthernet0/1



I.f Lab. Simulation (OSPF)

- Matikan service RIP : kill

- Kopi konfigurasi ospf.conf.example ke ospf.conf.

- Konfigurasi dengan telnet ke port 2604

- Konfigurasi Router A/B/C :


root@speedmetal zebra]# telnet 127.0.0.1 2604

User Access Verification


Password: zebra

speedmetal-ospf> enable

Password: zebra

speedmetal-ospf# configure terminal

speedmetal-ospf(config)# router ospf

speedmetal-ospf(config-router)# network 0.0.0.0/0 area 0

speedmetal-ospf(config-router)# end

speedmetal-ospf# write

Configuration saved to /etc/zebra/ospfd.conf

speedmetal-ospf# show run


Current configuration:

!

hostname speedmetal-ospf

password zebra

enable password zebra

!

!

router ospf

 network 0.0.0.0/0 area 0

!

line vty

!

end

speedmetal-ospf#

  • Cek Routing Table :

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

       B - BGP, > - selected route, * - FIB route


O>* 10.0.0.0/32 [110/11] via 192.168.2.2, eth0, 00:00:01

O>* 10.0.1.1/32 [110/11] via 192.168.1.2, eth1, 00:02:53

O   10.0.2.0/24 [110/10] is directly connected, dummy0, 00:03:31

C>* 10.0.2.0/24 is directly connected, dummy0

K * 127.0.0.0/8 is directly connected, lo

C>* 127.0.0.0/8 is directly connected, lo

O>* 192.168.0.0/30 [110/58] via 192.168.2.2, eth0, 00:00:01

                            via 192.168.1.2, eth1, 00:00:01

O   192.168.1.0/30 [110/10] is directly connected, eth1, 00:03:21

C>* 192.168.1.0/30 is directly connected, eth1

O   192.168.2.0/30 [110/10] is directly connected, eth0, 00:03:31

C>* 192.168.2.0/30 is directly connected, eth0

  • Lakukan failover testing.



II. SNMP / NET-SNMP (Simple Network Management Protocol)

SNMP operates at the application level using TCP/IP transport-level protocols so it can ignore the underlying network hardware. This means the management software uses IP, and so can control devices on any connected network:not just those attached to its physical network. This also has disadvantages: if the IP routing is not working correctly between two devices, it's impossible to reach the target to monitor or reconfigure it.

There are two main elements in the SNMP architecture: the agent and the manager. It's a client-server architecture, where the agent is the server and the manager is the client.

The agent is a program running in each of the monitored or managed nodes of the network. It provides an interface to all the items of their configuration. These items are stored in a data structure called a management information base (MIB), which we explain later. It's the server side, as long as it maintains the information being managed and waits for commands from the client.

The manager is the software that runs in the monitoring station of the network, and its role is contacting the different agents running in the network to poll for values of its internal data. It's the client side of the communication.

There is a special command in the SNMP command set called trap that permits an agent to send unsolicited data to the manager, to inform it of events, such as errors, shutdowns, etc.

In essence, SNMP is a very simple protocol as long as all the operations it performs deal with the fetch-and-store paradigm, and this allows for a small commands set. A manager can perform only two different operations on an agent: request or set the value of a variable in the MIB of the agent. These two operations are known as get-request and set-request. There's a command to respond to a get-request called get-response, which is used only by the agent.

The extensibility of the protocol is directly related to the capability of the MIB to store new items. If a manufacturer wants to add some new commands to a device such as a router, he must add the appropriate variables to its database (MIB).

Almost all manufacturers implement versions of SNMP agents in their devices: routers, hubs, operating systems, and so on. Linux is not an exception to this, and publicly available SNMP agents for Linux can be found on the Internet.


Software SNMP di linux :

  • cmu-snmp
  • net-snmp untuk Zebra


II.a.1 Installasi cmu-snmp

# gunzip cmu-snmp-linux-3.2-bin.tar.gz

# tar xvf cmu-snmp-linux-3.2-bin.tar

# /tmp/cmu-snmp-linux-3.2/etc/installconf -mini

# /usr/sbin/snmpd -f ; echo 'starting snmpd'


a.2 SNMP Tools :

  • /usr/bin/snmpget A tool designed to ask for a concrete value in the MIB of an agent in the network (a router, a hub, etc.)
  • /usr/bin/snmpgetnext It allows you to get the next object in an MIB tree without knowing its name.
  • /usr/bin/snmpset A tool to set values in remote agents
  • /usr/bin/snmpwalk Tool that requests a complete object or series of objects without having to specify the exact instance. It's useful for requesting table objects.
  • /usr/bin/snmpnetstat
  • /usr/bin/snmptrapd Daemon that listens for traps sent by agents
  • /usr/bin/snmptest Interactive tool designed to demonstrate the capacities of the API.


a.3 Testing :

# /usr/bin/snmpget -v 1 localhost public interfaces.ifNumber.0

# /usr/bin/snmpwalk -v 1 localhost public system

Hasil :

dragon:~$ /usr/bin/snmpwalk


usage: snmpwalk [-p ] host community [object-id]


dragon:~$ /usr/bin/snmpwalk  localhost public system


system.sysDescr.0 = "Linux version 2.0.24 (root@dragon)

                     (gcc version 2.7.2) #6 Mon Nov 25 15:08:40 MET 1996"

system.sysObjectID.0 = OID: enterprises.tubs.ibr.linuxMIB

system.sysUpTime.0 = Timeticks: (39748002) 4 days, 14:24:40

system.sysContact.0 = "David Guerrero"

system.sysName.0 = "dragon "

system.sysLocation.0 = "Madrid (SPAIN)"

system.sysServices.0 = 72

system.sysORLastChange.0 = Timeticks: (39748006) 4 days, 14:24:40

system.sysORTable.sysOREntry.sysORID.1 = OID: enterprises.tubs.ibr.linuxMIB.linuxAgents.1

system.sysORTable.sysOREntry.sysORDescr.1 = "LINUX agent"

system.sysORTable.sysOREntry.sysORUpTime.1 = Timeticks: (39748007) 4 days, 14:24:40


dragon:~$


II.b.1 Installasi net-snmp

  • Unpack soure : tar
  • Kompile :

# configure --with-mib-modules=smux

# make

# make install

  • Konfigurasi file /usr/local/share/snmp/snmpd.conf

# smuxpeer 1.3.6.1.6.3.1 test




III. MRTG (Multi Router Traffic Graph)

MRTG is an advanced tool written by Tobias Oetiker and Dave Rand to graphically represent the data SNMP agents brings to SNMP managers. It generates nice HTML pages with GIF graphics about inbound and outbound traffic in network interfaces in almost real time. This abstracts the idea of dealing directly with objects of an MIB with a command line tool like CMU-SNMP. This is the simplest and most powerful tool to monitor my routers I have found on the Internet.

MRTG uses an SNMP implementation coded entirely in Perl, so there is no need to install other packages. The main program is written in C to speed up the logging process and the generation of GIF images. The graphics are generated with the help of the GD library from Thomas Boutell, author of the WWW FAQ.

One of the highlights of MRTG is its expandability and powerful configuration. It's very easy to monitor any SNMP variables instead of traffic, like error packets, system load, modem availability and others. It's even possible to import data from an external program to feed the data, so you can use it to monitor login sessions and other information not available through SNMP.


III.a Installasi

  • Konfigurasi Zlib :

gunzip -c zlib-*.tar.gz | tar xf -

rm zlib-*.tar.gz

mv zlib-* zlib

cd zlib

./configure

make

cd ..

  • Konfigurasi libpng :

gunzip -c libpng-*.tar.gz |tar xf -

rm libpng-*.tar.gz

mv libpng-* libpng

cd libpng

make -f scripts/makefile.std CC=gcc ZLIBLIB=../zlib ZLIBINC=../zlib

rm *.so.* *.so

cd ..


- Konfigurasi gd : (2.0.11) :

gunzip -c gd-2.0.11.tar.gz |tar xf -

mv gd-2.0.11 gd

cd gd

env CPPFLAGS="-I../zlib -I../libpng" LDFLAGS="-L../zlib -L../libpng" ./configure --disable-shared \

--without-freetype --without-jpeg

make

cp .libs/* .


- Konfigurasi MRTG :


cd /usr/local/src

gunzip -c mrtg-2.14.3.tar.gz | tar xvf -

cd mrtg-2.14.3


  • Kompile MRTG :

./configure --prefix=/usr/local/mrtg-2

Atau

./configure --prefix=/usr/local/mrtg-2 \

--with-gd=/usr/local/src/gd \

--with-z=/usr/local/src/zlib \

--with-png=/usr/local/src/libpng


# make

# make install


  • Setting mrtg.cfg :

# cfgmaker public@192.168.233.1 > mrtg.cfg

# ./mrtg mrtg.cfg

# indexmaker mrtg.cfg > /usr/local/web/mrtg/index.html


  • Setting Schedule :

# crontab –e

*/5 * * * * <mrtg-bin>/mrtg <path to mrtg-cfg>/mrtg.cfg \

--logging /var/log/mrtg.log




===== Selesai =====