> CentOS > CentOS教程 >

CentOS安装Redis教程

1、下载

wget http://download.redis.io/redis-stable.tar.gz
tar -xzf redis-stable.tar.gz

2、编译

cd redis-stable
yum install gcc
yum install gcc-c++
yum install -y tcl
make


3、配置执行文件

cp ./src/redis-server /usr/local/bin/
cp ./src/redis-cli /usr/local/bin/
mkdir /etc/redis
mkdir /var/redis
mkdir /var/redis/log
mkdir /var/redis/run
mkdir /var/redis/6379

4、配置启动(install下有个redis-server的启动文件bash脚本)

chkconfig --add redis-server
chkconfig --level 35 redis-server  on

5、测试

telnet 127.0.0.1 6379


(责任编辑:IT)