Tentang Fdisk

contoh beberapa perintah FDISK
[root@dj-avu root]# fdisk -l
[root@dj-avu root]# fdisk /dev/hda
The number of cylinders for this disk is set to 1247.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hda: 10.2 GB, 10262568960 bytes
255 heads, 63 sectors/track, 1247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        13    104391   83  Linux
/dev/hda2            14       778   6144862+  83  Linux
/dev/hda3           779      1182   3245130   83  Linux
/dev/hda4          1183      1247    522112+   f  Win95 Ext’d (LBA)
/dev/hda5          1183      1247    522081   82  Linux swap
Command (m for help):
[root@dj-avu root]# fdisk /dev/hda1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)
Command (m for help):
di linux hardisk itu di namain hardisk pertama misal
hda(atau hardisk pertama 20 giga)
hdb(atau hardisk kedua 80 giga)
jadi milik penulis hanya ada satu hardisk jadi ya hanya ada hda sehingga saya pake command
fdisk -l       <<<< atau nge list partisi
nah jika akan delete partisi setelah ketik : m khan kita tahu command2 apa saja, setelah itu kita ketik d
contoh partisi dengan nomor 3
Command (m for help): d
Partition number (1-4): 3

untuk memastikan sudah sukses delete nya kita print lagih pake perintah
Command (m for help): p
setelah itu write partisi dan quit atau dengan perintah
Command (m for help): w
setelah itu restart system dan berdoa saja semoga semua berjalan dengan lancar
thanks to paman google dan antek2nya yang telah membantu saya menjadi cupu2 suka belajar. yuuuk

Install MRTG YUUk

MRTG atau Multi Router Traffic Grapher, merupakan salah satu tools yang fungsinya merupakan
monitoring traffic in & out. MRTG di bangun oleh pemrograman bahasa Perl dan Bahasa C yang
di buat oleh Tobias Oetiker.(http://people.ee.ethz.ch/~oetiker/webtools/mrtg/)
1. Mrtg dapat diinstal jika :
a. sudah ada perl
b. APACHE / Web Server sudah terinstalasi dengan baik.
Source – source dapat diperoleh dari :
– http://people.ee.ethz.ch/~oetiker/webtools/mrtg
– Atau tanya paman google di http://www.google.com
———————————————————————————
Download source – source di bawah ini :
1. net-snmp-5.1.1.tar.gz
2. zlib-1.2.1.tar.gz
3. libpng-1.2.6.tar.gz
4. gd-2.0.32.tar.gz
5. httpd-2.0.50.tar.gz
6. mrtg-2.10.14.tar.gz
Tahap Installasi
——————————–
1. install snmp :
-[root@ardantus]#tar -zxvf net-snmp-5.1.1.tar.gz
-[root@ardantus]#mv net-snmp-5.1.1 snmp
-[root@ardantus]#./configure
-[root@ardantus]#make
-[root@ardantus]#umask 022
-[root@ardantus]#make install
-[root@ardantus]#vi /usr/local/share/snmp/snmpd.conf
———————————————————————————
com2sec public default public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public “” any noauth exact all none none
———————————————————————————
-[root@ardantus]#/usr/local/sbin/snmpd
-[root@ardantus]#netstat -pln | grep snmpd
-[root@ardantus]#snmpwalk -v 1 -c public localhost system
2. install zlib :
-[root@ardantus]#tar -zxvf zlib-1.2.1.tar.gz -[root@ardantus]#mv zlib-1.2.1 zlib
-[root@ardantus]#./configure
-[root@ardantus]#make
-[root@ardantus]#make install
3. install libpng :
-[root@ardantus]#tar -zxvf libpng-1.2.6.tar.gz
-[root@ardantus]#mv libpng-1.2.6 libpng
-[root@ardantus]#cp scripts/makefile.std makefile
-[root@ardantus]#make install
4. install gd :
-[root@ardantus]#tar -zxvf gd-2.0.32.tar.gz
-[root@ardantus]#mv gd-2.0.32 gd
-[root@ardantus]#./configure –with-libpng –with-zlib –with-jpeg
-[root@ardantus]#make
-[root@ardantus]#make install
5. install httpd :
jika httpd ini sudah ada maka tahap kelima ini bisa di lewati saja
-[root@ardantus]#tar -zxvf httpd-2.0.50.tar.gz
-[root@ardantus]#mv httpd-2.0.50 httpd
-[root@ardantus]#./configure –prefix=/usr/local/apache
-[root@ardantus]#make
-[root@ardantus]#make install
6. install mrtg :
nah saatnya kita install mrtg lets gededon
-[root@ardantus]#tar -zxvf mrtg-2.10.14.tar.gz
-[root@ardantus]#mv mrtg-2.10.14 mrtg
-[root@ardantus]#./configure –prefix=/usr/local/mrtg –with-gd=../gd –with-z=../zlib –with-png=../libpng
-[root@ardantus]#make
-[root@ardantus]#make install
B. Tahap Konfigurasi :
——————
– Kita asumsikan IP address kita adalah 192.168.0.2
– folder web server ada pada : /var/www/html/ – folder mrtg ada pada : /var/www/html/mrtg
– folder cfg ada pada : /var/www/html/mrtg/cfg
1. konfigurasi Cfgmaker untuk mrtg nya :
-[root@ardantus]#/usr/local/mrtg/bin/cfgmaker –global “WorkDir: /var/www/html/mrtg” > –global “Options[_]: growright,bits” > public@192.168.0.2 > /var/www/html/mrtg/cfg/192.168.0.2.cfg
2. konfigurasi indexmaker :
-[root@ardantus]#/usr/local/mrtg/bin/indexmaker –output=/var/www/html/mrtg/index.html > /var/www/html/mrtg/cfg/192.168.0.2.cfg
3. Let’s Start mrtg :
-[root@ardantus]#/usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/192.168.0.2.cfg
Note : kalau  ada option error coba cek message error nya.
contoh :
# export LANG=UTF-8
# echo $LANG
4. Untuk mengecek status mrtg :
-[root@ardantus]#netstat -pln | grep perl
5. tambahkan option di bawah ini ke dalam file cfg :
-[root@ardantus]#vi /var/www/html/mrtg/cfg/192.168.0.2.cfg
—————————————————– #Agar auto start
RunAsDaemon:Yes
#Agar uptodate setiap 5 menit
Interval:5
#Agar auto resfresh pada browser
Refresh:300
—————————————————–
6. Tambahkan ke menu /etc/rc.local :
-[root@ardantus]#vi /etc/rc.local
—————————————————–
rm -f /var/run/*.pid
/usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/192.168.0.2.cfg
/usr/local/sbin/snmpd
. 7. agar mrtg mereload setiap 5 menit sekali, maka masukan option ini pada crontab :
-[root@ardantus]#crontab -e */5 * * * * /usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/192.168.0.2.cfg
8. Lihat hasil mrtg pada :
http://192.168.0.2/mrtg/index.html
klo udah selesai mari senyum lebar2 tanda kita telah terpuaskan heu heu heu