一、memcached的安装
1.安装
#yum -y install memcached
启动memcached
#chkconfig memcached on
#memcached -uroot -d -m 1024 -p 11211
检测是否启动成功
#netstat -tunlp | grep memcached
2,安装libmemached
获取压缩包
链接:http://pan.baidu.com/s/1i4LK8K1 密码:w3ih
#tar -zxvf libmemcached-1.0.18.tar.gz
#cd libmemcached-1.0.18
#./configure -prefix=/usr/local/libmemcached -with-memcached
#make && make install
3、下载memcache扩展包并安装
#git clone git://github.com/php-memcached-dev/php-memcached.git
#cd php-memcached
#/usr/bin/phpize
#./configure -enable-memcached -with-php-config=/usr/bin/php-config -with-zlib-dir -with-libmemcached-dir=/usr/local/libmemcached -prefix=/usr/local/phpmemcached --disable-memcached-sasl
#make -j4
#make install
提示路径/usr/lib64/php/modules/
#vi /etc/php.ini
extension=/usr/lib64/php/modules/memcached.so
#systemctl restart php-fpm.service
#php -m
如果有memcached,安装成功
测试
链接:http://pan.baidu.com/s/1pLfljPh 密码:25ad
把memcached.php放到网站根目录,浏览器访问http://IP/memcached.php
二、MongoDB安装使用
1、添加MongoDB的yum源
#vi /etc/yum.repos.d/mongodb-org-3.4.repo
把以下代码复制到文件中,保存退出
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
2、安装
#yum -y install mongodb-org
3、启动
#systemctl start mongod.service
#yum -y install policycoreutils-python
mongodb未完,待续