The latest version 5.6.3 not only modifies several Bug s, but also modifies the security vulnerabilities in the fileinfo module.
The PHP team recommends users of the PHP 5.6 series to upgrade to the latest version 5.6.3 or more.
Briefly introduce how to install PHP 5.6 on CentOS.
Configure yum source
Additional CentOS 6.5 epel and remi sources.
# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
The following is the source of CentOS 7.0.
# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Use the yum list command to view the installable packages.
# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
Install PHP5.6
With the yum source configured, the next step is to install PHP 5.6.
# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
View the version with the PHP command.
# php --version
PHP 5.6.0 (cli) (built: Sep 3 2014 19:51:31)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
The version installed here is PHP 5.6.0, and careful users may have found that ZendGuard Loader has become Zend OPcahe.
From PHP 5.5, the PHP code cache has changed from APC to Zend OPcache.
Install mongodb extensions
wgwt http://pecl.php.net/get/mongodb-1.2.5.tgz
tar zxf mongodb-1.2.5.tgz
cd mongo-1.2.5
/usr/bin/phpize
./configure
make &&make install
Install php-fpm
yum --enablerepo=remi,remi-php56 install php-fpm php-common php-mysql php-opcache php-pear php-gd php-devel php-mbstring php-mcrypt php-cli php-pdo php-xml -y
install
memcache's job is to maintain a huge hash table in the memory of a special machine to store some arrays and files that are often read and written, thus greatly improving the efficiency of the website and reducing the pressure of the back-end database.
Experimental environment: centos 6.6 x86_64
LAMP environment: php version 5.6.8, apache version 2.4.12
1. Before installing memcached, you need to install libevent support:
# wget http://syslab.comsenz.com/downloads/linux/libevent-1.4.12-stable.tar.gz
# tar zxvf libevent-1.4.12-stable.tar.gz
# cd libevent-1.4.12-stable
#./configure --prefix=/usr/local/libevent
#make && make install
2. Compilation and installation of memcached on server side
# wget http://syslab.comsenz.com/downloads/linux/memcached-1.4.5.tar.gz
# tar zxvf memcached-1.4.5.tar.gz
# cd memcached-1.4.5
# ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/
# make && make install
3. Client installation memcache steps:
# wget http://www.lishiming.net/data/attachment/forum/memcache-2.2.3.tgz
# tar zxvf memcache-2.2.3.tgz
# cd memcache-2.2.3
# /usr/php/bin/phpize
# ./configure --with-php-config=/usr/bin/php-config --enable-memcache
# make
1) Install libevent Library
wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz
tar zxvf libevent-2.0.20-stable.tar.gz
cd libevent-2.0.20-stable/
/usr/bin/phpize
./configure --prefix=/usr/local/libevent/
make
make install
(2) Install the libevent extension( http://pecl.php.net/package/libevent)
wget http://pecl.php.net/get/libevent-0.1.0.tgz
tar -zxvf libevent-0.1.0.tgz
cd libevent-0.1.0
/usr/bin/phpize
./configure --with-php-config=/usr/bin/php-config --with-libevent=/usr/local/libevent/
make && make install
# Add extension=libevent.so to php.ini
Three configurations php.ini file
First, through the phpinfo function, find the path of php.ini, mine is: / etc/php.ini
Add the following to it:
extension=memcache.so
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
Boot from boot
chkconfig php-fpm on
Join service
chkconfig --add nginx
chkconfig --add php-fpm
Boot from boot
chkconfig nginx on
chkconfig php-fpm on
Install SSH2 extensions in the CentOS environment and record them incidentally for later reference if necessary.
Note: If we need to run directly in a formal environment, it is recommended that we debug in the test machine before using or backing up the data, in order to avoid possible problems.
First, install support library files
yum install php-devel php-pear libssh2 libssh2-devel -y
Log in to the SSH client directly, and then execute the command to return to the car and install the required library files.
Second, install SSH2 extensions
pecl install -f ssh2
Finally, you can play happily.