Redis 安装
1、下载Redis二进制文件
代码语言:text复制wget https://download.redis.io/releases/redis-5.0.14.tar.gz
2、解压 3、编译 4、安装 5、启动
代码语言:shell复制# 配置开机启动
[Unit]
Description=Redis
After=network.target
[Service]
User=admin
Type=forking
ExecStart=/usr/local/redis/bin/redis-server /home/admin/redis/etc/redis.conf
ExecStop=/usr/lcoal/redis/bin/redis-cli -h 127.0.0.1 -p 6379 shutdown
[Install]
WantedBy=multi-user.target
# 启动
systemctl enable redis-server
systemctl start redis-server