Install LAMP in CentOS environment (Linux + Apache + Mysql + php)

Source: Internet
Author: User
In CentOS environment, the same website program runs much faster in Linux than in windows when LAMP (LinuxApacheMysqlphp) is installed in yum. Therefore, it is decided to use CentOS, this article describes how to install LAMP by using the yum command in CentOS. The software we use is the latest CentOS version CentOS6.3.

In CentOS environment, the same website program runs much faster in Linux than in windows when LAMP (LinuxApacheMysqlphp) is installed in yum. Therefore, it is decided to use CentOS, this article describes how to install LAMP by using the yum command in CentOS. The software we use is CentOS 6.3, the latest version of CentOS.

Install LAMP in CentOS environment (Linux + Apache + Mysql + php)

The same website program runs much faster in Linux than in windows, so we decided to use the Linux releaseCentOS, This article mainly explains how to use in CentOSYum commandInstall LAMP. The software we use is CentOS 6.3, the latest version of CentOS.

Step 1: update the system kernel (skip this step if you do not want to update the kernel ).

First, update the system kernel to the latest version. Because the php version of CentOS 6.3 of the latest version is 5.3, the php version of CentOS in the earlier version is also relatively low.

Run the following command:

yum -y update

Note:: If an error is reported during execution, run the following command to fix the problem:

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*
Step 2: Install Apahce, Mysql, PHP, and basic extensions.

Run the following command:

yum -y install httpd php php-mysql mysql mysql-server
Step 3: install other common PHP extensions

Run the following command:

yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
Step 4: install Apache Extension

Run the following command:

yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

After the four steps are completed, the software is installed. Next, we need to make some general settings.

Step 5: Set the apache/mysql-server environment to start automatically

Run the following command:

# Set apache to auto-start
/Sbin/chkconfig httpd on

# Add a mysql Service
/Sbin/chkconfig -- add mysqld

# Set mysql to boot automatically
/Sbin/chkconfig mysqld on
Step 6: start apache and msyql

Run the following commands:

service httpd start
service mysqld start
Step 7: Set the password of the root account of the mysql database
Mysqladmin-u root password 'mysql administrator password'
Step 8: Install phpmyadmin

From the official phpmyadmin Website: Taobao. Decompress the phpmyadmin package, find config. sample. inc. php, rename it config. inc. php, modify the configuration, and the installation is complete.

If phpmyadmin reports that the error "missing mcrypt component" does not affect your use, see my other article "how to install mcrypt in CentOS yum".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.