一、安装memcached
1.安装
yum install memcached
2.设置1G内存
memcached -u memcached -p 11211 -m 1024 -c 1024 -d
3.启动与设置开机自启动
systemctl start memcachedsystemctl enable memcached
4.检测是否安装成功
telnet localhost 11211
5.退出
quit
二、安装Redis与phpRedisAdmin
1.安装Redis
yum install redis
2.配置
vim /etc/redis.conf 修改配置文件37行:
daemonize yes
pidfile /data/redis/redis.pid
logfile /data/redis/logs/redis.log
3.启动redis与配置开机自启动
systemctl start redissystemctl enable redis
4.进入Redis
redis-cli
5.退出
quit
6.如果想把redis对外开放,需要修改一下redis的配置文件,这样才能给其他主机远程操作
vim /etc/redis.conf 将61行的 bind 127.0.0.1 修改成 bind 0.0.0.0
三、安装phpRedisAdmin
1.到 /data/www/目录下 克隆phpRedisAdmin的项目
cd /data/wwwgit clone https://github.com/erikdubbelboer/phpRedisAdmin
2.配置phpRedisAdmin
cd /data/www/phpRedisAdmin/includes/cp config.sample.inc.php config.inc.php
3.配置phpRedisAdmin的虚拟主机路径
vim /etc/httpd/conf/extra/httpd-vhosts.confvim /etc/nginx/upstream.confvim /data/nginx/vhosts/test.conf
4.重启nginx和apache
systemctl restart nginxsystemctl restart httpd
5.安装composer-----用php管道下载composer,并且将composer文件夹移动到bin目录
curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composer
6.进入phpRedisAdmin文件夹,并安装composer
cd /data/www/phpRedisAdmin/composer install