<pre name="code" class="sql"><pre name="code" class="sql">1.查看安装的redis版本
jrhrpt01:/root# redis-server --version
Redis server v=2.8.19 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=1138bcb7ae3eee58
源码包为redis-2.8.19.tar.gz
2.
yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses* libmcrypt* libtool-ltdl-devel* make cmake
3.开始编译
test-redis:/root/redis-2.8.19# make install
Hint: It's a good idea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
make[1]: Leaving directory `/root/redis-2.8.19/src'
4.
安装成功之后会在src文件夹内有redis-server和redis-cli两个命令
建议将其放到bin下
cp redis-server /usr/local/bin/
cp redis-cli /usr/local/bin/
test-redis:/root/redis-2.8.19# cp redis.conf /etc/
5.启动redis
redis-server /etc/redis.conf
redis 设置:
1.设置密码
# Warning: since