Archive for January, 2008

Jan 25 2008

How to install webmin on Linux

Published by under linux,Ubuntu

WEbmin is an excellent tool to do Unix/Linux System Adminstratio/Configuration. The configuration interface is just a plain internet browser. Moreover it is free as well.
Visit Webmin to download the webmin package for your linux/unix distribution.

Here, i have used Ubuntu/Debian Distribution.
First, install the webmin package. If the webmin install package is in .deb format, then issue the below command

sudo dpkg –install webmin_1.390.deb

If the required perl modules are already installed, then you will not see any dependency errors. If you do see, then you need to install all the dependency.
i am installing the whole perl and other perl modules required by webmin.

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

Now run
sudo dpkg –install webmin_1.390.deb

You should be all set now.

Comments Off on How to install webmin on Linux

Jan 23 2008

Setting up apt-get, wget to use http-proxy

Published by under linux

If you are inside a corporate network, the chances are that you can only access the internet through the http-proxies.

This snippet shows you how to setup the proxy address for apt-get, wget and such programs to access internet.

First method:

In Bash Command Shell, execute

export http_proxy=http://proxy-address:portnumber

proxy-address is your proxy server address.

For example if your proxy server address is and port is 8080 then

export http_proxy-

Second Method

in .bashrc file , type the following


export http_proxy

Comments Off on Setting up apt-get, wget to use http-proxy

Jan 20 2008

Good Hosts for hosting your Website

Published by under general

This is long overdue post 🙂

I have been hosting sites for past 3 years and have tried several web hosting providers and finally settled down to Nearlyfreespeech for shared hosting and imountain for VPS. is probably one of the best shared host you can find in the market. They are purely Pay-for-what -you-use kind of host. No fixed monthly fees. Stability is very good and have a very active support forum. This site is hosted with is probably one of the best VPS host. They are priced slightly higher than the market but you can get at least 30% discount if you take up the offer from . Very high quality machines and they have a policy of 10 accounts per machine. The database server, mail server, dns server run on a dedicated machine and not on your VPS partition. So your VPS is always blazing fast and memory consumption is very low. Support is very quick. Normally your questions get answered in 10-15 mins. i have hosted my django webframe work with this host.

Other hosts i have tried are listed below and i briefly mention what i like and dont like about them

1) Globat. Horrible Host. This was my first host and i was naive at that time. I went for large disk space at that time. It was 2.5 Gig storage. I was with them for one year as i had already paid for a year. I was not able to run any scripts that executes beyond 5 seconds. Server was down several times and slow.

2) asmallorange: Good host but storage was very low. But most of the time email from their server were identified as spams. After several tries with their tech support i gave up.

3) 1and1. Very stable and large host. They provided ample storage space. But you cant execute any scripts that run longer than 10 secs. So i could not run any of image gallery. I was with this host for one and half years and gave up as my requirements changed.

Comments Off on Good Hosts for hosting your Website

Jan 20 2008

How to obtain and install SSL certificates on CentOS 4.5

Published by under linux,Security,SSL

This article describes what needs to be done to have a SSL ( HTTPS) enabled site on CentOS 4.5. This should work on other distro’s as well but i have not tested.


Apache 2 Webserver

OpenSSL is installed and functional

In possession of Domain Name. If not obtain one from many Domain Name sellers like GoDaddy

  1. Generate a RSA Private Key
    sudo openssl genrsa -out my.key 1024
  2. Generate a CSR ( Certificate Signing Request ). The CSR must be signed by private key “my.key” generated in the step 1. Please note you must enter at least your domain name as highlighted below in bold.

openssl req -new -key my.key -out mysite.csr

Country Name (2 letter code) [GB]:SG
State or Province Name (full name) [Berkshire]:Singapore
Locality Name (eg, city) [Newbury]:Singapore
Organization Name (eg, company) [My Company Ltd]:NA
Organizational Unit Name (eg, section) []:NA
Common Name (eg, your name or your server’s hostname) []
Email Address []:[email protected]

Now you need to take mysite.csr to a Certificate signing authority to get your SSL Certificate.

I used a free Certificate authority named . Very highly recommended by open source community. But the issue is that many mainstream browsers do not automatically recognize CAcert. So for first time visitors, a warning will pop up. Just accept it permanently. After this, the pop up wont show when ever you visit from the same browser.

  1. First signup with CACert. Once done, then go to the next step.
  2. Then click on “Domains->Add” as shown below
  3. Then add your domain in the provided textbox
  4. Cacert will do a domain verification by sending an email to your registered email address. Open your email and click on the link sent to you by the CAcert.
  5. Then Click on “Server Certificate ->New” to get a new certificate for your site.
  6. Open the CSR file “mysite.csr” you created above and cut and paste the content of the file into the provided text box and click submit
  7. CAcert will show the certificate file. Copy and store it on a file named mysite.crt. (filename can be anything )
  8. Configure SSL options in httpd.conf file.

An example SSL enabled virtual host configuration is shown below for your reference

NameVirtualHost *:443
<VirtualHost *:443>

DocumentRoot /var/www/public

SSLEngine on
SSLCertificateFile /etc/httpd/mysite.crt
SSLCertificateKeyFile /etc/httpd/my.key
SSLVerifyClient optional


Comments Off on How to obtain and install SSL certificates on CentOS 4.5

Jan 13 2008

Howto Build and Install Php 5.2.x on a CentOS 4.5 System

Published by under linux

Download php5.2.x source code


Configure Php 5.2.x build options.

./configure –with-apxs2=/usr/sbin/apxs –with-mysql=/usr/lib/mysql –enable-track-vars –enable-sockets –with-config-file-path=/etc –enable-ftp –with-zlib –with-openssl –enable-force-cgi-redirect –enable-exif –with-gd –enable-memory-limit –disable-debug –disable-rpath –disable-static –with-pic –enable-calendar –enable-sysvsem –enable-sysvshm –enable-sysvmsg –enable-trans-sid –enable-bcmath –with-bz2 –enable-ctype –with-db4 –with-iconv –with-gettext –enable-mbstring –enable-shmop –enable-wddx –with-xmlrpc –enable-yp –with-zlib –without-pgsql –enable-dbx –without-mm –with-jpeg-dir=/usr –enable-gd-native-ttf –with-imap-ssl –enable-soap –with-xml

THE PROBLEMS i FACED and how i resolved it are show below

apxs is required to build Apache2 modules. My installation of apache did not have this tool. So i had to install httpd-devel package

If any of the packages are missing, configuer script will spit out an error. Install those packages and re-run configure script as above until it is successful.

For example, if libpng is not installed in your system, configure will abort. Then install libpng and re-run configure.

Download and install libpng package, if needed

download from

Unzip and untar the file in a temp directory

Then do a ./configure

Then make install ( with root permission )

You may also need to install libjpeg files. Download from

Then do the following



make install.

Please note, the header files of jpeglib must be in PHP5 compilation include path. For example, /usr/local/include for cent OS 4.5

Once “configure” completes successfully, then need to compile and install PHP5

make test ( To ensure that you compilation went right )
make install ( run this with root permission )

Comments Off on Howto Build and Install Php 5.2.x on a CentOS 4.5 System