CentOS6.9源码编译安装php-memcached扩展

再现理想 2019-03-20

nginx php mysql memcached 源码 配置 html Blog wget Bash

安装memcached请移步以下地址:
CentOS6.9源码编译安装memcached
CentOS6.9yum安装memcached和php-memcached扩展
php安装请移步以下地址:
CentOS6.9源码编译安装nginx+php7+mysql环境
CentOS6.9yum安装nginx+php7+mysql环境
1.安装libmemcached

新建并进入源码保存目录

mkdir -p /usr/local/src
cd /usr/local/src

下载,解压

wget -c https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18

配置,编译,安装

#安装依赖
yum -y install gcc gcc-c++
./configure --prefix=/usr/local/libmemcached --with-memcached
make -j4
make install

2.安装memcached

进入源码保存目录,下载,解压

wget -c http://pecl.php.net/get/memcached-3.1.3.tgz
tar -zxvf memcached-3.1.3.tgz
cd memcached-3.1.3

3.生成configure文件

/usr/local/php72/bin/phpize#这是我的phpize的位置

4.配置,编译,安装

./configure --with-php-config=/usr/local/php72/bin/php-config  --with-libmemcached-dir=/usr/local/libmemcached --enable-memcached --disable-memcached-sasl
make -j4
make install

5.将memcached扩展加入php.ini

echo "extension=memcached.so" >> /usr/local/php72/etc/php.ini

6.重启php,查看phpinfo();

原文地址:https://www.jmsite.cn/blog-227.html

登录 后评论
下一篇
我是小助手
32495人浏览
2019-07-31
相关推荐
PHP 7下编译memcache扩展
772人浏览
2017-11-07 16:02:00
CentOS7yum安装nginx+php7+mysql
1888人浏览
2019-02-16 20:42:49
CentOS6.9安装Gitlab9.1.3及汉化
3852人浏览
2017-07-01 09:21:36
mysql源码安装
1131人浏览
2017-10-28 13:06:46
centos7中php使用memcache
669人浏览
2017-11-12 02:56:00
centos7中php使用memcache
508人浏览
2017-11-07 10:22:00
CentOS6.9编译安装nginx1.4.7
287人浏览
2017-06-03 11:55:00
0
0
0
9055