cPanel Commands to run from SSH

Status
Not open for further replies.

Bharat

Active Member
2,003
2010
841
340
I thought these commands will be useful so just posted :)

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

/scripts/fixhome

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

/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

Code:
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

Thanks ;)
 
4 comments
Status
Not open for further replies.
Back
Top