Redis 3.0.5 Installation

Source: Internet
Author: User

1.1Official Site

official website : http://redis.io/

Chinese website : http://www.redis.cn/

1.2Download the installation package

: http://download.redis.io/releases/redis-3.0.5.tar.gz

wget http://download.redis.io/releases/redis-3.0.5.tar.gz

1.3Install support Packages
Yum Install gcc Zmalloc jemalloc*
1.4Create a program directory
Data Catalog: Mkdir-p/opt/redis/data Log directory: Mkdir-p/opt/redis/log

1.5Unzip the installation
TAR-ZXVF redis-3.0.5.tar.gzcd redis-3.0.5make Prefix=/opt/redis malloc=libc INSTALLCP./src/redis-trib.rb/opt/redis/ Bin/ln-s/opt/redis/bin/redis-trib.rb/bin/redis-trib.rbln-s/opt/redis/bin/*/bin/


1.6 Configuring Redis
[[email protected] ~]# cat/etc/redis/redis.conf |grep-v "^#" |grep-v "^$" Daemonize Yespidfile/opt/redis/redis.pidport 6 379bind 0.0.0.0timeout 300loglevel noticelogfile/opt/redis/log/redis_01.logdatabases 16save 60 1save 10save 1000 0rdbcompression yesdbfilename dump_01.rdbdir/opt/redis/datamaxclients 1280

1.7Registration Services1.7.1copying scripts from the installation directory
CP./utils/redis_init_script/etc/init.d/redis

1.7.2Modifying Scripts

VI /etc/init.d/redis

#!/bin/sh

# Add the following line

#chkconfig: 2345 80 90

# simple Redis INIT.D script conceived to work on Linux systems

# as it does use of the/proc filesystem.

redisport=6379

#修改以下几行

Exec=/opt/redis/bin/redis-server  

Cliexec=/opt/redis/bin/redis-cli

Pidfile=/opt/redis/redis_${redisport}.pid

conf= "/etc/redis/redis.conf"

1.7.3Add Service
Chkconfig--add redischkconfig--list Redis

1.7.4Start the service
Service Redis Start

1.8System Settings1.8.1Turn off selinux
Configure the shutdown vi/etc/selinux/config. selinux=disabled Close now Setenforce 0
1.8.2Firewall Open 6379 Port
Add a policy cat/etc/sysconfig/iptables|grep 6379-a input-m State--state new-m tcp-p TCP--dport 6379-j accept Restart Firewall service iptables restart



This article is from the "Dead Leaf" blog, please make sure to keep this source http://mydbs.blog.51cto.com/513727/1745300

Redis 3.0.5 Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.