CentOS 6.9 x64 Yum install PHP 7.1.8

Source: Internet
Author: User
Tags imap ldap mcrypt pear

CentOS 6.9 x64 Yum install PHP 7.1.8


Installation Source

Yum Install Epel-release

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


Install the PHP components according to your needs, and I'll install all of them below.

Yum install php71w php71w-mysql php71w-odbc php71w-common php71w-embedded php71w-pgsql php71w-xml php71w-ldap php71w-fpm PHP71W-GD php71w-pdo php71w-devel php71w-mbstring php71w-mcrypt php71w-cli php71w-json php71w-imap php71w-bcmath mod_ PHP71W Php71w-pear


To view the status of the installation

[Email protected] ~]# rpm-qa |grep php

Php71w-pdo-7.1.8-2.w6.x86_64

Php71w-process-7.1.8-2.w6.x86_64

Php71w-xml-7.1.8-2.w6.x86_64

Php71w-pgsql-7.1.8-2.w6.x86_64

Php71w-mcrypt-7.1.8-2.w6.x86_64

Php71w-pear-1.10.4-1.w6.noarch

Php71w-mysql-7.1.8-2.w6.x86_64

Php71w-embedded-7.1.8-2.w6.x86_64

Php71w-bcmath-7.1.8-2.w6.x86_64

Mod_php71w-7.1.8-2.w6.x86_64

Php71w-common-7.1.8-2.w6.x86_64

Php71w-cli-7.1.8-2.w6.x86_64

Php71w-gd-7.1.8-2.w6.x86_64

Php71w-imap-7.1.8-2.w6.x86_64

Php71w-devel-7.1.8-2.w6.x86_64

Php71w-odbc-7.1.8-2.w6.x86_64

Php71w-mbstring-7.1.8-2.w6.x86_64

Php71w-ldap-7.1.8-2.w6.x86_64

Php71w-fpm-7.1.8-2.w6.x86_64


Find the installation path

[Email protected] nginx]# whereis php-fpm

PHP-FPM:/usr/sbin/php-fpm/etc/php-fpm.conf/etc/php-fpm.d/usr/share/man/man8/php-fpm.8.gz


Start PHP Service

Service PHP-FPM Start


To see if the service port is started

[Email protected] nginx]# netstat-lnt | grep 9000

TCP 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN



Join self-starter

Chkconfig PHP-FPM on


Close Service

Service PHP-FPM Stop


When the PHP installation is complete, it can be used in conjunction with Nginx without configuration

Be sure to give the site Document_root directory permissions, or PHP will prompt the file can not be found.

Chmod-r 755/home/evan


Here is an example of my nginx configuration, for reference

Vi/etc/nginx/nginx.conf


server {

Listen 80;

server_name Www.link.top www.rrweb.com;

CharSet Utf-8;

Root/home/evan;


Location/{

Index index.html index.php;

}


Location ~ \.php$ {

Root/home/evan/qrcode;

Fastcgi_pass 127.0.0.1:9000;

Fastcgi_index index.php;

Fastcgi_param script_filename $document _root$fastcgi_script_name;

Include/etc/nginx/fastcgi_params;

}

}


server {

Listen 80;

server_name link.top;

return 301 Http://www.link.top$request_uri;

}


server {

Listen 80;

server_name rrweb.com;

return 301 Http://www.rrweb.com$request_uri;

}


Re-starting Nginx service

Service Nginx Restart


Remark description

/home/evan/qrcode directory put PHP Web files

/home/evan/directory to put static HTML Web site files


Test finish Date:

2017.09.08


This article is from the "Virtualized apps" blog, so be sure to keep this source http://liwenhn.blog.51cto.com/854522/1963791

CentOS 6.9 x64 Yum install PHP 7.1.8

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.