Friday, October 3, 2008

Install Perl Module from shell

Log into the shell as root and fire the below command

echo "HTML::SimpleLinkExtor" | /usr/local/cpanel/whostmgr/bin/perlmod -i


This will install HTML::SimpleLinkExtor module.

Friday, March 28, 2008

Warning: Cannot modify header information

If you get warnings on top of the page
Warning: Cannot modify header information - headers already sent by (output started at

Solution is
The "headers already sent" error is usually caused by having white space before or after the opening and closing PHP tags ().

In my case it was I removed  and issue resolved.

Thanks
Ninad

Monday, January 14, 2008

Setup an FTP user account with shell access

Use the below steps to create an FTP account using ssh

[root@ninad] /# mkdir /home/ftp
[root@ninad] /# useradd -d /home/ftp/ftpadmin/ -s /dev/null ftpadmin >
/dev/null 2>&1
[root@ninad] /# passwd ftpadmin

Changing password for user ftpadmin
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully

Thursday, January 10, 2008

Change smtp port on plesk server to 26

Follow below steps to change smtp port on plesk server to 26.

>> cd /etc/xinetd.d
>> ls -l | grep smtp*
>> cat smtp_psa

service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}

>> pico /etc/services

Add this line
smtp_psa_new 26/tcp mail
smtp_psa_new 26/udp mail

>> cp smtp_psa smtp_psa_new

Change the service line in the new file ’smtp_psa_new” to be this:

service smtp_psa_new
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}

>> /etc/init.d/xinetd restart

And you should see smtp listening on ports 25, and 26:

>> netstat -anp | grep xinetd

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 6989/xinetd
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 6989/xinetd


Regards

Ninad


Tuesday, December 11, 2007

Munin not showing graphs

Fix for Munin installed by cPanel/WHM

  1. Determine where is mysqladmin program located with the one of the following command:

    which mysqladmin
    type mysqladmin
    locate mysqladmin

    If should return a path to mysqladmin which looks similar or the same to /usr/bin/mysqladmin.

  2. Edit the /etc/munin/plugin-conf.d/cpanel.conf Munin configuration file, and modify the [mysql*] to look like below:


    [mysql*]
    user root
    group wheel
    env.mysqladmin /usr/bin/mysqladmin
    env.mysqlopts --defaults-extra-file=/root/.my.cnf

    Ensure the env.mysqladmin value is path returned by step above. Also ensure that /root/.my.cnf contains correct root password to the MySQL databases.

  3. Then restart Munin service:

    /etc/init.d/munin-node restart

  4. Wait a while for MySQL statistics to be gathered, and check the graphs again.
Enjoy
Ninad

Tuesday, October 23, 2007

PHPMyadmin Error

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Do a mysql.sock symlink to /tmp

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

and restart mysql

Issue should be fixed.

Enjoy
Ninad

Monday, July 2, 2007

Not able to see email accounts ?

Not able to see email accounts from your cpanel ?

Check the permission of /home/user/etc and /home/user/mail

For etc it should be user.mail and for mail it should be user.user

Now you will be able to see all the email accounts.

Enjoy
Ninad S


View My Stats