Redis安装

Redis安装

1. 下载Redis安装文件

https://redis.io/download/

2. 解压

1
2
tar -xzvf redis-5.0.9.tar.gz
cd redis-5.0.9

3. 编译

1
2
make
make test

4. 安装

1
2
cd src
make install

5. 部署

1
2
3
4
5
6
cd ..
mkdir bin
mkdir etc
mv redis.conf etc/
cd src/
mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server /app/redis-5.0.9/bin

6. 修改配置

修改redis.conf文件,将daemonize属性改为yes

1
2
3
4
5
6
################################# GENERAL #####################################

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
# When Redis is supervised by upstart or systemd, this parameter has no impact.
daemonize yes

7. 指定启动配置文件启动服务

1
./redis-server /app/redis-5.0.9/etc/redis.conf

Redis安装
https://touchhanyu.cn/2022/10/26/code/db/redis/redis-install/
作者
皮蛋瘦肉粥
发布于
2022年10月26日
许可协议