The same website program runs under Linux more quickly than in Windows, so decided to use Linux distribution CentOS, this article mainly explained under CentOS use Yum command to install the lamp detailed process. The software we use is the latest version of CentOS CentOS 6.3, and the other versions are basically similar.
Step one: Update the system kernel (skip this step if you don't want to update).
First update the system kernel to the latest, because the latest version of CentOS 6.3 PHP version is 5.3, early version of the CentOS PHP version is also relatively low.
To execute a command:
YUM-Y Update Note: If a failure error is performed, you can perform a repair command:
rpm–import/etc/pki/rpm-gpg/rpm-gpg-key* Step Two: Install Apahce, Mysql, PHP, and its base extensions.
To execute a command:
Yum-y Install httpd php php-mysql mysql mysql-server step three: Install PHP's other common extensions
Execute the name:
Yum-y Install PHP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc Fourth step: Install Apache extensions
To execute a command:
Yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql The completion of the four-step software installation is complete, and then do some general settings.
Fifth step: Set up Apache/mysql-server environment boot automatically start
To execute a command:
# set Apache to boot from boot/sbin/chkconfig httpd on# add MySQL service/sbin/chkconfig--add mysqld# set MySQL to boot from/sbin/chkconfig mysqld On step sixth: start Apache and MSYQL
To execute the command individually:
Service httpd StartService mysqld start seventh: Set the MySQL database root account password
mysqladmin-u root password ' mysql Administrator password ' step eighth: 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 by default under/var/www/html/. After extracting the phpMyAdmin compressed package, find config.sample.inc.php renamed to config.inc.php, modify the configuration, the installation is complete.
If phpMyAdmin error "MCrypt component missing" does not actually affect the use if you want to resolve the following method of reference
Open URL: http://mirrors.sohu.com/fedora-epel/6/i386/use ctrl+f search keyword "epel-release" Find the current latest expansion pack found the latest version is: epel-release-6-7.noarch.rpm
Screenshot below:
And then execute the command:
[root@ptr228 ~]# RPM-IVH http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-7.noarch.rpm
See figure:
Note : The expansion package is constantly updated, so you need to search "epel-release" to find the correct version, otherwise the command will not succeed.
Step two: Execute the command:yum update more line system See figure below:
To execute a command:
[root@ptr228 ~]# Yum Update
Then there is a period of waiting, because the system will be updated to CentOS The latest version may be longer. complete! prompt when update is complete
See figure below:
Step three: Execute command Yum repolist view installation Results
See if you have epel(Extra Packages for Enterprise Linux) expansion pack, execute commands and results as follows:
To execute a command:
[root@ptr228 ~]# Yum Repolist
See figure:
If you find that the epel description shown in the figure has been successfully installed, you can continue to execute it.
Step Fourth: Execute command: Yum install php-mcrypt install MCrypt expansion pack
To execute a command:
[root@ptr228 ~]# Yum Install Php-mcrypt
See figure:
You can see that you are ready to install and enter Y to continue the installation.
Fifth step: Restart Apache is extended to take effect
To execute a command:
[root@ptr228 ~]# Service httpd restart
See figure:
Again turn on phpmyadmin RED error hint has not been.