CentOS under Deployment php7 php7 Apache PHP7 mysql php7apache2 4.dl

Source: Internet
Author: User
Data-id= "1190000005005068" data-license= "CC" >

59store ERP Environment standardization

1.why to IS standard

Analyze and summarize the issues encountered during the release process in the previous months, DEV,QA,STAGE,PRODUCT 4 environment configurations are not all the same, resulting

Intranet test each environment through but in the production environment or will kneel, not always the consequences, so the United understanding of Rice finishing an ERP standard PHP environment, collation

After testing, the DEV,QA,STAGE,PRODUCT environment is all unified.

2.PHP version Selection (7.0)

Why Choose PHP7

    • PHP father said: Can be faster than the previous version of PHP 5

    • The team uses the Laravel framework to be compatible with high-version PHP

    • You can use PHP7 new features to help us keep up with the rhythm

PHP (7.0) installation under CentOS

1. Download

wget -O php-7.0.5.tar.gz http://cn2.php.net/get/php-7.0.5.tar.gz/from/this/mirror

2. Install the open package and dependent library

    • Installing development tools

      `yum groupinstall development tools`
    • Installing the Yum Extension

      1.`rpm -ivh http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm`2.`yum update`
    • Installing the PHP Support Library

         yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel php-mcrypt

3. Compiling PHP7.0

    • Compile parameters

         './configure'  '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir' '--with-freetype-dir=/usr/local/freetype' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--with-gettext' '--disable-fileinfo' '--enable-opcache'
    • Make && make install

make && make install

4. Configure PHP-FPM

    • Add Users & user groups

      1. groupadd www

      2. useradd -g www www

    • Copy php-fpm.conf file
      cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

    • Copy the PHP-FPM include file
      cp usr/local/php/etc/php-fpm.d/ww.conf.default www.conf

    • Copy php.ini
      cp php.ini-production /usr/local/php/etc/php.ini

5. Add PHP to the environment variable

1.vi /etc/profile

2.PATH=$PATH:/usr/local/php/bin

3.export PATH

4.source /etc/profile

6.PHP-FPM Self-priming

    • 1. Copy
      cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

    • Join the System startup item

      chkconfig php-fpm on

7. Restart PHP

    • Service PHP-FPM Restart

The above describes the deployment of CentOS under the PHP7, including the CENTOS,PHP7 aspects of the content, I hope the PHP tutorial interested in a friend helpful.

  • 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.