MyTrueHost launched Web Hosting for Indian clients just in Rs 60/Month with various payment options(netbanking, debit card, credit card,cash card or paypal).
Please Visit at https://www.mytruehost.in

How to stop or Enable/Disable mailman service on cpanel/whm

Run following command on shell to start/stop mailnam service on cPanel server.

/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl start

/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl stop

Also you can login to WHM > tweak settings and Enable/disable mailman there.

How to check if mailman service running or not ?

ps -ax|grep mailman



How to update/install latest RoundCube on cPanel

First you will have to uninstall/remove exiting RoundCube files/folder/database on your server,

Uninstall/remove exiting RoundCube

cd /usr/local/cpanel/base
rm -rf roundcube*
mysql -e ‘drop database roundcube’;
/scripts/upcp

Now follow the following steps to update/install latest roundcube version ,we need to get Roundcube before we can use it. The easiest way to get it is to visit http://www.roundcube.net and click on “Downloads” or just go to http://roundcube.net/downloads. Wait for it to download and then unzip (using WinZip or ZipGenius or tar -xzf roundcubemail-0.1.tar.gz) in the current directory.

update/install latest roundcube

cd /usr/local/cpanel/base
wget -O roundcube.tar.gz http://nchc.dl.sourceforge.net/sourceforge/
roundcubemail/roundcubemail-0.2.1.tar.gz
rm -rf roundcube.tar.gz
mv -f roundcubemail-0.2.1/ roundcube
cd roundcube
chmod -R 777 temp

chmod -R 777 logs

Database Configuration

Create the database, database user and install the intial sql file. The following commands will do this for you.

mysql -e “CREATE DATABASE roundcube;”
mysql -e “GRANT ALL PRIVILEGES ON roundcube.* TO roundcube@localhost IDENTIFIED BY
‘DATABASEPASSWORD’;”
mysql -e “FLUSH PRIVILEGES;”
mysql -e “use roundcube; source SQL/mysql.initial.sql;”

You will have to replace the roundcube password with ‘DATABASEPASSWORD’ field.

Configuring RoundCube

cd config
mv db.inc.php.dist db.inc.php
mv main.inc.php.dist main.inc.php

then open database configruation file db.inc.php in your favroite editor like vi or pico or nano vi db.inc.php and Find following line

$rcmail_config[‘db_dsnw’] = ‘mysql://roundcube:pass@localhost/roundcubemail’;

Replace it with

$rcmail_config[‘db_dsnw’] = ‘mysql://roundcube:DATABASEPASSWORD@localhost/roundcube’;

Now Open main.inc.php

vi main.inc.php

Find

$rcmail_config[‘default_host’] = ”;

Replace with

$rcmail_config[‘default_host’] = ‘localhost’;

Last steps , restart the mysql, cpanel services on your server. That’s it ,Have fun with your new Roundcube installation!!



How to install or check pear package?

Following is the command to install any pear package on cPanel server

pear install pear-package-name

You can check all the PEAR packages that are available with

pear list-all

You can check installed PEAR packages on your server using following command

pear list

 

 

How to install xpdf,libXp and antiword on Linux

Following are the steps to install xpdf , libXp and antiword on Linux (Centos or Redhat 32 Bit ) server

cd /usr/local/src/

Dowload following RPM’s files under the /usr/local/src/ directrory.

wget http://mit.edu/zacheiss/dev/rhlinux/redhat-7.1-updates/SRPMS/xpdf-0.92-4.71.0.src.rpm

wget ftp://ftp.univie.ac.at/systems/linux/fedora/core/6/i386/os/Fedora/RPMS/libXp-1.0.0-8.i386.rpm

wget http://dag.wieers.com/rpm/packages/antiword/antiword-0.37-3.el5.rf.i386.rpm

rpm -ivh antiword-0.37-3.el5.rf.i386.rpm

or

http://dag.wieers.com/rpm/packages/antiword/?N=A

Then

rpm -ivh xpdf-0.92-4.71.0.src.rpm

rpm -ivh libXp-1.0.0-8.i386.rpm

Then you can check it

root@server [/usr/local/src]# which xpdf
/usr/local/bin/xpdf
root@server [/usr/local/src]# which antiword
/usr/bin/antiword

Done

 

Webcalender Error Cache error: Could not write file /tmp

