Linux LAMP PostgreSQL Install & Configure Apache, PHP, and MySQL PSQL on Linux v1.2
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada
www.globalopenversity.orgA GOV Open Knowledge Access License Technical Publications
Global Open VersityIT Systems Integration Hands-on Labs Training Manual
Apache, PHP, MySQL and PostgreSQL on Linux HowTo
There are two sections involved in this article: Part 1 covers installation of Apache, MySQL and PHP,while Part 2 deals mainly with installing PostgreSQL. The article assumes that you already installedCentOS52.
It’s assumed that you have a good understanding of Linux operating system and its working environment.It’s also assumed that you know how to install and configure Linux CentOS5, if not go ahead and pop overto scribd.com and check out a good HowTo entitled “Install Configure and Upgrade Linux CentOS5 Serverv1.1” to get you started.
Part 1: Installing Apache, PHP, MySQL
These will the basic components for a dynamic, database-driven web site. We use yum to handle of therequired packages1. Install Apache (
), PHP, MySQL (server and client), and the component that allows PHP to talk tomysql.
yum install httpd* php* mysql* -y
Note that: * indicates install all components2. Configure the service to start automatically
/sbin/chkconfig httpd on/sbin/chkconfig --add mysqld/sbin/chkconfig mysqld on/sbin/service httpd start/sbin/service mysqld start
3. IMPORTANT! Set up the mysql database root password. Without a password, ANY user on the box canlogin to mysql as database root. The mysql root account is a separate password from the machine rootaccount.
mysqladmin –u root password 'new-password'\\quotes are required