Installing PHP on Ubuntu
Of course the name Ubuntu is very different from others and in no way does it sound technically related. However, this operating system is named after a South African ideology which means humanity towards others, and one of the main focuses of Ubuntu operating system is security and usability. It is distributed as free and open source software providing an up to date stable operating system for users and to make it more user-friendly the operating system is very easy to install. Soon after the launch of Ubuntu in 2004, it became one of the most popular Linux distributions for the desktop. It composes of multiple software packages of which majority are open source or free software license.
Installing PHP on Ubuntu can be at times complicated and therefore if you are really not sure about how to do it than you better leave it to the professionals who make it work for you. However, if you still want to try it out yourself, you can first try it on another system that is not critical to your operation. However, before we install PHP we need to install Apache through any of your own web server. You can use the below given command that would install the development tools that will be required by the PHP to configure itself for Apache.
aptitude install apache2 apache2-mpm-prefork apache2-prefork-dev
apache2-utils apache2.2-common
You can use MySQL like most of the people do, but PHP installations also work better with PostgreSQL and if you are trying to use the PostgreSQL you can use the below given command or simply modify it if you decide not to install through PostgreSQL.
aptitude install postgresql-8.3 postgresql-client-8.3 postgresql-client-common postgresql-common postgresql-server-dev-8.3
aptitude install mysql-client mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 mysql-server-core-5.0
Once we are through this step, we need to install the required dependency libraries to get the most out of the PHP installation, as they perform most of the functions like mcrypt and gd. If you are not sure about this part, do take some technical help or you will be spending hours in order to rectify the correct and configure the actual command.
Once you have configured the correct command you can go ahead and download the PHP source code. You can visit http://www.php.net and download the latest version of PHP. You can also use the command provided below:
cd ~
wget http://us3.php.net/get/php-5.3.0.tar.gz/from/this/mirror
tar xvfz php-5-3-0.tar.gz
Once you have configured the PHP source code you can change your working directory to the unpacked PHP source code through the set of php commands.
Posted by James on 2009-10-12 in the category " php "
