CentOS installs PHP runtime environment with Yum, including Php,php-fpm,nginx,mysql

Source: Internet
Author: User
Tags fpm install php

We want to use Yum to install PHP-FPM and compare the new version of Php,nginx,mysql-server, first we have to add a few sources for Yum, the CentOS default source inside the software is older, some software, libraries have not.

Epel Source:

Extra Packages for Enterprise Linux (or EPEL) or a corporate Linux add-on is a special interest group created, maintained, and managed for Red Hat Enterprise Linux (RHEL) and its derived distributions (such as CentO A high-quality add-on package project for S, scientific Linux).

EPEL packages typically do not conflict with packages in the official Linux source, or replace files with each other. EPEL is basically consistent with the Fedora project, including the complete build system, upgrade manager, Image Manager, and more.

EPEL Source Official website: Https://fedoraproject.org/wiki/EPEL

To add a Epel source:

32-bit CentOS, run the following command at the command line:

RPM-IVH http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm  

64-bit CentOS, run the following command at the command line:

RPM-IVH http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm  

Epel source can only be used as a supplement to the official CentOS source, there are also some system-based software packages, we want to install the PHP,PHP-FPM,MYSQL, etc. inside or not, so next add another software source Remi.

The software in the Remi Source is almost always the latest stable version. Perhaps you would doubt stability? Rest assured, these are Linux hardcore players compiled into the source, their familiarity with the system environment and software compilation parameters is beyond doubt.

Remi Official website: http://rpms.famillecollet.com/

To add a Remi source, regardless of the 32-bit or 64-bit system, run the following command:

RPM-IVH http://rpms.famillecollet.com/enterprise/remi-release-6.rpm  

Remi Source default is not enabled, we have to enable Remi Source, modify the file, change the file /etc/yum.repos.d/remi.repo inside enabled=0 enabled=1 , note: Change the file There are 2 enabled=0 we modify [remi] the following, do not modify the [remi-test] below.

By the end of the configuration of the Yum source, it is easy to install the software below. It's y when you ask y/n when you install it.

Install PHP,PHP-FPM and PHP extensions:

Yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql  

install MySQL:

Yum Install Mysql-server  

Install Nginx:

Yum Install Nginx  

OK, everything is done, let's list all the configuration files involved (the following configuration files are automatically created by default, not created by us):

MySQL configuration file my.cnf path:/etc/my.cnf

Nginx configuration file nginx.conf path:/etc/nginx/nginx.conf

PHP config file php.ini path:/etc/php.ini

PHP-FPM configuration file php-fpm.conf path:/etc/php-fpm.conf

CentOS installs PHP runtime environment with Yum, including Php,php-fpm,nginx,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.