You are on page 1of 3

clearos.txt route di linux : List route : route -n tambah route contoh : route add -net 192.168.2.0 netmask 255.255.255.

0 gw 10.10.10.14(mikrotik ) del route contoh : route del -net 192.168.2.0 netmask 255.255.255.0 gw 10.10.10.14(mikrotik ) Supaya restart route tidak hilang simpan ke file boot : /etc/rc.local : #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local route add -net 192.168.2.0 netmask 255.255.255.0 gw 10.10.10.14 How to configure a static ip in Linux: [root@baboo]# cd /etc/sysconfig/network-scripts/ [root@baboo]# vi ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPADDR=192.168.0.100 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 HWADDR=00:0F:22:71:0A:53 USERCTL=no USERCTL=no If you want to switch back to DHCP: vi ifcfg-eth0: DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:0F:20:71:0A:50 ONBOOT=yes TYPE=Ethernet DHCP_HOSTNAME=klmdrpdr01p.klm1.netcel360.com Restart your interface: [root@baboo]#ifdown eth0 [root@baboo]#ifup eth0 update your dns server settings: [root@baboo]# vi /etc/resolv.conf: search example.com nameserver 192.168.0.5 nameserver 192.168.0.6 255.255.255.0 .. .128 = /25 .. .192 = /26 .. .224 = /27 .. .240 = /28 .. .248 = /29 .. .252 = /30 .. .254 = /31 .. .255 = /32 = /24 -> 254 host -> 128 host -> 64 host -> 32 host -> 16 host -> 8 host -> 4 host -> 2 host -> 1 host

rpm --import ftp://timburgess.net/RPM-GPG-KEY-TimB.txt wget ftp://timburgess.net/repo/clearos/5.2/os/timb-release-1-0.noarch.rpm rpm -Kv timb-release-1-0.noarch.rpm rpm -Uvh timb-release-1-0.noarch.rpm Page 1

clearos.txt yum --enablerepo=timb install app-backuppc OR upgrade to a newer version by running Code: yum --enablerepo=timb upgrade BackupPC yum --enablerepo=timb install app-livelogs yum --enablerepo=timb install app-smart yum install mc # wget ftp://starlane.gotdns.org/app-livelogs-5.1-6.i386.rpm + # rpm -Uvh app-livelogs-5.1-6.i386.rpm # yum -y install app-firewall-advanced # yum -y install app-firewall-custom # wget ftp://starlane.gotdns.org/app-bandwidth-monitor-5.1-6.i386.rpm ftp://starlane.gotdns.org/app-network-scanning-5.1-1.i386.rpm folder di set ke group: chgrp [nama_grup] [nama_folder] -R agar folder yang terdapat dibawah folder utama juga akan dimasukkan dalam grup folder chgrp -R produksi produksi folder di set ke user: chown [nama_user[ [nama_folder] -R agar folder yang terdapat dibawah folder utama juga akan dimasukkan dalam ownership chown -R mamat produksi folder di set sesuai aturan 4+2+1 -R 750 [nama_folder] opsi -R berarti Rekursif, maksudnya perubahan ini juga diterapkan pada folder yang terdapat dibawahnya. chmod 750 berarti : owner mempunyai akses full (baca/tulis/eksekusi), group mempunyai akses baca dan eksekusi saja, sedangkan user lain diluar grup/owner tidak memiliki akses. chmod -R 750 produksi cp - copy files and directories mv - move or rename files and directories rm - remove files and directories mkdir - create directories cd /. : untuk ke top direktori shutdown / restart poweroff reboot shutdown -p +15 sudo shutdown -h +15 sudo shutdown -P +15 sudo shutdown -h 01:00 sudo shutdown -r 6 Install crontab : sudo apt-get install cron Crontab : crontab -e : buat crontab baru ..contoh : 0 16 * * * poweroff hari jam 4 ) 0 12 * * 6 poweroff hari sabtu jam 4 ) crontab -l : liat daftar crontab vi command :wq Page 2 ( shutdown setiap ( shutdown setiap

clearos.txt :q

* * * * * command to be executed 5 bintang (*) diatas merepresentasikan bagian2 format tanggal yang berbeda, urutannya sebagai berikut : 1. (* pertama) : menit (isian : 0 59) 2. (* kedua) : jam (isian : 0 23) 3. (* ketiga) : hari dari bulan / tanggal (isian : 1 31) 4. (* keempat) : bulan (isian : 1 12) 5. (* kelima) : hari dari minggu (isian : 0 6) > 0 = minggu

Perintah untuk cek freespace : df -h du -ch cek ram : # cat /proc/meminfo | head -n 1 / cek ram yg sdg di gunakan : #free -m

Page 3