作者:phpxiaofei | 来源:互联网 | 2023-08-29 11:38
一、安装memcached1.安装yuminstallmemcached2.设置1G内存memcached-umemcached-p11211-m1024-c1024-d3.启动与
一、安装memcached
1.安装
2.设置1G内存
memcached -u memcached -p 11211 -m 1024 -c 1024 -d
3.启动与设置开机自启动
systemctl start memcached
systemctl enable memcached
4.检测是否安装成功
5.退出
二、安装Redis与phpRedisAdmin
1.安装Redis
2.配置
vim /etc/redis.conf
修改配置文件37行:
daemonize yes
pidfile /data/redis/redis.pid
logfile /data/redis/logs/redis.log
3.启动redis与配置开机自启动
systemctl start redis
systemctl enable redis
4.进入Redis
5.退出
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/www
git 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.conf
vim /etc/nginx/upstream.conf
vim /data/nginx/vhosts/test.conf
4.重启nginx和apache
systemctl restart nginx
systemctl restart httpd
5.安装composer-----用php管道下载composer,并且将composer文件夹移动到bin目录
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
6.进入phpRedisAdmin文件夹,并安装composer
cd /data/www/phpRedisAdmin/
composer install