After install your Operating System (could be CentOS), the first thing you may think about install Apache, PHP and MySQL on the server.
This tutorial will let you know how to Install LAMP (Apache, MySQL and PHP in Linux) on CentOS. We will use YUM program to install LAMP in CentOS.
Below are the steps:
1. Open a terminal and type following command and follow on screen instructions to install Apache web server.[text] yum install httpd
2. Once Apache has been installed, continue to install PHP, type:[text] yum install php
3. After PHP installed, continue to install MySQL database server:[text] yum install mysql-server mysql
That’s all, once everything finished, type following command to start Apache web server:[text] service httpd start
And type below command to start MySQL database server[text] service mysqld start
Once apache & mysql services are started successfully, it’s time to check if both of them are running.
To test if php is running, go to /var/www/html and create an index.php with the content below:[php] <?php
Then open a web browser and go to http://localhost and you should see a purple PHP information page showing all the php configuration variables, it means PHP is running. Awesome!
Open the terminal again and type:[text] mysql -u root -p
It will ask the password, leave it blank by pressing enter and you should see something like this:[text] mysql>
It means MySQL database server is running on your server. That’s perfect!
Congratulation, you just successfully installed LAMP in your CentOS server.
This tutorial may apply for others Linux system, I think.