西风古道

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
shell>wget http://download.redis.io/redis-stable.tar.gz
shell>tar xvf redis-stable.tar.gz
shell>mv redis-stable /usr/local/src
shell>cd /usr/local/src/redis-stable
shell>make
shell>make install

shell>mkdir /etc/redis   ##主配置文件目录
shell>mkdir -p /var/redis/{data,log,run} ##dump log pid目录
shell>cp redis.conf /etc/redis
shell>vim /etc/redis/redis.conf
bind 127.0.0.1 >>  bind *
daemonize no  >> daemonize yes
                        >>  pidfile /var/redis/run/redis_6379.pid
                        >>  dir /var/redis/data
                        >>  logfile /var/redis/log/redis_6379.log
shell>cp utils/redis_init_script /etc/init.d/redis
shell>chmod a+x /etc/init.d/redis
shell>vim /etc/init.d/redis
文件头部添加:
#chkconfig 2345 10 90
shell>chkconfig redis on
shell>service redis start

 

posted on 2017-03-22 10:01  西风古道  阅读(100)  评论(0编辑  收藏  举报