博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos7+redis+php环境配置
阅读量:7251 次
发布时间:2019-06-29

本文共 2001 字,大约阅读时间需要 6 分钟。

  centos7+redis+php环境配置

  • 下载redis(更多版本可到redis官网进行查找)
wget http://download.redis.io/releases/redis-3.0.7.tar.gz
  • 解压,编译
tar -zxvf redis-3.0.7.tar.gzcd redis-3.0.7makemake test

  make test时出现如下异常

cd src && make testmake[1]: Entering directory `/root/redis-3.0.7/src'You need tcl 8.5 or newer in order to run the Redis testmake[1]: *** [test] Error 1make[1]: Leaving directory `/root/redis-3.0.7/src'make: *** [test] Error 2

  缺少tcl,安装tcl

yum install tcl

  编译,安装

make testmake install

  成功安装出现如下提示信息

cd src && make installmake[1]: Entering directory `/root/redis-3.0.7/src'Hint: It's a good idea to run 'make test' ;)    INSTALL install    INSTALL install    INSTALL install    INSTALL install    INSTALL installmake[1]: Leaving directory `/root/redis-3.0.7/src'
  • 初始化redis
cd utils ./install_server.sh Welcome to the redis service installerThis script will help you easily set up a running redis serverPlease select the redis port for this instance: [6379] ySelecting default: 6379Please select the redis config file name [/etc/redis/6379.conf] Selected default - /etc/redis/6379.confPlease select the redis log file name [/var/log/redis_6379.log] Selected default - /var/log/redis_6379.logPlease select the data directory for this instance [/var/lib/redis/6379] Selected default - /var/lib/redis/6379Please select the redis executable path [/usr/local/bin/redis-server] Selected config:Port           : 6379Config file    : /etc/redis/6379.confLog file       : /var/log/redis_6379.logData dir       : /var/lib/redis/6379Executable     : /usr/local/bin/redis-serverCli Executable : /usr/local/bin/redis-cliIs this ok? Then press ENTER to go on or Ctrl-C to abort.Copied /tmp/6379.conf => /etc/init.d/redis_6379Installing service...Successfully added to chkconfig!Successfully added to runlevels 345!Starting Redis server...Installation successful!
  • 修改redis.conf

 

daemonize on

改为

daemonize yes

此时为后台启动

  • 启动redis

 

./src/redis-server ./redis.conf
  • 安装php支持php-redis
yum install php-redis
  •  检测是否成功安装

  通过phpinfo查看是否已经安装成功。

 

转载地址:http://onhbm.baihongyu.com/

你可能感兴趣的文章
新书问答:Agile Management
查看>>
在sublime中实现代码检测
查看>>
活在伟大的Scrum团队是什么感觉
查看>>
Swift 5进入发布倒计时
查看>>
一套代码称霸5大端口,移动金融应用还能这样开发?
查看>>
MIT开发Polaris,使网页载入加快34%
查看>>
微软对macOS和Linux开放量子开发工具集
查看>>
一份关于Angular的倡议清单
查看>>
没有估算,你仍然可以用这些决策策略
查看>>
通过调研开源基准测试集,解读大数据的应用现状和开源未来
查看>>
译文-调整G1收集器窍门
查看>>
时序数据库InfluxDB 2.0 alpha 发布:主推新的Flux查询语言,TICK栈将成为整体
查看>>
开源是项“全民工程”,揭秘开源团队的管理运作
查看>>
基于Gitflow分支模型自动化Java项目工作流
查看>>
ES6学习之一
查看>>
专访何红辉:谈谈Android源码中的设计模式
查看>>
超2亿中国用户简历曝光!MongoDB又一重大安全事故
查看>>
网易云信周梁伟专访:亿级架构IM平台的技术难点解析
查看>>
独家揭秘腾讯千亿级参数分布式机器学习系统无量
查看>>
Dubbo Mesh在闲鱼生产环境的落地实践
查看>>