Warning: Use of undefined constant ‘classic_options’ - assumed '‘classic_options’' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.itisxx.com/wordpress/wp-content/themes/fullstack/single.php on line 4

Warning: Use of undefined constant ‘notice’ - assumed '‘notice’' (this will throw an Error in a future version of PHP) in /www/wwwroot/blog.itisxx.com/wordpress/wp-content/themes/fullstack/single.php on line 5
首页 > 技术 > ubuntu 17.10 安装php 7.1以及gd,redis和memcache扩展

ubuntu 17.10 安装php 7.1以及gd,redis和memcache扩展

技术 2017-11-1 14:09:26 24℃ 评论已关闭

dpkg命令见:http://www.cnblogs.com/windtail/archive/2012/06/02/2623175.html

 

gd库直接下载 deb包安装;

dpkg -i php7.1-gd_7.1.11-1+ubuntu17.10.1+deb.sury.org+1_amd64.deb

 

redis扩展:pecl install redis

memcache扩展:apt-get install php7.1-memcache

编译安装:

apt install php7.1-dev

phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

 

vim /etc/php/7.1/fpm/php.ini

加入如下两行:

extension=redis.so

extension=memcache.so

重启服务器:

systemctl restart php7.1-fpm.service

systemctl restart nginx.service

 

zlib没找到,如果是debian,ubuntu的话装zlib1g-dev,centos之类的装个zlib-devel

 

新版的客户端基于libmemcached,所以必须要安装libmemcached 

https://launchpad.net/libmemcached

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

 

上一篇: 下一篇:
请安装多说插件-下载地址