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

2019-03-20 16:30:02 8865

安装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

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

作者

再现理想
TA的文章

相关文章