PHP Installation Tutorials
In this paper, php7.0.1 is used as an example to install.
System environment:
CentOS6.7.
GCC 4.8.2
Libzip 1.0.1
The CentOS system can be updated before installation.
Yum-y Update
Download the appropriate dependent file
wget "http://cn2.php.net/distributions/php-7.0.1.tar.gz" wget "http://www.nih.at/libzip/libzip-1.0.1.tar.gz"
Unzip the corresponding file
Tar xvf php-7.0.1.tar.gztar xvf libzip-1.0.1.tar.gz
Installing the Libzip Library
CD libzip-1.0.1./configure make & make Install
Install dependent packages
You may encounter situations where so files cannot be found. Because of the reason for searching the/usr/lib64 directory, the general solution is to have a direct soft connection in the past.
Yum-y Install gmp-devel libc-client-devel ln-s/usr/lib64/libc-client.so/usr/lib/libc-client.soln-s/usr/lib64/ libldap*/usr/lib/
Compiling and installing PHP7.0.1
./configure--prefix=/usr/local/php701--enable-fpm --with-fpm-user=www--with-fpm-group=www--with-kerberos-- With-openssl--with-pcre-regex--with-zlib --enable-bcmath--with-bz2--enable-calendar--with-curl-- Enable-exif--enable-ftp--with-gd--with-gettext--with-gmp--enable-gd-jis-conv--enable-gd-native-ttf--with-imap- -with-imap-ssl --enable-intl --with-ldap--enable-mbstring--WITH-LIBMBFL--with-mcrypt--with-mysqli-- With-mysql-sock --enable-pcntl--with-pdo-mysql--enable-soap --enable-sockets --with-xmlrpc-- With-xsl--enable-zip--enable-mysqlnd--enable-maintainer-zts--enable-zend-signalsmake & make Installln-s/usr/ Local/php701/bin/php/usr/local/bin/ln-s/usr/local/php701/bin/phpize/usr/local/bin/ln-s/usr/local/php701/bin/ php-config/usr/local/bin/
Installing the Redis for PHP extension
Because the Redis Master branch does not support php7.0.1 temporarily, it is installed using Phpredis support for PHP7 branch
Wget ' Https://github.com/phpredis/phpredis/archive/php7.zip ' unzip php7.zipcd phpredis-php7phpize./configuremake & Make Install
Installing the memcached for PHP extension
Memcached relies on libmemcached and libevent two packages
Installing Libevent
wget ' https://github.com/nmathewson/Libevent/archive/release-2.0.22-stable.tar.gz ' tar xvf RELEASE-2.0.22-STABLE.TAR.GZCD libevent-release-2.0.22-stable/./configure && make && make install
Installing libmemcached
wget ' https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz ' tar xvf LIBMEMCACHED-1.0.18.TAR.GZCD libmemcached-1.0.18./configuremake && make install
Installing php-memcached
This workaround was found in the php-memcached discussion because the current version of memcached does not support php7.1.
git clone ' https://github.com/rlerdorf/php-memcached.git ' CD Php-memcached/phpize./configuremake && make Install
At this point, PHP 7.0.1 has been installed.
The installation extension is as follows:
'./configure ' --prefix=/usr/local/php701 '--enable-fpm '--with-fpm-user=www '--with-fpm-group=www '-- Enable-debug '--with-kerberos '--with-openssl '--with-pcre-regex '--with-zlib '--enable-bcmath '-- Enable-calendar '--with-curl '--enable-exif '--enable-ftp '--with-gd '--with-gettext '-- Enable-gd-jis-conv '--enable-gd-native-ttf '--with-imap '--with-imap-ssl '--enable-intl '--with-ldap '-- Enable-mbstring '--WITH-LIBMBFL '--with-mcrypt '--with-mysqli '--with-mysql-sock '--enable-pcntl '-- With-pdo-mysql '--enable-soap '--enable-sockets '--with-xmlrpc '--with-xsl '--enable-zip '-- Enable-maintainer-zts '--enable-zend-signals '
PHP Installation Tutorials