Archive

Archive for November, 2008

Email accounts quota in cpanel

November 28th, 2008

Some times cpanel may show that you exceeded quota of your email accounts, but inobox has no emails in it and you may get invalid maildir size error in exim_mainlog. In this case run the following commands tofix it.

find /home/*/mail/ -name maildirsize | xargs rm -vf

/scripts/generate_maildirsize --force --allaccounts

cPanel Help

Problem with /scripts/runweblogs

November 28th, 2008

If you get following error when you run /scripts/runweblogs on server to update webalizer stats ..

ERROR:
/usr/bin/perl: relocation error: /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so: undefined symbol: Perl_Gthr_key_ptr
/usr/bin/perl: relocation error: /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.pm: undefined symbol: Perl_Gthr_key_ptr

Solution:

Go through the following steps:

Login to server as root

cd /usr/local/src/

wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x/rrdtool-1.0.49.tar.gz

tar -zxf rrdtool-1.0.49.tar.gz

cd rrdtool*

./configure

make

make install

make site-perl-install

mv /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so.bk

cp /usr/local/src/rrdtool-1.0.49/perl-shared/blib/arch/auto/RRDs/RRDs.so /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so

mv /usr/local/cpanel/3rdparty/lib/perl/RRDs.pm /usr/local/cpanel/3rdparty/lib/perl/RRDs.pm.bk

cp /usr/local/src/rrdtool-1.0.49/perl-shared//RRDs.pm /usr/local/cpanel/3rdparty/lib/perl/RRDs.pm

Now try to run /scripts/runweblogs username

cPanel Help

Horde won’t delete emails

November 28th, 2008

Some times cleints getting following error when they are trying to delete emails in HORDE, even the account and email account disk space is not full.

There was an error moving messages from “Inbox” to “trash”. This is what the server said: [ALERT] COPY failed - no write permission or out of disk space.

Don’t waste your time by running scripts, just try the following method

- make copy of files for backup and move somewhere else
- remove mail account in Cpanel
- create exact mail account
- copy backup inbox file over new
- re-log into Horde and try delete now

cPanel Help

Structure Of Cpanel

November 28th, 2008

cPanel is a hosting automation company driven by technology and dedicated to providing the most feature rich, easy to use, practical applications. We are committed to the hosting community and our continued role as a market leader.

cPanel and WebHost Manager (WHM) combine to form a fully featured web hosting control panel system. cPanel and WHM allow you to provide an interface for both your customers and your staff.
The cPanel and WebHost Manager package includes: * cPanel - Domain Owner Control Panel
* WebHost Manager - Server Administration and Reseller Panel
* Webmail Panel - Webmail Access Panel

——————————————————————————————
Directory Structure of Cpanel
=======================

Apache
=======

/usr/local/apache
+ bin- apache binaries are stored here - httpd, apachectl, apxs
+ conf - configuration files - httpd.conf
+ cgi-bin
+ domlogs - domain log files are stored here
+ htdocs
+ include - header files
+ libexec - shared object (.so) files are stored here - libphp4.so,mod_rewrite.so
+ logs - apache logs - access_log, error_log, suexec_log
+ man - apache manual pages
+ proxy -
+ icons -

Init Script :/etc/rc.d/init.d/httpd - apache start script
Cpanel script to restart apache - /scripts/restartsrv_httpd
***************************************************

Exim
=====

Conf : /etc/exim.conf - exim main configuration file
/etc/localdomains - list of domains allowed to relay mail
Log : /var/log/exim_mainlog - incoming/outgoing mails are logged here
/var/log/exim_rejectlog - exim rejected mails are reported here
/var/log/exim_paniclog - exim errors are logged here
Mail queue: /var/spool/exim/input
Cpanel script to restart exim - /scripts/restartsrv_exim
Email forwarders and catchall address file - /etc/valiases/domainname.com
Email filters file - /etc/vfilters/domainname.com
POP user authentication file - /home/username/etc/domainname/passwd
catchall inbox - /home/username/mail/inbox
POP user inbox - /home/username/mail/domainname/popusername/inbox
POP user spambox - /home/username/mail/domainname/popusername/spam
Program : /usr/sbin/exim (suid - -rwsr-xr-x 1 root root )
Init Script: /etc/rc.d/init.d/exim
***************************************************

ProFTPD
========

Program :/usr/sbin/proftpd
Init Script :/etc/rc.d/init.d/proftpd
Conf: /etc/proftpd.conf
Log: /var/log/messages, /var/log/xferlog
FTP accounts file - /etc/proftpd/username - all ftp accounts for the domain are listed here

***************************************************

Pure-FTPD
=========
Program :/usr/sbin/proftpd
Init Script :/etc/rc.d/init.d/proftpd
Conf: /etc/proftpd.conf
Log: /var/log/messages, /var/log/xferlog
FTP accounts file - /etc/proftpd/username - all ftp accounts for the domain are listed here

***************************************************
Pure-FTPD
=========
Program : /usr/sbin/pure-ftpd
Init Script :/etc/rc.d/init.d/pure-ftpd
Conf: /etc/pure-ftpd.conf
Anonymous ftp document root - /etc/pure-ftpd/ip-address

***************************************************

Frontpage Extensions
=================

Program - (Install): /usr/local/frontpage/version5.0/bin/owsadm.exe
Uninstall and then install for re-installations
FP files are found as _vti-bin, _vti-pvt, _vti-cnf, vti-log inside the public_html

***************************************************

Mysql
=======

Program : /usr/bin/mysql
Init Script : /etc/rc.d/init.d/mysql
Conf : /etc/my.cnf, /root/.my.cnf
Data directory - /var/lib/mysql - Where all databases are stored.
Database naming convention - username_dbname (eg: john_sales)
Permissions on databases - drwx 2 mysql mysql
Socket file - /var/lib/mysql/mysql.sock, /tmp/ mysql.sock

***************************************************

SSHD
======

Program :/usr/local/sbin/sshd
Init Script :/etc/rc.d/init.d/sshd
/etc/ssh/sshd_config
Log: /var/log/messages

***************************************************

Perl
====

Program :/usr/bin/perl
Directory :/usr/lib/perl5/5.8.8/

***************************************************
PHP
====

Program :/usr/local/bin/php, /usr/bin/php
ini file: /usr/local/lib/php.ini - apache must be restarted after any change to this file
php can be recomplied using /scripts/easyapache

***************************************************

Named(BIND)
============

Program: /usr/sbin/named
Init Script: /etc/rc.d/init.d/named
/etc/named.conf
db records:/var/named/
/var/log/messages

***************************************************

Cpanel installation directory structure
=============================

/usr/local/cpanel
+ 3rdparty/ - tools like fantastico, mailman files are located here
+ addons/ - AdvancedGuestBook, phpBB etc
+ base/ - phpmyadmin, squirrelmail, skins, webmail etc
+ bin/ - cpanel binaries
+ cgi-sys/ - cgi files like cgiemail, formmail.cgi, formmail.pl etc
+ logs/ - cpanel access log and error log
+ whostmgr/ - whm related files

***************************************************

WHM related files
===============
/var/cpanel - whm files
+ bandwidth/ - rrd files of domains
+ username.accts - reseller accounts are listed in this files
+ packages - hosting packages are listed here
+ root.accts - root owned domains are listed here
+ suspended - suspended accounts are listed here
+ users/ - cpanel user file - theme, bwlimit, addon, parked, sub-domains all are listed in this files
+ zonetemplates/ - dns zone template files are taken from here

***************************************************

Common CPanel scripts
===================

cpanel/whm Scripts are located in /scripts/
+ addns - add a dns zone
+ addfpmail - Add frontpage mail extensions to all domains without them
+ addfpmail2 -Add frontpage mail extensions to all domains without them
+ addnetmaskips - Add the netmask 255.255.255.0 to all IPs that have no netmask
+ addnobodygrp - Adds the gorup nobody and activates security
+ addpop - add a pop account
+ addservlets - Add JSP support to an account (requires tomcat)
+ addstatus - (Internal use never called by user)
+ adduser - Add a user to the system
+ bandwidth - (OLD)
+ betaexim - Installs the latest version of exim
+ biglogcheck - looks for logs nearing 2 gigabytes in size
+ bsdcryptoinstall - Installs crypto on FreeBSD
+ bsdldconfig - Configures the proper lib directories in FreeBSD
+ bsdpkgpingtest - Tests the connection speed for downloading FreeBSD packages
+ buildbsdexpect - Install expect on FreeBSD
+ builddomainaddr - (OLD)
+ buildeximconf - Rebuilds exim.conf
+ buildpostgrebsd-dev - Installs postgresql on FreeBSD.
+ chcpass - change cpanel passwords
+ easyapache - recompile/upgrade apache and/or php
+ exim4 - reinstall exim and fix permissions
+ fixcommonproblems - fixes most common problems
+ fixfrontpageperm - fixes permission issues with Front Page
+ fixmailman - fixes common mailman issues
+ fixnamed - fixes common named issues
+ fixndc - fixes rndc errors with named
+ fixquotas - fixes quota problems
+ fullhordereset - resets horde database to a fresh one - all previous user data are lost
+ initquotas - initializes quotas
+ installzendopt - installs zend optimizer
+ killacct - terminate an account - make sure you take a backup of the account first
+ mailperm - fixes permission problems with inboxes
+ park - to park a domain
+ pkgacct - used to backup an account
+ restartsrv - restart script for services
+ restorepkg - restores an account from a backup file ( pkgacct file)
+ runlogsnow - update logs of all users
+ runweblogs - update stats for a particular user
+ securetmp - secures /tmp partition with options nosuexec and nosuid
+ suspendacct - suspends an account
+ unsuspendacct - unsuspends a suspended account
+ upcp - updates cpanel to the latest version
+ updatenow - updates the cpanel scripts
+ updateuserdomains - updates userdomain entries

***************************************************
Important cpanel/whm files
====================
/etc/httpd/conf/httpd.conf - apache configuration file
/etc/exim.conf - mail server configuration file
/etc/named.conf - name server (named) configuration file
/etc/proftpd.conf - proftpd server configuration file
/etc/pure-ftpd.conf - pure-ftpd server configuration file
/etc/valiases/domainname - catchall and forwarders are set here
/etc/vfilters/domainname - email filters are set here
/etc/userdomains - all domains are listed here - addons, parked,subdomains along with their usernames
/etc/localdomains - exim related file - all domains should be listed here to be able to send mails
/var/cpanel/users/username - cpanel user file
/var/cpanel/cpanel.config - cpanel configuration file ( Tweak Settings )*
/etc/cpbackup-userskip.conf -
/etc/sysconfig/network - Networking Setup*
/etc/hosts -
/var/spool/exim -
/var/spool/cron -
/etc/resolv.conf - Networking Setup–> Resolver Configuration
/etc/nameserverips - Networking Setup–> Nameserver IPs ( FOr resellers to give their nameservers )
/var/cpanel/resellers - For addpkg, etc permissions for resellers.
/etc/chkserv.d - Main >> Service Configuration >> Service Manager *
/var/run/chkservd - Main >> Server Status >> Service Status *
/var/log/dcpumon - top log process
/root/cpanel3-skel - skel directory. Eg: public_ftp, public_html. (Account Functions–>Skeleton Directory )*
/etc/wwwacct.conf - account creation defaults file in WHM (Basic cPanel/WHM Setup)*
/etc/cpupdate.conf - Update Config *
/etc/cpbackup.conf - Configure Backup*
/etc/clamav.conf - clamav (antivirus configuration file )
/etc/my.cnf - mysql configuration file
/usr/local/Zend/etc/php.ini OR /usr/local/lib/php.ini - php configuration file
/etc/ips - ip addresses on the server (except the shared ip) (IP Functions–>Show IP Address Usage )*
/etc/ipaddrpool - ip addresses which are free
/etc/ips.dnsmaster - name server ips
/var/cpanel/Counters - To get the counter of each users.
/var/cpanel/bandwidth - To get bandwith usage of domains

cPanel Tutorials

Cpanel Cron Job for taking mysql database backup

November 27th, 2008

Command for taking backup of your database..
you can take the database backup through the following cron job

0 0 * * * mysqldump -hlocalhost -uusername --password=password --opt yourdbname >
/home/username/public_html/dbdump.sql

Repalce username and passwd with your mysql database_user and passwd

The above cron job would take the backup of your database
daily at 12:00

cPanel Help

Benefits of cPanel hosting control panel

November 27th, 2008

Cpanel or popularly known as hosting control panel system is the next generation web hosting system which is currently heading the list. Cpanel is a cheap hosting control panel for linux webhosts and managed dedicated servers. With its embarking into the World Wide Web, it has lent the power to accurately monitor your website. It means you can make changes according to your own liking and taste, not withstanding the requirements. It is the proven stability, easy to use feature; security and exceptional functionality which has made this hosting servicereally count its worth. Furthermore, you also get the advantage of friendly web based interface, adding up of parked domains, reading webmail, monitoring the bandwidth usage, addition of email accounts, moreover, you are also able to view your visitor statistics, and still many more to mention. The list of features is endless. In short a complete package one can ever dream off.

Herein you are in the total control of your website as you get access to your very own Cpanel with every Cpanel hosting account. Thus, it truly makes a lot of sense in managing your own website without any hassle. The core idea of this cpanel hosting is that it allows you to manage your domain through a web interface. There is also a feature whereby the transfer of the control and responsibility of managing your web site is made to you and you get to become the sole controller. It is the most advantageous web hosting serviceas you get to manage all aspects of e-mail, backup, files, CGI scripts and FTP. Not only this, cpanel hosting also allow you to take the entire backup of your website, managing cron jobs, protecting web directories, configuring http redirects and custom error pages also configure spam filters, accompanied with the viewing of disk space and allowing you to set up a shopping cart. What more, they all are available on a touch button system. It’s an enhanced servicewhich makes you control your website on your terms teemed with an array of features.

Cpanel also has an add on named as Fantastico through which you can install lot of ready to use free scripts at few clicks of your mouse.

This web-based control panel is comprehensively designed in a three-tier structure which makes web hosting quick and pretty simple. Using cpanel hosting; you will no longer need to go through hundreds of Linux-based commands just to be the admin of your server. It is loaded with every tool you need and now you can stay focused and pay more to your business instead of the server administration.

The official site of cPanel control panel is http://www.cpanel.net

cPanel Tutorials

cPanel & R1Soft Joined to Offer Performance & Reliability

November 26th, 2008

cPanel and R1Soft are teaming up again to offer a great deal for cPanel server administrators and datacenters.  R1Soft, maker of the industry leading CDP (Continuous Data Protection) backup software is running a special expressly for cPanel software users.  For a limited time, cPack can be purchased for 25% off the normal price.

R1Soft’s CDP product is a great way to provide an extra level of data safety above and beyond cPanel’s built in backup facilities. Backups can be accessed directly from the cPanel interface by domain owners. Server owners can also take advantage of the bare-metal restore capabilities which bring servers back online quickly. “Data backup and the integrity of those backups are key to maintaining and growing enterprise level hosting operations and to that end, we suggest you have a look at the functionality that R1Soft can bring to the table,” says David Koston, cPanel’s Vice President of Operations. “We believe that R1’s cPack solution offers serious benefits for both web hosts and domain owners. This promotion is a good way for hosts to add backup services to their current offerings at a very reasonable price.”

To find out more about this promotion, please visit:

http://www.r1soft.com/products/special-offers/cpack/

Cpanel Hosting News

cPanel and WHM 11.24

November 26th, 2008

cPanel and WHM 11.24 offer new features such as NSD and Dovecot while streamlining our code base. The end result is a sleeker program that minimizes system requirements. The x3 interface itself has also been streamlined, requiring significantly less bandwidth, as seen in the figures below. These new features will result in faster overall load times and improve your everyday web hosting experience.

The amount of improvements made to the core software can not be overstated. We have improved interfaces for configuring mail servers, FTP servers, web servers, and name servers. DNS clustering has also been imbued with many speed enhancements which, coupled with NSD will make DNS functions run at top speed. cPanel’s backup system has been reworked to realize significantly higher speeds. This will make creating, or restoring from. incremental or compressed backups substantially faster.

Also introduced in 11.24 is the cPanel Accelerated initiative. This new track for cPanel caters directly to dedicated server owners and administrators. The backend engine of cPanel has many updates and is reworked to yield enhanced performance on dedicated servers.

Source : cpanel.net

Cpanel Hosting News ,

Hello cPanel hosting world!

November 26th, 2008

Welcome to cPanel Hosting Stuff. Keep visiting this  blog for up to date cpanel information.

Cpanel Basics