温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

PHP升级到5.5.11版本

发布时间:2020-06-24 18:38:12 来源:网络 阅读:482 作者:wwdhks 栏目:web开发

1.首先升级yum install libmcrypt-devel

2.安装php

wget http://br1.php.net/get/php-5.5.11.tar.gz/from/this/mirror

tar zxvf php-5.5.11.tar.gz && cd php-5.5.11

./configure --prefix=/usr/local/php_5.5.11 --with-config-file-path=/usr/local/php_5.5.11/etc --with-mysql=/usr/local/mysql --with-mysqli=mysqlnd --with-iconv-dir=/usr/local --with-freetype-dir --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=/usr/local --without-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets  --with-xmlrpc --enable-zip --enable-soap  --without-pear --enable-zip --with-bz2 --enable-calendar --enable-ftp --enable-ctype --enable-exif --disable-ipv6 --with-sqlite3 --disable-pdo --disable-phar
make ZEND_EXTRA_LIBS='-liconv'
make install

cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
mkdir -p /usr/local/php_5.5.11/log
mkdir -p /usr/local/php_5.5.11/logs/
echo '/usr/local/mysql/lib/' > /etc/ld.so.conf.d/mysql.conf
ldconfig
3. 安装memcached扩展
cd ..

wget https://launchpad.net/libmemcached/1.0/1.0.14/+download/libmemcached-1.0.14.tar.gz

rm -rf libmemcached-1.0.14
tar zxf libmemcached-1.0.14.tar.gz  && cd libmemcached-1.0.14
./configure --prefix=/usr/local/libmemcached --with-memcached --disable-sasl
make && make install
提示错误:

./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
make[1]: *** [libmemcached/libmemcached_libmemcached_la-allocators.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/tools/libmemcached-1.0.14'
make: *** [all] Error 2

libmemcached-1.0.14需要升级gcc、gcc++,否则编译编译失败
yum install gcc44 gcc44-c++ libstdc++44-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44

再执行

./configure --prefix=/usr/local/libmemcached --with-memcached --disable-sasl
make && make install


wget http://pecl.php.net/get/memcached-2.1.0.tgz
rm -rf memcached-2.1.0
tar zxvf memcached-2.1.0.tgz && cd memcached-2.1.0
/usr/local/php_5.5.11/bin/phpize
./configure --with-php-config=/usr/local/php_5.5.11/bin/php-config --enable-memcached --enable-memcached-json
yes|cp -r ../php-5.5.11/ext/json/ /usr/local/php_5.5.11/include/php/ext/
make && make install
提示错误:
make: *** [php_memcached.lo] Error 1
因此需要指定libmemcached路径:
./configure --with-php-config=/usr/local/php_5.5.11/bin/php-config --enable-memcached --enable-memcached-json -with-libmemcached-dir=/usr/local/libmemcached

make && make install


4.安装tokyo_tyrant扩展

wget http://pecl.php.net/get/tokyo_tyrant-0.7.0.tgz
tar zxvf tokyo_tyrant-0.7.0.tgz
cd tokyo_tyrant-0.7.0 && /usr/local/php_5.5.11/bin/phpize && ./configure --with-php-config=/usr/local/php_5.5.11/bin/php-config --with-tokyo-tyrant=/usr/local --with-tokyo-cabinet-dir=/usr/local && make && make install


5.安装redis扩展
wget http://******/phpredis-nicolasff-20121217.tar.gz
tar zxvf phpredis-nicolasff-20121217.tar.gz
cd phpredis-master/ && /usr/local/php_5.5.11/bin/phpize
./configure --with-php-config=/usr/local/php_5.5.11/bin/php-config --enable-redis && make && make install  




向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI