Hey, here is a list of commands for cPanel. Note that this is for SSH

Restart chkservd:

CODE
/etc/init.d/chkservd restart


Tail Apache log:

CODE
tail -f /usr/local/apache/logs/error_log


Updates the cpanel server software:

CODE
/scripts/upcp


Reinstalls exim:

CODE
/scripts/exim4


View traffic or if you think a site is being DDoS:

CODE
cd /usr/local/apache/domlogs
tail -f targetsite.com



Correct bandwidth issues

CODE
/scripts/cleanbw


To fix problem in webalizer that stop updating stats


CODE
/scripts/fixwebalizer


Fix everything


CODE
/scripts/fixcommonproblems
/scripts/fixeverything




Fixing Mail List MailMan

CODE
/usr/local/cpanel/bin/convertmailman2




Reinstall MailMan

CODE
/scripts/reinstallmailman


CODE
/scripts/fixhome


CODE
pico /etc/my.cnf



Edit php.ini (may be in a differant place if you have Zend installed)

CODE
pico /usr/local/lib/php.ini



Edit Apache Conf

CODE
pico /etc/httpd/conf/httpd.conf



Checking Real Time Top Processes Login to SSH and run

CODE
top



Run cpanel backup

CODE
/scripts/cpbackup



To try and fix domain controller

CODE
/scripts/fixndc


Quotas

CODE
/scripts/initquotas - takes a while to run
/scripts/resetquotas
/scripts/fixquotas - takes a while to run


Add a Dns Entry


CODE
/scripts/adddns



Install Frontpage Mail Exts

CODE
/scripts/addfpmail


Add JavaServlets to an account (jsp plugin required)

CODE
/scripts/addservlets


Add a User

CODE
/scripts/adduser


Run WHM Lite

CODE
/scripts/admin


Add Rlimits (cpu and mem limits) to apache

CODE
/scripts/apachelimits


Resync with a master DNS Server

CODE
/scripts/dnstransfer


Edit A User's Quota

CODE
/scripts/editquota


Search For Trojans in /dev

CODE
/scripts/finddev


Locate Trojan Horses

CODE
/scripts/findtrojans


Suggest Usage

CODE
/scripts/findtrojans > /var/log/trojans


CODE
/scripts/fixtrojans /var/log/trojans


Make Interchange work with suexec

CODE
/scripts/fixcartwithsuexec


Fix Most Problems with Interchange

CODE
/scripts/fixinterchange


Run on a trojans horse file created by findtrojans to remove them

CODE
/scripts/fixtrojans


Run this if a user's stats stop working

CODE
/scripts/fixwebalizer


Fix a broken valias file

CODE
/scripts/fixvaliases


Turn on DMA and 32bit IDE hard drive access (once per boot)

CODE
/scripts/hdparamify


Re-scan quotas. Usually fixes Disk space display problems

CODE
/scripts/initquotas


Turn on SUEXEC (probably a bad idea)

CODE
/scripts/initsuexec


Display Ipusage Report

CODE
/scripts/ipusage


Terminate an Account

CODE
/scripts/killacct


Delete "Security Problem Infested RPMS"

CODE
/scripts/killbadrpms


Fix Various Mail Permission Problems

CODE
/scripts/mailperm


Attempt to Troubleshoot a Mail Problem

CODE
/scripts/mailtroubleshoot


Change a Mysql Password

CODE
/scripts/mysqlpasswd


Kill Potential Security Problem Services

CODE
/scripts/quicksecure


Rebuild Ip Address Pool

CODE
/scripts/rebuildippool


Delete Nasty SSL entry in apache default httpd.conf

CODE
/scripts/remdefssl


Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)

CODE
/scripts/restartsrv?? (example: /scripts/restartsrv httpd)


Syncup Security Updates from RedHat/Mandrake

CODE
/scripts/rpmup


Force a webalizer/analog update

CODE
/scripts/runlogsnow


Remove non-important suid binaries

CODE
/scripts/secureit


Install Frontpage 4+ on an account

CODE
/scripts/setupfp4


Return a Simple process list. Useful for finding where cgi scripts are running from

CODE
/scripts/simpleps


Suspend an account

CODE
/scripts/suspendacct


Syncup Cpanel RPM Updates

CODE
/scripts/sysup


Unblock an IP

CODE
/scripts/unblockip


UnSuspend an account

CODE
/scripts/unsuspendacct


Update Cpanel

CODE
/scripts/upcp


Update /scripts

CODE
/scripts/updatenow


Create a New Account

CODE
/scripts/wwwacct


Awstats to run manually

CODE
/scripts/runweblogs account_username


License Not working

rdate -s rdate.darkorb.net

Sometimes such behavior of apache/httpd (taking more and more memory until it dies or crashes the server) can be caused by corrupted MySQL database. Try to do the following:
1) Kill the mysql server
CODE
/etc/rc.d/init.d/mysql stop


2) Repair all SQL databases:
CODE
myisamchk -r /var/lib/mysql/*/*.MYI


3) Start mysql again:
CODE
/etc/rc.d/init.d/mysql start


-------------------------------------------------------------------------------

Restarting cpanel

CODE
/etc/rc.d/init.d/cpanel restart


To run your clients stats now

CODE
/scripts/runlogsnow


Restart the background proccess that runs the stats for your clients

CODE
/usr/local/cpanel/startup


To run your clients stats now

CODE
/scripts/runstatsonce


To run one clients stats:

CODE
/scripts/runweblogsnow username


Shut down http

CODE
httpd stop


Start http with SSL

CODE
httpd startssl


Start http

CODE
httpd start


CODE
/scripts/runweblogs




View the full article