Category Archives: Cpanel
Find where disk space is being used
If you’re running low on space, you can use the following commands to track down the larger users of space on the server. The following command will display all files and folders sorted by MegaBytes. cd /home; du –max-depth=1 | sort -n | awk ‘BEGIN {OFMT = “%.0f”} {print $1/1024,”MB”, $2}’ The following …
“Error: xz compression not available” on a WHM upgrade
When running an upgrade on WHM, if you get the error Error: xz compression not available, then you probably have the wrong epel release installed on your machine. The fix for this is simple. First run this to remove it yum remove epel-release then run this to install the proper version yum install epel-release Once …
How to backup a MySQL database via SSH
To backup a database, it is pretty easy. Here are the 2 commands I use most If you are planning on restoring this into a new empty database, then use this command. mysqldump –add-drop-table -u db_username -p db_name > mybackup.sql If you are planning on merging this backup into an existing database, then you should …
Manually adjust the number of visitors on a cPanel counter.
If you have a counter on your site using the cpanel counter script (/cgi-sys/count.cgi) and you need to adjust the number of hits that it reports, you can do so by editing the following file /var/cpanel/Counters/userid-something.dat Replace “userid” with his username, and the “something” with whatever the counter was called. Now when you got …
cPanel – IP addresses have become unbound
If you have a server that has multiple IP addresses on it, but you run an ifconfig and it shows only your primary IP address, then you need to rebind the IP addresses. The simple fix for this is to simply run: /scripts/restartsrv_ipaliases All IP’s that you have setup in the WHM should now be …
Sending mail from command line on Linux
If you need to sent a test email from a server via command line, you can use the following. This one uses PHP to send the email. Simply replace [email protected] with your own email address. php -r “mail(‘[email protected]’, ‘test’, ‘test’);” To send mail directly to the mail queue without the use of PHP, use …
Mass changes to DNS zones on a cpanel server
Let’s say you have a DNS server change, and need to update the zone records on all your domains to use the new name server “NS” records. Rather then going through each and every one of them in the WHM, you can run these 2 simple commands. cd /var/named;grep -lR ns.oldnameserver.com *.db >> fixfiles.txt for …
Common DNS syntax errors
- English Support
- 24/7 x 365
- Branded Support
- Reduced Overhead
- Linux Experts
- Friendly Staff