Installing nginx-php 7

Source: Internet
Author: User

Installing PHP 7
    • Install dependent packages

Be sure to install gd,png,curl,xml and so on before installing the Lib Development library. If you are unsure, execute the following command:

Yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel–y

    • Compiling and installing PHP 5.5.0

The following parameters support, FTP, image functions, PDO and other support, because the use of PHP's own mysqlnd, so there is no need to install the MySQL Lib library. If you are a 64-bit system, the parameters are appended with--with-libdir=lib64, if not can be skipped.

TAR-XJF php.tar.bz2

CD php-5.5.0

./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-bz2--with-curl--enable-ftp- -enable-sockets--disable-ipv6--with-gd--with-jpeg-dir=/usr/local--with-png-dir=/usr/local--with-freetype-dir=/ Usr/local--enable-gd-native-ttf--with-iconv-dir=/usr/local--enable-mbstring--enable-calendar--with-gettext-- With-libxml-dir=/usr/local--with-zlib--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd--with-mysql=mysqlnd-- Enable-dom--enable-xml--enable-fpm--with-libdir=lib64

This step is important and complex and must be carefully

Make && make install

    • Configure PHP


CP Php.ini-production/usr/local/php/etc/php.ini

Cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf

Cp/usr/local/php/etc/php-fpm.d/www.conf.default/usr/local/php/etc/php-fpm.d/www.conf

(This is version 7 plus)

Start PHP

/usr/local/php-5.5.0/sbin/php-fpm

Installing nginx-php 7

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.