Archive for the ‘cPanel’ Category

Server Monkey is looking for tutorial writers to join our staff. Interested applicants can send a quick introduction of themselves to apply@server-monkey.com


Download It;

wget http://downloads.ioncube.com/loader_download /ioncube_loaders_lin_x86.tar.gz
tar zfx ioncube_loaders_lin_x86.tar.gz
mv ioncube /usr/local

Find PHP.ini
php -i | grep php.ini

Edit your php.ini
pico /usr/local/lib/php.ini or nano /usr/local/lib/php.ini

Add Extension to PHP.ini
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.2.so

Restart Apache
service httpd restart

Check
php -v
PHP 5.2.10 (cli) (built: Aug 10 2009 05:47:14)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with the ionCube PHP Loader v3.1.34, Copyright (c) 2002-2009, by ionCube Ltd.
with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH


Exim Cheatsheet

posted by Mark Muyskens

While surfing the web, I discovered this great cheat sheet for troubleshoot mail issues in cPanel/DirectAdmin or any exim mail server.

You can check it out at;
http://bradthemad.org/tech/notes/exim_cheatsheet.php


cPanel and DomainKeys

posted by Mark Muyskens

Lets face it. Sending mail to some domains such as yahoo and hotmail can become a pain in the ass. Installing DomainKeys can help with the delivery of mail.

Installation on a single domain;
/usr/local/cpanel/bin/domain_keys_installer user

Where user is the user’s cPanel username
If running this command gives you an error, then your more then likely not running the latest version of cPanel or you have not converted to maildir.

Installing on all domains;
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/domain_keys_installer $i ;done

Bash script to parse all cPanel users and run the command.

Now, what about when you add new account;
Modify cPanel’s PostWWW script “/scripts/postwwwacct”
add;

my %OPTS = @ARGV;
my $user = $OPTS{’user’};
/usr/local/cpanel/bin/domain_keys_installer $user

Done.

More Info on DomainKeys; http://domainkeys.sourceforge.net/


Cpanel Script Folder

posted by Mark Muyskens

cPanel has a whole folder that contains various scripts you may run. Have you wonder what each one of them did?

  • easyapache — Upgrades and reinstalls the Apache web server.
  • phpextensionmgr — Manages PHP extensions.
  • *up — Updates a service. We currently provide the following update scripts for the services noted:
    • bandminup — Bandmin application.
    • courierup — Courier mail server.
    • cpaddonsup — cPanel’s addon scripts.
    • dovecotup — Dovecot mail server.
    • eximup — Exim mail exchanger.
    • ftpup — FTP servers (ProFTP and Pure-FTP).
    • imapup — IMAP mail server.
    • mysqlup — MySQL service.
    • nsdup — BIND nameserver.
    • phpup — Current version of PHP.
    • suphpup — SuPHP tool for handling PHP requests.
  • restartsrv_* — Restarts a service. We currently provide restart scripts for the following; simply replace the asterisk (*) in restartsrv_* with the term in bold:
    • apache — Apache web server.
    • bind — BIND nameserver software.
    • chkservd — cPanel’s AllDocumentation/AutomationIntegration.TailWatch log processing service.
    • clamd — ClamAV anti-virus software.
    • courier — Courier mail server.
    • cpdavd — cPanel’s WebDAV server.
    • cppop — cPanel’s POP server.
    • dovecot — Dovecot mail server.
    • entropychat — Entropy chat client.
    • exim — Exim mail exchanger.
    • eximstats — Exim mail statistics tracker.
    • ftpserver — FTP server.
    • httpd — Apache web server.
    • imap — IMAP server.
    • inetd — Super-server daemon for managing Internet services.
    • interchange — Interchange e-commerce software.
    • ipaliases — IP aliasing software.
    • melange — Melange chat client.
    • mysql — MySQL database server.
    • named — BIND nameserver software.
    • nsd — Open-source NSD nameserver daemon.
    • postgres — PostgresSQL database service.
    • postgresql — PostgreSQL database service.
    • proftpd — ProFTP server daemon.
    • pureftpd — Pure-FTP server daemon.
    • rsyslogd — Open-source log forwarder daemon.
    • spamd — Spam-deferral daemon.
    • sshd — Secure shell daemon.
    • syslogd — Log forwarder daemon.
    • tailwatchd — cPanel’s AllDocumentation/AutomationIntegration.TailWatch log processing service.
    • tomcat — Apache Tomcat service.
    • xinetd — Open-source super-server daemon.
  • addpop — Adds a POP account.
  • delpop — Removes a POP account.
  • wwwacct — Adds a cPanel account.
  • restorepkg — Restores an account backup or cpmove package.
  • cpbackup — Backs up all accounts.
  • pkgacct — Generates cpmove files, which contain all data for an account. This script is very useful for transferring an account.
  • upcp — Updates cPanel and WHM.
  • setupmailserver — Allows you to switch mail servers.
  • setupftpserver — Allows you to switch FTP servers.
  • setupnameserver — Allows switching between DNS servers.
  • checkperlmodules — Contains a list of standard CPAN modules to install on cPanel servers. This script is used in conjunction with realperlinstaller, below.
  • realperlinstaller — A wrapper script that automates the installation of Perl CPAN modules.
  • suspendacct — Suspends an account.
  • unsuspendacct — Unsuspends an account.
  • runweblogs — Updates statistics for a user.
  • runstatsonce — Updates statistics for all users.
  • makecppphp — Reinstalls cPanel’s internal PHP.
  • portsup — Updates ports (on FreeBSD® systems only).

Installing cPanel in 3 Quick Steps

posted by Mark Muyskens

Installing cPanel is as easy as…

1) cd /home
2) wget http://layer1.cpanel.net/latest
3) sh latest

and then wait while massive text scrolls your screen!



This is caused by having root login to accounts disabled.

1) Log into WHM

2) Go into Tweak Settings

3) Uncheck “Disable login with root or reseller password into the users”

4) Save


Enabling quotas in cPanel

posted by Mark Muyskens

Have you ever had the issue where all your cPanel accounts are showing as unlimited? Well lucky you, thats an easy fix. Just turn on quotas.

1) Log into server via ssh

2) Edit /etc/fstab

pico /etc/fstab

3) Look for a line that looks like the below;

LABEL=/1 / ext3 defaults 1 1

4) Once you find that line, after the word defaults add a comma and usrquota;

LABEL=/1 / ext3 defaults,usrquota 1 1

5) Save and exit

6) Remount;

mount -o remount /

7) Now run the cPanel script to fix quotas;

/scripts/fixquotas