Linux install PHP and MySQL

Source: Internet
Author: User
Tags install php php and mysql php mongodb

Installing PHP on Linux is a little more complex than Windows, and it's not as easy to integrate as Windows. Technology is about tossing.

Linux version can be referenced prior to the release of Linux installation php mongodb extension

Installation Environment

System environment: CentOS 6.5 64-bit

First, set up the Yum Warehouse

In the first step, set up the Yum repositories you need to install apache,php and MySQL, add remi,epel,webtatiche and MySQL server repositories.

Yum-y Install Epel-release

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

RPM-UVH https://mirror.webtatic.com/yum/el6/latest.rpm

RPM-UVH http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

wget https://centos6.iuscommunity.org/ius-release.rpm

RPM-UVH ius-release*.rpm

Yum-y Update

II. Installation of PHP 5.6

1, installation PHP5.6

There are many ways to install PHP 5.6, the following is just one of them, only as a reference.

Yum-y Install php55u php55u-opcache php55u-xml php55u-mcrypt php55u-gd php55u-devel php55u-mysql php55u-intl php55u-mbst Ring Php55u-bcmath

2, let Apache parse PHP, in httpd.conf Add the following sentence:

LoadModule Php5_module modules/libphp5.so
<ifmodule mod_php5.c>

AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps

</IfModule>

Third, install MySQL 5.6 and set the boot start

1. Install MySQL and set up boot

Yum Install Mysql-server

Chkconfig mysqld on

2. Set MySQL password

mysql> use MySQL;

mysql> UPDATE user SET Password=password (' newpassword ') WHERE user= ' root ';

mysql> FLUSH privileges;

3. Allow Remote Login

Mysql> Grant all privileges on * * to ' user name ' @ '% ' identified by ' password ' with GRANT OPTION;

Iv. test whether PHP can be parsed by Apache

Create a new test.php file in/var/www/html/, write the following, and then save the run.

<? Phpinfo ();?>

End

Linux install PHP and MySQL

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.