Knowledge Base

cPanel SSH Commands List

List of commands for cPanel. Note that this is for SSH. 

Restart chkservd:
/etc/init.d/chkservd restart
Tail Apache log:
tail -f /usr/local/apache/logs/error_log
Updates the cpanel server software:
Reinstalls exim:
View traffic or if you think a site is being DDoS:
cd /usr/local/apache/domlogs
tail -f
Correct bandwidth issues
To fix problem in webalizer that stop updating stats
Fix everything
Fixing Mail List MailMan
Reinstall MailMan
pico /etc/my.cnf
Edit php.ini (may be in a differant place if you have Zend installed)
pico /usr/local/lib/php.ini
Edit Apache Conf
pico /etc/httpd/conf/httpd.conf
Checking Real Time Top Processes Login to SSH and run
Run cpanel backup
To try and fix domain controller
/scripts/initquotas - takes a while to run
/scripts/fixquotas - takes a while to run
Add a Dns Entry
Install Frontpage Mail Exts
Add JavaServlets to an account (jsp plugin required)
Add a User
Run WHM Lite
Add Rlimits (cpu and mem limits) to apache
Resync with a master DNS Server
Edit A User's Quota
Search For Trojans in /dev
Locate Trojan Horses
Suggest Usage
/scripts/findtrojans > /var/log/trojans
/scripts/fixtrojans /var/log/trojans
Make Interchange work with suexec
Fix Most Problems with Interchange
Run on a trojans horse file created by findtrojans to remove them
Run this if a user's stats stop working
Fix a broken valias file
Turn on DMA and 32bit IDE hard drive access (once per boot)
Re-scan quotas. Usually fixes Disk space display problems
Turn on SUEXEC (probably a bad idea)
Display Ipusage Report
Terminate an Account
Delete "Security Problem Infested RPMS"
Fix Various Mail Permission Problems
Attempt to Troubleshoot a Mail Problem
Change a Mysql Password
Kill Potential Security Problem Services
Rebuild Ip Address Pool
Delete Nasty SSL entry in apache default httpd.conf
Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)
/scripts/restartsrv?? (example: /scripts/restartsrv httpd)
Syncup Security Updates from RedHat/Mandrake
Force a webalizer/analog update
Remove non-important suid binaries
Install Frontpage 4+ on an account
Return a Simple process list. Useful for finding where cgi scripts are running from
Suspend an account
Syncup Cpanel RPM Updates
Unblock an IP
UnSuspend an account
Update Cpanel
Update /scripts
Create a New Account
Awstats to run manually
/scripts/runweblogs account_username
License Not working
rdate -s
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
/etc/rc.d/init.d/mysql stop
2) Repair all SQL databases:
myisamchk -r /var/lib/mysql/*/*.MYI
3) Start mysql again:
/etc/rc.d/init.d/mysql start
Restarting cpanel
/etc/rc.d/init.d/cpanel restart
To run your clients stats now
Restart the background proccess that runs the stats for your clients
To run your clients stats now
To run one clients stats:
/scripts/runweblogsnow username
Shut down http
httpd stop
Start http with SSL
httpd startssl
Start http
httpd start
Please rate this article to help us improve our Knowledge Base.

0 0