- 下载redis
wget http://download.redis.io/releases/redis-stable.tar.gz
下载wget: sudo yum -y install wget
- 解压
tar -xvzf redis-stable.tar.gz
- 编写脚本
vi run.sh
写入以下内容
docker run -d --name redis -p 6379:6379 \
-v $PWD/conf/redis.conf:/usr/local/etc/redis/redis.conf \
-v $PWD/data:/data \
redis \
redis-server /usr/local/etc/redis/redis.conf \
--appendonly yes
网友评论