howto reinitialize CPAN configuration

To reinitialize your CPAN configuration type the following from your cpan shell

=========

cpan> o conf init
=========

Posted under perl

This post was written by Anoop Alias on August 27, 2008

Tags:

Good WHM-cpanel troubleshooting guide

The following guide (property of Cpanel.net ) is a good starting point in troubleshooting cpanel /whm problems

Please note that this document belongs to Cpanel.net and may contain proprietary informationr

Download a copy from here

http://gnusys.net/downloads/Troubleshooting.pdf

Posted under cpanel, hosting

This post was written by Anoop Alias on August 26, 2008

Tags: ,

nginx server_names_hash_bucket_size error

The error:

Starting nginx daemon: nginx2008/08/25 00:29:09 [emerg] 4011#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32

The fix:

Within the http block of the nginx config file make sure you have the server_names_hash_bucket_size set higher than the minimum 32

something lik

http { server_names_hash_bucket_size 64;

}

explanation :

hash_max_size will control the
number of virtual host entries, while _hash_bucket_size will control
the maximum length of single entries
if you have a lot of virtual host entries, you should increase
hash_max_size, while I should increase hash_bucket_size if some
domain names are too long.

Posted under Uncategorized, nginx

This post was written by Anoop Alias on August 25, 2008

Tags:

Howto install GeoIP C API in GNU/Linux

MaxMind’s GeoIP C api is used by various programs to map IP address to locations .

Here is the procedure to install this :

Download the latest source from http://www.maxmind.com/download/geoip/api/c/

mkdir /usr/local/geoip

./configure –prefix=/usr/local/geoip –exec-prefix=/usr/local/geoip

make

make install

Now we have to make the system loader load the shared libraries

Add the following to /etc/ld.so.conf.d/geoip.conf

====

cat /etc/ld.so.conf.d/geoip.conf
/usr/local/geoip/lib
====

ldconfig

If all goes well , you should have GeoIP installed in /usr/local/geoip

Posted under Uncategorized

This post was written by Anoop Alias on August 23, 2008

Tags:

Fix locales warning on Debian or Ubuntu

Sometimes you get the following warning when running commands in Debian / Ubuntu powered computers

==============

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US.UTF-8″
are supported and installed on your system.
perl: warning: Falling back to the standard locale (”C”).

===============

To fix this run the following command as root

root@php-server:~# apt-get install language-pack-en-base

Posted under Debian, apt

This post was written by Anoop Alias on August 23, 2008

Tags: ,

Howto install yum on a Virtuozzo container

Please follow the following commands to install yum on your Virtuozzo container . The follwoing commands are to be run from the hardware node .

————————

[root@vps1 ~]# vzlist  -a
CTID      NPROC STATUS    IP_ADDR         HOSTNAME
1         91 running   192.168.46.242  ServiceCT
105         49 running   69.72.234.148   asdf
107         49 running   69.72.234.150   test.test.com2

————————

This will list all the configured containers and their container ID (CTID) which is of importance to us

Assume you have to install yum on container 107

————————

[root@vps1 ~]# vzpkg install -p 107 yum

————————

!please note that If there is no yum available in the template repository it will fail.

Posted under virtuozzo, yum

This post was written by Anoop Alias on August 21, 2008

Tags: ,

Howto install Nginx from source

Nginx is a very fast ,powerful asynchronous web server that can be considered as a good replacement for the Apache HTTPD web server. Below are the steps required to get Nginx installed on your system. It is preffered to install Nginx from source as we get the latest stable version of this project as compared to installing from your operating systems package repository as this may be sometimes outdated

Get the latest stable release from http://nginx.net

At the time of writing i downloaded  http://sysoev.ru/nginx/nginx-0.6.32.tar.gz

I installed the following development libraries using apt-get

apt-get install libgcrypt11-dev libpcre3-dev libssl-dev

tar -xvzf nginx-0.6.32.tar.gz

cd nginx-0.6.32

mkdir /usr/local/nginx

./configure –prefix=/usr/local/nginx –user=nobody –group=nogroup –with-http_ssl_module –with-http_realip_module –with-http_addition_module –with-http_sub_module –with-http_gzip_static_module –with-http_stub_status_module –without-mail_pop3_module –without-mail_imap_module –without-mail_smtp_module –with-md5=/usr/lib

make

make install

Thats it we now have to configure nginx and start the daemon to start serving web

Posted under hosting, nginx

This post was written by Anoop Alias on August 13, 2008

Tags: ,