This method is simple. Compile with the source code every time, waste a lot of time Ah!
The same website program runs under Linux much faster than under Windows, so decided to use the Linux distribution version of CentOS , this article mainly explains the use of the Yum command to install lamp details under CentOS. The software we use is the latest CentOS version of CentOS 6.3, and the other versions are basically similar.
First step: Update the system kernel (skip this step if you do not want to update).
First update the system kernel to the latest, because the latest version of the CentOS 6.3 PHP version is 5.3, early version of the CentOS PHP version is also relatively low.
Execute command:
Yum-y Update
Note : If a failure error is performed, the repair command can be executed:
rpm–import/etc/pki/rpm-gpg/rpm-gpg-key*
Step Two: Install Apahce, Mysql, PHP, and its underlying extensions.
Execute command:
Yum-y Install httpd php php-mysql mysql mysql-server
Step Three: Install other common extensions for PHP
Perform the naming:
Yum-y Install PHP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc
Fourth step: Installing Apache Extensions
Execute command:
Yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql
After executing the four-step software, the installation is complete, followed by some general setup.
Fifth step: Set the Apache/mysql-server environment to boot automatically
Execute command:
# set Apache to boot/sbin/chkconfig httpd on# add MySQL service /sbin/chkconfig--add mysqld# set MySQL to boot from /sbin/chkconfig mysqld on
Sixth step: Launch Apache and MSYQL
Execute the command separately:
Service httpd StartService mysqld start
Seventh step: Set the MySQL database root account password
' administrator password for MySQL '
Eighth Step: Install phpMyAdmin
From phpMyAdmin official website: http://www.phpmyadmin.net/home_page/downloads.php Download the latest phpMyAdmin installation package, download to the site directory under the default under/var/www/html/. After extracting the phpMyAdmin compression package, locate config.sample.inc.php renamed to config.inc.php, modify the configuration, and the installation is complete.
If phpMyAdmin error "MCrypt component missing" actually does not affect the use, if you want to change, please check my other article "CentOS Yum installation mcrypt detailed illustrated tutorial."
From: http://www.yiweihy.com/knowledge/develop/207-centos-lamp.html
"Go" in the CentOS environment yum install lamp (linux+apache+mysql+php)