CentOS 7安装redis及php扩展
生活随笔
收集整理的這篇文章主要介紹了
CentOS 7安装redis及php扩展
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
安裝remi源
# wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm # rpm -Uvh remi-release-7.rpm # sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/remi.repo確認使用remi源時安裝的Redis版本。
安裝Redis
使用remi源yum安裝Redis。
# yum install redis --enablerepo=remi確認Redis版本。
# redis-server --version修改Redis配置文件/etc/redis.conf
想以服務形式使用Redis因此進行daemonize參數(shù)從no改為yes。
/etc/redis.confRedis重要特點就是數(shù)據(jù)的持久性,Redis保存數(shù)據(jù)的方法RDB文件(RDB=Redis DataBase?)及AOF(Append Only File),可同時使用RDB文件保存及AOF。RDB文件保存目錄是參數(shù)dir指定的目錄。
# save <seconds> <changes> # Will save the DB if both the given number of seconds and the given # In the example below the behaviour will be to save: # Note: you can disable saving completely by commenting out all "save" lines. # It is also possible to remove all the previously configured save # points by adding a save directive with a single empty string argument # save "" save 900 1 # 15分鐘之內有一次變更時進行保存 save 300 10# 5分鐘之內有10次變更時進行保存 save 60 10000# 1分鐘之內有10000次變更時進行保存redis-cli 命令 命令行打開客戶端
安裝php-redis擴展及簡單使用
轉載于:https://www.cnblogs.com/yanyuxuxing/p/6288114.html
總結
以上是生活随笔為你收集整理的CentOS 7安装redis及php扩展的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: quagga源码分析--路由信息处理ze
- 下一篇: Ajax与CustomErrors的尴尬