CentOS 6.6 Compile and install php7.0.5____php

Source: Internet
Author: User
Tags curl fpm openssl centos openldap
PHP7.0 official version also came out, today compiled installed a bit, write down the installation steps, I was compiled in the centos6.6 environment, as follows:

Download Address http://cn2.php.net/distributions/php-7.0.5.tar.gz Install the package required for compilation, such as Meet some of the package can not find the please execute first

Yum  Install epel-release  //Expansion pack update package
Yum update  //update yum source
And then execute the following command
Yum install-y gcc gcc-c++ make  zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype  Freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl cur L-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel OpenSSL openssl-devel openldap openldap-devel Nss_ldap Openldap-clients openldap-servers  libmcrypt libmcrypt-devel  libxpm-devel
Make & make Install Execute compile command
./configure--prefix=/usr/local/php--enable-fpm  --with-mcrypt=/usr/local/libmcrypt--with-zlib- Enable-mbstring--enable-pcntl--with-openssl  --enable-soap  --with-pear   --with-png-dir    -- With-pcre-regex   --enable-mysqlnd  \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
With-mysql-sock=/var/lib/mysql/mysql.sock  --with-gd--with-jpeg-dir=/usr/lib--enable-gd-native-ttf   -- With-gettext--with-curl  

The note in the above command is that the--WITH-MYSQLI parameter specifies the bin file path where MySQL resides:/usr/bin/mysql_config
--with-freetype-dir the path specified is/usr/include/freetype2/If you are yum installed Freetype2
Other depending on your actual need to delete and then
configuration file
# CP Php.ini-development/usr/local/php/lib/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 # cp-r./SAPI/FPM/PHP-FPM/ etc/init.d/php-fpm
Note that PHP7 www.conf This configuration file configuration phpfpm port number, and so on, if you modify the default 9000 port number should be changed here, and then change the Nginx configuration Start#/ETC/INIT.D/PHP-FPM


Students can visit this classmate's blog for more details http://blog.csdn.net/21aspnet/article/details/47708763

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.