linux 上安装 redis
2024-08-26 09:44:09
一、安装gcc
Redis是c语言开发的。
安装 redis 需要 c 语言的编译环境。如果没有 gcc 需要在线安装。
yum install gcc-c++
二、下载 redis
链接:https://pan.baidu.com/s/1rEy7QRAhqjw937uv-q665A 密码:2ra5
三、解压 redis
[fw@MyLinux 桌面]$ tar -zxvf redis-3.0.4
四、编译
进入解压后的目录 redis-3.0.4
[root@MyLinux redis-3.0.4]# make
五、安装并指定安装目录
[root@MyLinux redis-3.0.4]# make install PREFIX=/usr/local/redis
六、将 redis.conf 配置文件复制到安装目录中去
[root@MyLinux redis-3.0.4]# cp redis.conf /usr/local/redis/bin/
七、修改刚刚复制到安装目录的配置文件 redis.conf
[root@MyLinux bin]# vim redis.conf
将 daemonize no 改成 daemonize yes 。( Redis 默认不是以守护进程的方式运行,可以通过该配置项修改,使用 yes 启用 守护进程 )
八、启动 redis 服务
[root@MyLinux bin]# ./redis-server redis.conf
九、关闭 redis 服务
[root@MyLinux bin]# ./redis-cli shutdown
最新文章
- nodejs随记04
- mongoDB之Pipeline Aggregation Stages
- django--静态文件(九)
- orcad 元件库的查找位置对照表
- 利用Meida Service的Java SDK来调用Azure Media Services的Index V2实现视频字幕自动识别
- 【BZOJ】【2500】幸福的道路
- Qt之自定义界面(QMessageBox)
- pod 命令-bash: --: command not found
- hive优化要点总结
- salesforce 零基础学习(六十九)当新增/修改一条记录以后发生了什么(适合初学者)
- Java模式之模板方法模式
- mac 安装2019Adobe全家桶
- 基于IAR平台FreeRTOS移植
- 一个BAT老程序员的忠告!
- 翻译:last_value()函数(已提交到MariaDB官方手册)
- Python之包管理
- 原生js删除元素
- openstack学习-创建一台云主机(七)
- Solr游标查询提高翻页效率
- 使用Python完成排序(冒泡、选择、插入法)