-->

Optimisi server VPS di kloxo

9:55 AM
Oke setelah install kloxo di centos. Sekarang cara mengoptimalkan penggunaan RAM di VPS karena VPS sendiri dibatasi oleh RAM dan bandwith, apalagi setelah install kloxo dijamin penggunaan RAM anda akan meningkat tajam..

Berikut ini cara optimasi RAM VPS yang menggunakan kloxo.
1. Optimasi mysql di VPS
Biasa login putty dengan akses root. Ketik kode berikut:
# nano /etc/my.cnf

kemudian tambahkan command berikit di bawah [mysqld]

skip-bdb
skip-innodb

ctrl+x pilih y enter

Lalu restart mysql
# service mysqld restart

2. Kemudian login ke kloxo panel sebagai admin masuk Server : linux->switch program, ganti Dns yang semula Bind jadi djbdns, Spam yang spamassasin jadi bogofilter, kalo mau super ringan lagi ganti apache dengan lighttpd.

3. Ubah kloxo awstats dengan webalizer untuk menghemat memori.
Untuk mengubahnya, login ke admin Kloxo Anda dengan username admin.
Di dalam Kloxo, Anda akan menemukan "General Setting". Di dalam Anda dapat mengubah Web Statistisc Program bentuk awstats untuk Webalizer. Itu saja. Restart server Kloxo, dan sekarang web statistik and telah berubah menjadi Webalizer.

4. Setting firewall
Ketikkan kode berikut:
# nano /etc/fw

Lalu kopas kode berikut ke nano tadi
# Clear rules
iptables -t filter -F
iptables -t filter -X
echo - Clear rules : [OK]

# SSH In
iptables -t filter -A INPUT -p tcp --dport 8 -j ACCEPT
echo - SSH : [OK]

# Don't break established connections
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
echo - established connections : [OK]

# Block all connections by default
iptables -t filter -P INPUT DROP
iptables -t filter -P FORWARD DROP
iptables -t filter -P OUTPUT DROP
echo - Block all connections : [OK]

# Loopback
iptables -t filter -A INPUT -i lo -j ACCEPT
iptables -t filter -A OUTPUT -o lo -j ACCEPT
echo - Loopback : [OK]

# ICMP (Ping)
iptables -t filter -A INPUT -p icmp -j ACCEPT
iptables -t filter -A OUTPUT -p icmp -j ACCEPT
echo - PING : [OK]

# DNS In/Out
iptables -t filter -A OUTPUT -p tcp --dport 53 -j ACCEPT
iptables -t filter -A OUTPUT -p udp --dport 53 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 53 -j ACCEPT
echo - DNS : [OK]

# NTP Out
iptables -t filter -A OUTPUT -p udp --dport 123 -j ACCEPT
echo - NTP : [OK]

# FTP Out
iptables -t filter -A OUTPUT -p tcp --dport 20:21 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 30000:50000 -j ACCEPT
# FTP In
iptables -t filter -A INPUT -p tcp --dport 20:21 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 30000:50000 -j ACCEPT
iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo - FTP : [OK]

# HTTP + HTTPS Out
iptables -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT
# HTTP + HTTPS In
iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
echo - HTTP/HTTPS : [OK]

# Mail SMTP:25
iptables -t filter -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 25 -j ACCEPT
echo - SMTP : [OK]

# Mail POP3:110
iptables -t filter -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 110 -j ACCEPT
echo - POP : [OK]

# Mail IMAP:143
iptables -t filter -A INPUT -p tcp --dport 143 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 143 -j ACCEPT
echo - IMAP : [OK]

# Kloxo
iptables -t filter -A INPUT -p tcp --dport 7777:7778 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 7777:7778 -j ACCEPT
echo - Kloxo : [OK]

echo - Firewall : [OK]

#save iptables
service iptables save

echo - Firewall Saved : [OK]

#restart firewall
service iptables restart

echo - Firewall restarted : [OK]

port ssh disesuaikan dengan port ssh ente

Lalu ketikkan satu per satu kode berikut:
# cd /tmp
# ./fw

Masih berlanjut bro artikelnya... santai dulu sambil menikmati kopi ngoprek VPS... :D