The most popular Cpanel’s scripts

Here you may find some useful cpanel’s scripts for you

Install Zend Optimizer

/scripts/installzendopt

Hostname A Entry Missing!

/scripts/fixndc then restart bind and apache

Install Cron on New Server /scripts/installrpm anacron vixie-cron ;

/etc/rc.d/init.d/crond start

To create new email account use under /scripts folder
# ./addpop
And follow the steps

# ./checkbadconf
Checks /usr/local/apache/conf/httpd.conf for bad users.

# ./fixcommonproblems
– Attempt to fix the most common problems.

# ./fixeverything
– Fix common problems and quotas.

# ./fixmysql
– Fixes problems with mySQL.

Nameserver, DNS related scripts to troubleshoot:

# ./fixnamed – Updates bind to handle many DNS zones (more than 512).
# ./fixrndc

securetmp – Adds securetmp to system startup.

Domains:

listsubdomains – List subdomains.
park – Parks a domain.
newdomains*
newdomains-sendmail*
rebuildparkeddomains*
updateuserdomains*

FrontPage:
checkfpkey – Checks for the FrontPage suid key
setupfp5 – Install FrontPage 5 (2002) installer on an account.
updatefrontpage – Updates FrontPage
fixfrontpageperm – Fix the frontpage permission issues

GD:

checkgd – Checks to see if GD is built.
cleangd – Cleans up old GD installs and reinstalls GD
installgd – Builds GD.

Zend:

installzendopt – Install zend optimzer.

ImageMagick:

checkimagemagick
cleanimagemagick
fetchimagemagick
installimagemagick

Perl:

fixperl – Symlink /usr/local/bin/perl /usr/bin/perl.
fixperlscript – Makes sure a perlscript includes all corresponding modules.
fixsuexeccgiscripts – Fix CGI scripts that are broken after suexec

Mail:

fixpop – Fix a POP account and reset password.
fixspamassassinfailedupdate – Reinstalls a failed spamassassin update.
fixvaliases
listcheck – Checks mailing lists for issues.
mailperm – Fix almost any mail permission problem.
mailscannerupdate – Updates MailScanner
mailtroubleshoot – Guided mail fix.
patcheximconf – Fixes exim.conf
reseteximtodefaults – Resets exim’s default settings.
resetimappasswds – Resets all imap passwords.

fixquotas – Fix quotas.

ftpquaotacheck – Runs quota checking for all ftp users.

Stats:
fixwebalizer – Repair a Webalizer that has stopped updating.


Logs:

fixsubdomainlogs
runstatsonce – Runs statistics (should be used from the crontab).
runweblogs – Run analog/webalizer/etc. for a user.

SSL:

gencrt – Generate a .crt and .csr file.

Database:

installpostgres – Installs PostrgeSQL.
mysqladduserdb – Create a MySQL databse and user.
mysqlconnectioncheck – Attempts to connect to MySQL, restarts SQL if necessary.
mysqldeluserdb – Delete a MySQL databse and user.
mysqlpasswd – Change MySQL password.
mysqlrpmpingtest – Checks your connection speed for downloading

Service restart:

restartsrv – Restart a service.
restartsrv_apache – Restart apache.
restartsrv_bind – Restart bind.
restartsrv_clamd – Restart clamd.
restartsrv_courier – Restart courier imap.
restartsrv_cppop – Restart cppop.
restartsrv_entropychat – Restart entropy chat.
restartsrv_exim – Restart exim.
restartsrv_eximstats – Restart exim statistics.
restartsrv_ftpserver – Restart your ftp server.
restartsrv_ftpserver~ – (INTERNAL)
restartsrv_httpd – Restart httpd.
restartsrv_imap – Restart impad.
restartsrv_inetd – Restart inetd.
restartsrv_interchange – Restart Interchange Shopping Cart.
restartsrv_melange – Restart melange chat.
restartsrv_mysql – Restart mysqld.
restartsrv_named – Restart named.
restartsrv_postgres – Restart postgresql.
restartsrv_postgresql – Restart postgresql.
restartsrv_proftpd – Restart proftpd.
restartsrv_pureftpd – Restart pure-ftpd.
restartsrv_spamd – Restart spamd.
restartsrv_sshd – Restart sshd.
restartsrv_syslogd – Restart syslogd.
restartsrv_tomcat – Restart tomcat.
restartsrv_xinetd – Restart xinetd.