After installing web calender from fantastico, you will get the following error.

Cache error: Could not write file /tmp/d16090f5de830d7675276b6523ce3f59.dat.

Solution :

Edit settings.php file which you will find under includes folder.

Search for
db_cachedir: /tmp
and replace it with following
db_cachedir: /home/user/public_html/tmp

Save the file then create tmp folder under public_html and assign 777 permission.

That is all



Rouncube hangs while sending message

Whenever you compose email and click send, it just never sends the message. A circle keeps rotating at the top saying Sending.

Solution :

Login to server with root user and made following changes.

vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php

and serach for following line

$rcmail_config[‘smtp_user’] = ‘%u’;
Replace it with
$rcmail_config[‘smtp_user’] = ”;

 

 

Apache restart failed. Unable to load pid from pid file and no httpd process found in process list

If you are getting the message “Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.” It may cause by the problem with mod_ssl.
Just check the log files using tail -f /usr/local/apache/logs/error_log

If you are getting “File exists: Cannot create SSLMutex with file `/usr/local/apache/logs/ssl_mutex’Configuration Failed“Also check apache status :

[root@vps12105 ~]# service httpd status

Looking up localhostMaking HTTP connection to localhost

Alert!: Unable to connect to remote host.
lynx: Can’t access startfile http://localhost/whm-server-status

Resolution :

Rename the file /usr/local/apache/logs/ssl_mutex to /usr/local/apache/logs/ssl_mutex_bkand try restarting the apache.

Steps :

mv /usr/local/apache/logs/ssl_mutex /usr/local/apache/logs/ssl_mutex_bk

service httpd stop

service httpd startssl

service httpd status



How to install Fantastico on cpanel server?

Steps to install fantastico:

1. Login to server as root

2. cd /usr/local/cpanel/whostmgr/docroot/cgi

3. Now download fantastico tar file using following cmd:

wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz(external link)

4. Untar it: tar -xzpf fantastico_whm_admin.tgz

5. Remove tar file : rm -rf fantastico_whm_admin.tgz

6. Now login to WHM

7. Go to plugins and click on Fantastico De Luxe WHM Admin

8. Scroll down the screen and click on “INSTALL” button.

9. After that server starts fetching files and will take few minutes. Finally, fantastico gets installed on the server.

10. Scroll down the window again and click on “Click here”. It will open Feature Manager again scroll down and click on save button.

11. Another “Click here”. Option will open Fantastico De Luxe WHM Admin just scroll down it and click on save button.

12. This way we can get fantastico installed on the server.

 

server security commands

Server security commands:

1) Make Sure No Non-Root Accounts Have UID Set To 0
awk -F: ‘($3 == “0”) {print}’ /etc/passwd

2) Disable Unwanted Services
Type the following command to list all services which are started at boot time in run level # 3:
chkconfig –list | grep ‘3:on’

3) Find Listening Network Ports

Use the following command to list all open ports and associated programs:
netstat -tulpn

4) OR
nmap -sT -O localhost
nmap -sT -O server.example.com

5) World-Writable Files

Anyone can modify world-writable file resulting into a security issue. Use the following command to find all world writable

and sticky bits set files:
find /dir -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print

6) Noowner/nobody Files

Files not owned by any user or group can pose a security problem. Just find them with the following command which do not

belong to a valid user and a valid group
find /dir -xdev \( -nouser -o -nogroup \) -print

 

How to configure Google Apps in cpanel server ?

DNS settings for Google Apps:

1) Set the following MX record for your domain .

domain.com. IN MX 10 aspmx.l.google.com.
domain.com. IN MX 20 alt1.aspmx.l.google.com.
domain.com. IN MX 5 alt2.aspmx.l.google.com.
domain.com. IN MX 10 alt3.aspmx.l.google.com.
domain.com. IN MX 10 aspmx2.googlemail.com.
domain.com. IN MX 10 aspmx3.googlemail.com.

2) Then set the CNAME record for your mail.domain.com

Replace mail entry from

mail IN CNAME domain.com
to
mail IN CNAME ghs.google.com

If all the setting is correct and then it will take 1-2 hours to update at word wide . After that you can access your google mail by using the URL http://mail.yourdomain.com(external link)

Note: Replace yourdomain.com equal to your original domain name.