Yum installation lamp (linux+apache+mysql+php) in the CentOS environment

Source: Internet
Author: User
Tags gpg mcrypt php download administrator password

Thank the original author.

, actually do not like to reprint this article

The internet is everywhere, but today in a centos with a site with a variety of egg pain, the inside has been running MySQL and Apache, but no PHP,

Yum install PHP5, there are no extensions, not even pdo_mysql, the server does not have the source directory, it is not the operation of the origin, is a variety of toss

busy The whole morning did not make the program completely run, want to install the extension on demand alone is too troublesome!

The following is a reprint article, I executed the first few commands (no update, no reload MySQL, Apache, not installed phpMyAdmin) after the program can run normally

so recording, early detection can save me a morning time. And hope to be useful in the future

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 for power on self-boot/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
mysqladmin-u root password ' mysql Administrator password '
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."



Yum installation lamp (linux+apache+mysql+php) in the CentOS environment

Related Article

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.