Oct
02

Introduction- cPanel is one of the leading control panel for Web hosting Server. I am using cPanel since last two years. Some time back I have installed cPanel on my Ubuntu 6.06 server for development purpose. You can installed demo version of cPanel Server , for download and more information please click here… go to “Download and Try” section near bottom.

What Happen? – Some day the public IP address assign to my cPanel server was changed due to external factor and I found new error in cPanel Server, This happened with me long time back I think before 9 to 10 months back!!

Reason – As it was demo version of cPanel Server, infact the cPanel stores the license copy issued to user as per there public IP address. If that IP address or hostname is changed you need to update the license with following commands. Still your you stuck with problem please contact to cPanel support!!

root@cpanel.arunbagul.com:~# /usr/local/cpanel/cpkeyclt

…….

root@cpanel.arunbagul.com:~#

Thank you,

Arun Bagul

(2) Comments    Read More   
Aug
30
Posted on 30-08-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction – cPanel server is fully implemented in Perl language. Upgrading Perl on cPanel server is risky process. So you should be extremely careful while do this….

** How to find the Perl version on Cpanel server-

root@arunbagul:~# perl -v

This is perl, v5.8.0 built for i386-linux-thread-multi

root@arunbagul:~#

** Download latest version of Perl from cPanel site –

http://layer1.cpanel.net

** Latest version of perl available here

root@arunbagul:~# cd /usr/local/src
root@arunbagul:~#

root@arunbagul:~# wget -c http://layer1.cpanel.net/perl588installer.tar.gz
……..

root@arunbagul:~#

*** Untar the source of Perl –

root@arunbagul:~# tar xvfz perl588installer.tar.gz
…..
……..
root@arunbagul:~#

** Go to perl Folder –

root@arunbagul:~# cd perl588installer
root@arunbagul:~#

** Just run “install“…

root@arunbagul:~# ./install

…..
root@arunbagul:~#

** After Upgrading Perl, Now check the Perl version

root@arunbagul:~# perl -v

This is perl, v5.8.8 built for i686-linux

root@arunbagul:~#

** How to check if all perl modules are properly installed ?

root@arunbagul:~# /scripts/checkperlmodules
…………

root@arunbagul:~#

** Now upgrade cPanel with upcp –

root@arunbagul:~# /scripts/upcp –force

….

root@arunbagul:~#

(wait for more than 30 min?)

That’s it!!

Arun Bagul

(1) Comment    Read More   
Jul
09
Posted on 09-07-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction – After fresh installation of cPanel server, Whenever I have tried to start MySQL server, it has failed to start due to unknown reason. This is really crazy problem on cPanel!. Even you upgrade MySQL from 4.0 to latest 5.x version, MySQL server simply failed to start!! You will not find any thing in log file ie ” /var/log/mysql.log“. I have tried so many thing to find out the reason of failure. If you try this cPanel /scripts/mysqlup –force command still it won’t help you.

What is the Solution?

The solution to this crazy problem is to remove or comment out the “basedir=/var/lib” line from my.cnf configuration file of MySQL server.

root@cpanel.arunbagul:~# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
root@server42 [/var/lib]#

root@cpanel.arunbagul:~#

** Finally the /etc/my.cnf file looks like –

root@cpanel.arunbagul:~# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

root@cpanel.arunbagul:~#

** Now you can start your MySQL server on cPanel server!!

Cheers,

Arun Bagul

(0) Comments    Read More   
Jun
04
Posted on 04-06-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction to cPanel (part-2)

(0) Comments    Read More   
May
26
Posted on 26-05-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction –

In this article we will cover cPanel directory structure and configuration files –
When you install cPanel on your web Server, cPanel configuration files, setting, script, admin templates and 3rd party modules are stored in following three directories –

/usr/local/cpanel
/var/cpanel
/scripts

1) /usr/local/cpanel – This is the main directory for cPanel, most of the setting is stored here.

cpanel1

a) /usr/local/cpanel/bin –This directory contains only scripts and binaries which provide installation and configuration of many cPanel managed services…

b) /usr/local/cpanel/logs –

This directory contains access log ,error log and license log of cPanel control panel.

* Access log format –

[source address] – [username] [[date]] [status] [url] [browser agent]

