How to install mytop

Mytop adalah solusi open source yang membantu memantau aktivitas dan kinerja database MySQL. Untuk menginstal Mytop, pastikan bahwa instalasi berada di server yang sama dengan server MySQL.
Langkah pertama tambahkan repositori EPEL dengan perintah:
yum -y install epel-release

Kemudian install mytop dengan perintah:
yum -y install mytop

Selanjutnya buat file konfigurasi di folder root dengan perintah:
nano /root/.mytop
Read the rest of this entry »

Migrasi massal akun antar server cpanel

Step 1. Buat backup di server lama tanpa homedir, copy ke server baru dan delete backup setelah dicopy.

for x in `ls -A1 /var/cpanel/users/`; do /scripts/pkgacct --skiphomedir ${x} ; rsync -aP /home/cpmove-${x}.tar.gz -e ssh root@NEW-SERVER-IP:/home/ ; rm -f /home/cpmove-${x}.tar.gz ; done

Step 2. Lakukan restore backup di server baru
for x in `ls -A1 /home/cpmove*` ; do /scripts/restorepkg /home/${x} ; done

Step 3. Lakukan rsync folder /home dari server lama ke server baru
rsync -aP /home/ -e ssh root@NEW-SERVER-IP:/home/

That’s all folk.

modsec rule to stop xmlrpc attack

Lots of attacks are made towards WordPress XML-RPC (xmlrpc.php), which can cause a slowdown in the server. Below is the modsec rule to stop xmlrpc attack:

#Block requests to xmlrpc.php with no referring URL
SecRule REQUEST_METHOD "POST" "deny,status:401,id:5000900,chain,msg:'xmlrpc request blocked, no referer'"
SecRule &HTTP_REFERER "@eq 0" "chain"
SecRule REQUEST_URI "xmlrpc.php"