1. Download the Yum plugin yum-downloadonly, which allows you to download packages only.
Yum Install Yum-downloadonly
2. Download apache,mysql,php with Yum.
2.1 Downloads Apache
Yum Install httpd httpd-devel--downloadonly--downloaddir=/home/lamp
2.2 Download MySQL
Yum install MySQL mysql-server mysql-devel--downloadonly--downloaddir=/home/lamp
2.3 Download PHP
Yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml--downloadonly--downloaddir=/home/ Lamp
3. Install the apache,mysql,php with RPM.
RPM-IVH *.rpm--force
4. Start apache,mysql,php.
4.1 Starting MySQL:/etc/init.d/mysqld start
4.2 Start apache+php:/etc/init.d/httpd start
5. Test the apache+mysql+php environment
Create a new test.php file in/var/www/html/(the default installation environment after loading the PHP file is this path, except manual configuration), write the following, and then save.
<?php
Phpinfo ();
?>
Then opens the http://serverip/test.php in the client browser, if can display successfully, then indicates the installation succeeds.
This completes the installation.
6. Set up boot from boot
MySQL boot from: chkconfig mysqld on
apache+php boot from: Chkconfig httpd on
Linux Yum download rpm package and install lamp environment