root@arunbagul:~#tail -f /usr/local/cpanel/logs/access_log
127.0.0.1 – root [31/May/2006:23:11:31 -0500] “” 500 0
“https://www/cpane.net:2087/scripts/command?PFILE=main” “Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8.0.3) Gecko/20060512 Firefox/1.5.0.3”
127.0.0.1 – root [31/May/2006:23:11:31 -0500] “” 500 0
“https://www.cpanel.net:2087/scripts/command” “Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.0.3) Gecko/20060512 Firefox/1.5.0.3”
…….
……….

root@arunbagul:~#

* Error log –

root@arunbagul:~# tail -f /usr/local/cpanel/logs/error_log
Can’t locate Net/AIM/Connection.pm in @INC (@INC contains: /scripts /usr/lib/perl5/5.8.7/i686-
linux… /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /
usr/lib/perl5/site_perl/5.8.5 /usr/lib…. /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /
usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site… /usr/lib/perl5/site_perl .) at /
usr/lib/perl5/site_perl/5.8.7/Net/AIM.pm line 37.
BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.8.7/Net/AIM.pm line 37.
Compilation failed in require at /scripts/cPScript/iContact.pm line 14.
BEGIN failed–compilation aborted at /scripts/cPScript/iContact.pm line 14.
Compilation failed in require at /scripts/wwwacct line 18.
BEGIN failed–compilation aborted at /scripts/wwwacct line 18.
….
…..
root@arunbagul:~#

* License log file –

root@arunbagul:~# tail -f /usr/local/cpanel/logs/license_log
License Update Request at: Wed May 13
02:16:13 2007
License Server returned: Key Accepted
License Server returned: Key Follows
License Updated Successfully
….
…..
root@arunbagul:~#

* Stat log –

root@arunbagul:~# tail -f /usr/local/cpanel/logs/stats_log
Update for config
“/home/techdump/tmp/awstats/awstats.cpanel.net.conf”
With data in log file “/usr/local/apache/domlogs/techdump.net”…
Phase 1 : First bypass old records, searching new record…
Direct access to last remembered record is out of file.
So searching it from beginning of log file…
Phase 2 : Now process new records (Flush history on disk after
20000 hosts)…
Jumped lines in file: 0
Parsed lines in file: 14
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 10 new qualified records.
…….
………

root@arunbagul:~#

cpanel2

c) /usr/local/cpanel/base –

This is the base directory for cPanel admin panel web server(apache). It also contains directory
/usr/local/cpanel/base/frontend – this directory content control pannel themes like x ,x2 , xmail, monsoon etc…

cpanelbase

d) /usr/local/cpanel/base/etc –

This directory contains conf files for cPanel admin panel, template files for FTP, HTTP, mail, zone files..

cpanelconf

e) Extra 3rd party modules for cPanel –

3rd party module which are not part of cPanel base, can be installed in /usr/local/cpanel/3rdparty directory.. like ioncube etc

cpanel3rdparty

Thank you,
Arun Bagul

(0) Comments    Read More   
May
11
Posted on 11-05-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction –

(0) Comments    Read More   
Mar
27
Posted on 27-03-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction – Many times System Admin want to transfer cPanel user account (domain) from one cPanel server to other cPanel Server. cPanel allows to do account transfer via WHM as follows… (you should have  root access to both server).

step(1) Login to WHM
step(2) then Main menu >> Transfers >> Copy multiple accounts/packages from another server

Here you need to provide the old server IP, SSH port, and root password.

That’s it!. your account will be transfer to new server…

If the above method fails due to some or other reason, you can transfer accounts manually as follows….

step(1) Take backup of the accounts using the following script –

root@arunbagul:~# /scripts/pkgacct  <account username>

This will create a backup file under /home with name cpmove-<username>.tar.gz

for example –

root@arunbagul:~# /scripts/pkgacct indgnu

….
root@arunbagul:~#

root@arunbagul:~#  ls /home/cpmove-indgnu.tar.gz

step(2) Copy(use scp) this file into the new target server where you want to migrate your account –

root@arunbagul:~# scp /home/cpmove-<username>.tar.gz root@<new server ip>:/home/
….
……
root@arunbagul:~#

step(3) Restore accounts using the following script (on new target server) –

root@arunbagul:~# /scripts/restorepkg <account username>

NOTE:- Make  sure that the account on old server is disabled or removed/suspended!!

Cheers,
Arun  Bagul

(0) Comments    Read More   

www.flickr.com
arunbagul's photos More of arunbagul's photos
Get Adobe Flash player
-->