Linux 系统源码编译安装Redis

#!/bin/sh
#下载源码
curl -O http://download.redis.io/redis-stable.tar.gz
# 解压缩
tar zxf redis-stable.tar.gz
cd redis-stable
# 编译安装
make PREFIX=/usr/local/redis install

# 转移路径
mkdir -p /usr/local/redis/bin/
cp src/redis-server /usr/local/redis/bin/ 
cp src/redis-cli    /usr/local/redis/bin/

# 建立快捷方式
ln -s /usr/local/redis/bin/redis-server /usr/local/bin/redis-server
ln -s /usr/local/redis/bin/redis-cli /usr/local/bin/redis-cli

将上述内容保存到 install-redis.sh 文件中,然后执行文件`/bin/sh install-redis.sh `即可安装完成

你可能感兴趣的:(linux,redis)