PHP Installing PHP LAMP - Linux Apache MySQL and PHP Tutorial


 

PHP Installing PHP LAMP - Linux Apache MySQL and PHP Tutorial

Learn the advantages of the LAMP system. Linux, Apache, MySQL and PHP. This tutorial will provide you step by step guide to install Apache, MySQL and PHP using yum command.

Learn the advantages of the LAMP system. Linux, Apache, MySQL and PHP. This tutorial will provide you step by step guide to install Apache, MySQL and PHP using yum command.

PHP Installing PHP LAMP - Linux Apache MySQL and PHP Tutorial

In this tutorial we will learn how to install Linux, Apache, MySQL and PHP. This guide will help you in installing complete LAMP system for development of applications using LAMP technologies.

The LAMP or Linux, Apache, MySQL and PHP is full featured software development and deployment stack. You can run applications of any complexity using these technologies.

Installing LAMP System:

There are many ways to install complete LAMP system. One of the easiest way is to take the CentOS linux distribution. You can choose PHP, MySQL and Apache at the time of OS installation. If you have missed to select any of the these software you can install it after the OS installation. The yum command will help you in doing so.

Here is the steps to install Apache, MySQL and PHP using yum command:

  1. Make sure internet access is available on your linux machine.
  2. Login to your system as root and open terminal/command prompt.
  3. To install Apache type yum install httpd, follow the installer instruction and install Apache.
  4. Now type yum install php to install PHP. This command may ask some questions and then install PHP on your machine.
  5. Once PHP is successfully installed, type yum install mysql-server mysql to install MySQL server.
  6. Once everything is installed, start mysql using the command service mysqld start.
  7. Now you can start apache by typing service httpd start.
  8. Create a new php file say test.php in /var/www/html directory and add the following code:
    <?php phpinfo(); ?>
  9. Now open web browser and type http://localhost/test.php. Your browser should display lot of information. You can see the modules installed in the output.

Now you have successfully installed LAMP system. In the next sections we will see how to start PHP programming.

Ads