惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
博客园 - Franky
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
IT之家
IT之家
美团技术团队
博客园 - 司徒正美
Martin Fowler
Martin Fowler
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
Vercel News
Vercel News
雷峰网
雷峰网
B
Blog
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
D
Docker
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿

博客园 - 抱影无眠

CentOS7安装Nginx实现API网关 CentOS7中添加新硬盘 CentOS7 安装oracle 客户端 CentOS7安装RabbitMQ CentOS7安装MongoDB3.6企业版 Nginx 在Windows下搭建静态Web服务 DevExtreme 搭建Node.js开发环境 MongoDB 搭建Node.js开发环境 MongoDB Windows环境搭建 Oracle 搭建Node.js开发环境 搭建Node.js Redis开发环境 Redis Windows环境搭建 使用PM2守护Node.js应用 Windows下使用nvm管理多个Node.js 版本 vscode 插件todo-highlight Ionic 解决gradle下载慢的问题 Cmder 简明使用说明 Ionic2 开发环境搭建 Ionic2集成DevExtreme
CentOS 搭建Redis4 环境
抱影无眠 · 2018-06-15 · via 博客园 - 抱影无眠

下载

wget http://download.redis.io/releases/redis-4.0.10.tar.gz

安装步骤

tar xvf redis-4.0.10.tar.gz

make

make install

which redis-cli

配置文件

vi /etc/redis/6379.conf

参考

https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf

修改如下配置项:

dir /mnt/disk1/redis/6379

appendonly yes

daemonize yes

pidfile /var/run/redis_6379.pid

命令行启动

redis-server /etc/redis/6379.conf

设置为系统服务

vim /etc/systemd/system/redis-6379.service

代码参考:

[Unit]

Description=The redis-server Process Manager

After=syslog.target network.target

[Service]

Type=forking

PIDFile=/var/run/redis_6379.pid

ExecStart=/usr/local/bin/redis-server /etc/redis/6379.conf

ExecReload=/bin/kill -USR2 $MAINPID

ExecStop=/bin/kill -SIGINT $MAINPID

[Install]

WantedBy=multi-user.target

系统服务命令

systemctl start redis-6379.service

systemctl stop redis-6379.service

systemctl enable redis-6379.service