標籤:redis install
#!/bin/bash
cd /usr/local/src
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
tar zxvf tcl8.6.1-src.tar.gz -C /usr/local/
cd cd /usr/local/tcl8.6.1/unix/
./configure
make
make install
cd /usr/local/src
tar zxvf redis-2.8.19.tar.gz
cd redis-2.8.19
make
make install
mkidr -p /usr/local/redis/bin
mkidr -p /usr/local/redis/etc
mkidr -p /usr/local/redis/var
cd /usr/local/bin
cp -pf redis-server /usr/local/redis/bin/
cp -pf redis-check-dump /usr/local/redis/bin/
cp -pf redis-sentinel /usr/local/redis/bin/
cp -pf redis-check-aof /usr/local/redis/bin/
cp -pf redis-cli /usr/local/redis/bin/
cp -pf /usr/local/src/redis-2.8.19/redis.conf /usr/local/redis/etc
touch /etc/profile.d/redis.sh
cat > /etc/profile.d/redis.sh << EOF
export PATH=$PATH:/usr/local/redis/bin
EOF
mv /usr/local/bin/redis-cli /usr/local/bin/redis-cli.bak
mv /usr/local/bin/redis-server /usr/local/bin/redis-server.bak
mv /usr/local/bin/redis-check-dump /usr/local/bin/redis-check-dump.bak
mv /usr/local/bin/check-aof /usr/local/bin/check-aof.bak
mv /usr/local/bin/tclsh8.6 /usr/local/bin/tclsh8.6.bak
mv /usr/local/bin/benchmark /usr/local/bin/benchmark.bak
mv /usr/local/bin/redis-sentinel /usr/local/bin/redis-sentinel.bak
本文出自 “常用文檔” 部落格,請務必保留此出處http://yujianglei.blog.51cto.com/7215578/1599009
redis-2.8.19.tar.gz 安裝