Yum installation apache+mysql+php environment in Linux system

Source: Internet
Author: User
Tags configuration php install php


First, install and configure MySQL

1.1 Execute Yum command to install MySQL
Yum-y install MySQL Mysql-server

1.2 Add MySQL to boot and start MySQL immediately
Chkconfig–levels 235 mysqld on/etc/init.d/mysqld Start

1.3 Set the MySQL root account password
Mysql_secure_installation

Second, the installation of Apache

2.1 Using the Yum command to install Apache
Yum–y Install httpd

2.2 Set boot up Apache
Chkconfig–levels 235 httpd on

2.3 Start Apache
Service httpd Start

2.4 Now directly in the browser type http://localhost or http://native IP, you should see the Apache test page

Third, install the configuration php

3.1 Installing PHP using the Yum command
Yum–y Install PHP

3.2 Restart the Apache server
Service httpd Restart

3.3 Installation of related modules using PHP to support MySQL: In order to allow PHP to support MySQL, we can install Php-mysql software package, you can also use the following command to search for available PHP modules
Yum Search PHP

Select the required module for installation
Yum–y Install php-mysql php-common php-mbstring php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

3.4 Restart the Apache server
Service httpd Restart

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.