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 can I setup an alternate port for SMTP in WHM?

You can run exim on another port by going to ‘Service Manager’ option in WHM. Below are the exact steps:

# Log into WHM
# Click Service Manager
# Check the enable box for Exim on Another Port.
# Set the port to 26 (recommended)
# Click save

 

 

How to disable direct root login for ProFTP?

You can disable direct root login for ProFTP by modifying the proftpd.conf file.

Modify /etc/proftpd.conf

Add RootLogin off

Restart ProFTP

/sbin/service proftpd stop
/sbin/service proftpd start

 

/usr partition 100% full in Control Panel.

The /usr partition on this server is running out of disk space. WHM operation has been temporarily suspended to prevent something bad from happening. Please ask your system admin to remove any files not in use on that partition.

You can check the size of error_logs and access_logs on your Linux server and in case these files are large you can empty them by using following commands –

#cd /usr/local/apache/logs
#ls -sh error_logs
#ls -sh access_logs 

The log files will generally be in the size of GB’s

#echo > error_logs
#echo > access_logs 

This should resolve the issue.

 

How to run cgi/perl file outside cgi-bin in cpanel server?

To run  cgi/perl file outside cgi-bin in cPanel server you will need to add following lines in .htaccess files so it executes cgi scripts in any folder outside cgi-bin folder.

AddHandler cgi-script .pl .cgi
Options Includes ExecCGI

 

 

Starting MySQL couldn’t find MySQL Manager

While doing a mysql start you may sometimes get the following error:

Starting MySQLCouldn’t find MySQL manager (/var/lib/bin/mysql) or server (/var/lib/bin/mysqld_safe)

To fix this you need to comment out or remove the basedir directive line from /etc/my.cnf file

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

Now restart mysql

# service mysql restart

 

 

Addon Domain vs. Parked Domains.

In case if you have ever wondered the difference between Addon Domain and a Parked Domain when adding them from within cPanel, here is what will help you understand:

 

Characteristic Addon Domains Parked Domains
Main domain appears in the address bar Yes No
Separate stats Yes No
Apache directive used VirtualHost ServerAlias
Separate logs Yes No
Ideal for multiple domains sharing the same address No Yes
Treated as a subdomain (other than URL) Yes No

Mysql gives error of access denied for root@localhost on cPanel Servers

The most possible cause of this error is an incorrect password. You can usually find the correct password in this file:  /root/.my.cnf.

The file will contain the first root password the server was given once cPanel is installed. If it still does not work, you will need to reset the mysqld root password. To do so you can follow the below steps:

1. Stop mysqld – /etc/rc.d/init.d/mysql stop 
2. Stop chkservd to keep it from interfering with mysqld –/etc/rc.d/init.d/chkservd stop 
3. Start mysqld without the grant tables –  mysqld –skip-grant-tables -u mysql & 
4. Now change the pass.
mysql -u root mysql UPDATE user SET Password=PASSWORD(‘new_password’) WHERE user=’root’; FLUSH PRIVILEGES;

Now you just killall -9 mysqld and start it up normally with it’s safe_mysqld script.

 

 

How do I uninstall / remove Tomcat

You can use the following commands to uninstall Tomcat.

cd /usr/sbin/stoptomcat
rm -f /usr/sbin/starttomcat
rm -f /usr/sbin/startomcat
rm -f /usr/sbin/stoptomcat

It is important that you remove all mod_jk lines from httpd.conf, includingaddmodule, loadmodule, and include line.

 

 

How to change SMTP port number

To set an alternate SMTP port in Microsoft Outlook Express:

  1. In Microsoft Outlook Express  go to Tools > Accounts
  2. Click the Mail tab.
  3. Click the account and then click Properties.
  4. Click the Advanced tab
  5. Change “Outgoing mail (SMTP)“. The alternate port will be provided to you by your host, which is generally 25 or 587
  6. Click Apply and then OK.

To set an alternate SMTP port in Mozilla Thunderbird:

  1. In Mozilla Thunderbird go to Tools > Account Settings
  2. Now, select “Outgoing Server (SMTP)” at the bottom of the list that you see in the left panel.
  3. Select the account and click Edit
  4. Change Port from 25. The alternate port will be provided to you by your host, which is generally 25 or 587.
  5. Click OK.

Method to take mysql dump of table structures

In order to take the dump of a database table structure you can use the option “-d” of mysqldump.

The syntax is given below.

$ mysqldump -u USERNAME -p -d  DATABASENAME  –tables TABLENAME1 TABLENAME2  >  FILENAME.sql

Replace the USERNAME, DATABASENAME, TABLENAME, FILENAME with the original one.

You can verify the file for the table structures.

$ more  FILENAME.sql