Set mysql’s root password on fresh copy from SolusVM OS template

On SolusVM, your host may provide you with OS templates such as “Ubuntu 10.04 LTS LAMP” and you click-install it to your VPS. Now how do you change its mysql’s root password? simple, run these two commands on SSH after doing

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';

Good bye CentOS! Hello Ubuntu

Its been about almost more then two years since I have been playing with CentOS on many different platforms etc. Its very stable but on the other hand, PHP/MySQL updates are very hard to get and still PHP is 5.1.6. I tried EPEL repo and it updated PHP to 5.3.1 but still there were conflicts with stuff and many core packages.

So, I thought why not move to Ubuntu since it has just announced 10.04LTS (Long Term Support) in April 2010. Folks at iWeb were really nice to do a reinstall without any charges and also process a memory upgrade request at an amazing 50% discount.

Ubuntu 10.04 LTS

  • Apache 2 version is 2.2.14
  • PHP version is 5.3.2
  • MySQL version is 5.1.41-3ubuntu12
  • SVN (Subversion) version is 1.6.6

As a comparison CentOS 5.4 has the following versions

  • Apache 2 version is 2.2.3
  • PHP version is 5.1.6
  • MySQL version is 5.0.77
  • SVN (Subversion) version is 1.4.2

So if you are a PHP developer looking to deploy a Linux flavour on your new box, choose Ubuntu 🙂

How to Install Apache, PHP and MySQL on CentOS

I have seen people installing Apache, PHP and MySQL from source code on a production server. You should NEVER, NEVER, NEVER install these packages from source on an RPM or DEB based Linux distributions. Did I say “NEVER” enough times to make your realize that it is not a good practice?

Installing from source is bad idea; there are many reasons for this but the major one is that you will be spending a lot of time keeping the system updated. If you love installing from source then I would suggest using a different distribution e.g. Gentoo.

You can build from source if the package is not available in yum but still, try to use “yum” (or “apt-get” on Ubuntu) because it will save a lot of your time when upgrading your packages.

Continue reading

Intall Apache, MySQL and PHP on Ubuntu – Part 2

Few weeks ago I wrote an article on how to setup Xampp package on Ubuntu. Today, I am revisiting this.

I came across a great article straight from the Ubuntu community, it is very simple, very strraight forward to setup Apache / MySQL and PHP on your Ubuntu box (server or desktop)

Read the article here.

Intall Apache, MySQL and PHP on Ubuntu 8.10

WARNING: Please use this method to install Apache, PHP and MySQL because its more suitable for most of your needs and has options to auto-upgrade your installation. The following method is obsolete and not recommended.

After trying to install Apache, MySQL and PHP on Ubuntu 8.10 via several methods listed over the web. I opted for xampp package for linux.

It is as easy as ABC

Download the xampp linux package from their official website


(I have selected NCHC, Taiwan as the mirror to download this package, you may try another)

Extract the files

sudo tar xvfz xampp-linux-1.7.tar.gz -C /opt

Chmod the files to have nobody ownership

sudo chown -R nobody:root /opt/lampp/

Configure xampp security

sudo /opt/lampp/lampp security

Start xampp with this command

sudo /opt/lampp/lampp start

Stop xampp

sudo /opt/lampp/lampp stop

Restart xampp

sudo /opt/lampp/lampp restart

Login to ftp using the username nobody and the password that you have set up in the “xampp security”

To uninstall xampp

sudo rm -fr /opt/lampp


Ubuntu 8.10, Perfect Linux distro for PHP development

I recently felt the urge to have a development testing environment on Linux (LAMP). I tried CentOS first since it is one of the leading industry standard Linux server. I was disappointed to see that CentOS does not have a 5.2.x series of PHP that I could install via “yum” (am not a very advance user so does not wanted to build it by typing long queries in SSH just to find out that I left some core thing in the first place).

I did a bit of research and found out that Ubuntu could be a better choice. Luckily I had the latest version of Ubuntu already shipped via Postal Mail (aka Snail Mail) and this time the CDs DID get through the customs.

For those new to Ubuntu, you can either download it or request FREE cds from

Ubuntu 8.10, the latest release, is a breeze to install and start running. I used VMWare Workstation to run it on my Windows installation.

Preparing Diskspace
Ubuntu 8.10 Preparing Diskspace (nice graphics)

Scanning Files
Ubuntu 8.10 Scanning Files

Installing System
Ubuntu 8.10 Installing System

Shutting Down
Ubuntu 8.10 Shutting Down after complete install