CentOS 6.5 under Compile and install php-7.1.6 and PHP memcached extensions

Source: Internet
Author: User
Tags fpm install php install openssl php memcached

0, install php-7.1.6 dependency Package

# yum Groupinstall "Development tools" "Desktop Platform Development" # yum-y install Openssl-devel libcurl-devel LIBMCRYP T Libmcrypt-devel bzip2-devel


1, compile and install PHP 7.1.6

# # If you need to join the pgsql extension, you must first install PostgreSQL

# wget http://cn2.php.net/get/php-7.1.6.tar.gz/from/this/ mirrorwget http://hk1.php.net/get/php-7.1.6.tar.gz/from/this/mirror# tar xf  php-7.1.6.tar.gz # cd php-7.1.6# ./configure --prefix=/usr/local/php-7.1.6 -- With-config-file-path=/usr/local/php-7.1.6/etc --with-mysqli --with-pdo-mysql --with-pgsql=/usr /pgsql-9.4/ --with-pdo-pgsql=/usr/pgsql-9.4/ --with-openssl --with-zlib --with-bz2 -- with-gettext --with-curl --with-gd --with-mhash --with-xmlrpc --with-mcrypt -- enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-fpm -- enable-mbstring --enable-pcntl --enable-sockets --enable-soap --enable-calendar -- Enable-dba --enable-exif --enable-ftp# make && make install 
# cp /usr/local/src/php-7.1.6/php.ini-production /usr/local/php-7.1.6/etc/php.ini##  Copy  php  config file under compiled source package directory # cp /usr/local/php-7.1.6/etc/php-fpm.conf.default /usr/local/ php-7.1.6/etc/php-fpm.conf ##  copying php-fpm  configuration Files # cp /usr/local/php-7.1.6/etc/php-fpm.d/ www.conf.default /usr/local/php-7.1.6/etc/php-fpm.d/www.conf##  Copying a configuration file # vim /usr/local/ php-7.1.6/etc/php-fpm.d/www.conf    # #修改  php-fpm  Modules use users and Groups user =  nginxgroup = nginx# cp /usr/local/src/php-7.1.6/sapi/fpm/init.d.php-fpm /etc/init.d/ php-fpm##  copy  php-fpm  start script to  /etc/init.d/# chmod 755 /etc/rc.d/in compiled source package directory. Init.d/php-fpm# chkconfig --add php-fpm# chkconfig --list php-fpm# vim  /etc/profile.d/php.sh ##  Export Command Search path to environment variable export  php_home=/usr/local/php-7.1.6/bin/ Export  path= $PATH: $php _home# .  /etc/profile.d/php.sh


2, install the memcached cache extension

# yum Install CYRUS-SASL cyrus-sasl-devel-y## memcached Dependency Pack # pecl install memcached# wget HTTPS://LAUNCHPAD.NET/LIBMEMCA ched/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz## php-memcached Extension Dependent Library # tar XF libmemcached-1.0.18.tar.gz # CD libmemcached-1.0.18#./configure--prefix=/usr/local/libmemcached-1.0.18--with-memcached# make && make Install#/usr/local/php-7.1.6/bin/pecl Install memcached# #前提是已经编译安装好的php中有pear命令包

libmemcached directory [No]: fill in the address of the compiled installation directory just libmemcached

# echo "extension=memcached.so" >>/usr/local/php-7.1.6/etc/php.ini # #在php配置中追加memcached模块






This article is from the "rookie" blog, please be sure to keep this source http://1433584.blog.51cto.com/1423584/1939905

CentOS 6.5 under Compile and install php-7.1.6 and PHP memcached extensions

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.