To upgrade the cPanel(WHM) kindly use the script:

# ./upcp –force

Bandwidth issues

/scripts/cleanbw

/scripts/fixwebalizer (To fix problem in webalizer that stop updating stats)

/scripts/fixcommonproblems

/scripts/fixeverything

Fixing Mail List MailMan

/usr/local/cpanel/bin/convertmailman2

Reinstall MailMan

/scripts/reinstallmailman

Fix Permissions on accounts:

/scripts/fixhome

Edit mySQL conf file:

vi/etc/my.cnf

Edit php.ini:

vi/usr/local/lib/php.ini

Edit Apache Conf:

vi/etc/httpd/conf/httpd.conf

Checking Real Time Top Processes Login to SSH and run:

top

Run cpanel backup

/scripts/cpbackup

To try and fix domain controller:

/scripts/fixndc

Quotas

/scripts/initquotas – takes a while to run
/scripts/resetquotas
/scripts/fixquotas – takes a while to run

/scripts/adddns Add a Dns Entry

/scripts/addfpmail Install Frontpage Mail Exts
/scripts/addservlets Add JavaServlets to an account (jsp plugin required)
/scripts/adduser Add a User
/scripts/admin Run WHM Lite
/scripts/apachelimits Add Rlimits (cpu and mem limits) to apache.
/scripts/dnstransfer Resync with a master DNS Server
/scripts/editquota Edit A User’s Quota
/scripts/finddev Search For Trojans in /dev
/scripts/findtrojans Locate Trojan Horses

Suggest Usage

/scripts/findtrojans > /var/log/trojans

/scripts/fixtrojans /var/log/trojans
/scripts/fixcartwithsuexec Make Interchange work with suexec
/scripts/fixinterchange Fix Most Problems with Interchange
/scripts/fixtrojans Run on a trojans horse file created by findtrojans to remove them
/scripts/fixwebalizer Run this if a user’s stats stop working
/scripts/fixvaliases Fix a broken valias file
/scripts/hdparamify Turn on DMA and 32bit IDE hard drive access (once per boot)
/scripts/initquotas Re-scan quotas. Usually fixes Disk space display problems
/scripts/initsuexec Turn on SUEXEC (probably a bad idea)
/scripts/installzendopt Fetch + Install Zend Optimizer
/scripts/ipusage Display Ipusage Report
/scripts/killacct Terminate an Account
/scripts/killbadrpms Delete “Security Problem Infested RPMS”
/scripts/mailperm Fix Various Mail Permission Problems
/scripts/mailtroubleshoot Attempt to Troubleshoot a Mail Problem
/scripts/mysqlpasswd Change a Mysql Password
/scripts/quicksecure Kill Potential Security Problem Services
/scripts/rebuildippool Rebuild Ip Address Pool
/scripts/remdefssl Delete Nasty SSL entry in apache default httpd.conf
/scripts/restartsrv Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)
/scripts/rpmup Syncup Security Updates from RedHat/Mandrake
/scripts/runlogsnow Force a webalizer/analog update.
/scripts/secureit Remove non-important suid binaries
/scripts/setupfp4 Install Frontpage 4+ on an account.
/scripts/simpleps Return a Simple process list. Useful for finding where cgi scripts are running from.
/scripts/suspendacct Suspend an account
/scripts/sysup Syncup Cpanel RPM Updates
/scripts/unblockip Unblock an IP
/scripts/unsuspendacct UnSuspend an account
/scripts/upcp Update Cpanel
/scripts/updatenow Update /scripts
/scripts/wwwacct Create a New Account

/scripts/runweblogs account username for awstats to run manually

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

/etc/init.d/mysql stop

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

mysqlcheck -aro /var/lib/mysql/*/*.MYI

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

/etc/init.d/mysql start

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *