LAMP stands for Linux, Apache, MySQL, and PHP. The first step is to install Apache using Yum installation
sudo Yum Install httpd
Start the httpd service
sudo service httpd start
Test whether the installation is successful, you can access the server's address, such as http://12.34.56.78, my test page is such a second step, install the database MySQL the same, with Yum, install it after you start it
sudo Yum Install mysql-serverservice mysqld start
Step three, install PHP
sudo Yum Install PHP php-mysql
PHP has a lot of binary modules that you can search for:
sudo Yum Search php-
This way, all available modules starting with PHP are displayed, and if you want to view information about one of the modules,
sudo Yum Info Name of the module
For example, I would like to check the information of the php-cli.i686 module:
sudo Yum Info php-cli.i686
If you want to install this module,
sudo Yum Install php-cli.i686
When the Apache server starts, PHP will automatically run the last step to see if PHP is working properly and we create a PHP information page.
VI /var/www/html/info. php
Plus:
<? PHP Phpinfo ();? >
Typing: x, enter reboot httpd server
sudo service httpd restart
Test PHP for normal reference by visiting http://12.34.56.78/info.php https://www.digitalocean.com/community/tutorials/ How-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
From for notes (Wiz)
Installing LAMP on the CENTOS6