EZ Linux Admin random header image

Entries from June 2010

Optimize MySQL DataBases

June 29th, 2010 by EZ linux · No Comments

If you are online then you should run: mysqlcheck mysqlcheck -o –all-databases If you are offline then you can run myisamchk which is a little more thorough. myisamchk –sort-index myisamchk -r tbl_name

Click to continue →

Tags: Linux Software / Scripts · Linux Tricks

A script to not run back ups on websites over 10 gigs in cpanel

June 23rd, 2010 by EZ linux · No Comments

To avoid sites too big from being back upped, just run this script in a weekly cron from root. #!/bin/bash max_size=”2097152″ # This is 2097152KB or 2GB for u in `ls /var/cpanel/users/`; do size=$(repquota -a | grep ${u}|awk ‘{print $3}’|sort -k 1 -nr|head -1); if [ "${size}" -ge "${max_size}" ]; then echo “${u}” >> /tmp/cpbackup-userskip.conf; [...]

Click to continue →

Tags: Cpanel and WHM

Reset default emails to fail in cpanel

June 23rd, 2010 by EZ linux · No Comments

Run each line from Root command: replace :blackhole: :fail: — /etc/valiases/* replace :blackhole :fail: — /etc/valiases/* replace blackhole: :fail: — /etc/valiases/* replace blackhole :fail: — /etc/valiases/* replace ” fail:” ” :fail:” — /etc/valiases/* replace /dev/null :fail: — /etc/valiases/* cd /etc/valiases/ grep fail * | grep -v ” :fail:”

Click to continue →

Tags: Cpanel and WHM

Reset an accounts bandwidth in CPanel

June 23rd, 2010 by EZ linux · No Comments

ssh to your server cd /var/cpanel/bandwidth.cache/ vi domainname.com delete the numbers in that file and retype 0 instead of the number save and quit and show bandwidth usage in WHM you will find its 0

Click to continue →

Tags: Cpanel and WHM