Redis's power is not much to say, direct serving.
First step: Download, compile, install
CD/optwget http://download.redis.io/releases/redis-3.0.5.tar.gztar ZXVF redis-3.0. 5. Tar . GZ cd/opt/redis-3.0.5 Make Make Install
The second step: Configure, modify the default port is 7963, data, log, run mode, etc., set the startup script
mkdir/etc/Redismkdir/var/log/Redismkdir-p/data/Redis
cd/opt/redis-3.0.5CPredis.conf/etc/redis/7963. confVI/etc/redis/7963.conf--------------------daemonize Noport6379logfile""# Requirepass foobareddir./change into daemonize yesport7963logfile"/var/log/redis/7963.log"Requirepass 9k3ngzq%go! w7x-0y=LIdir/data/Redis--------------------
The Quick Change configuration file command via SED is as follows:
sed-I."s/daemonize no/daemonize yes/g"/etc/redis/7963. confsed-I."s/port 6379/port 7963/g"/etc/redis/7963. confsed-I."s/logfile \ "/logfile \" \/var\/log\/redis\/7963.log\ "/g"/etc/redis/7963. confsed-I."s/# requirepass Foobared/requirepass 9k3ngzq%go! W7x-0y=li/g"/etc/redis/7963. confsed-I."s/dir. \//dir \/data\/redis/g"/etc/redis/7963. conf
Configuring Startup Scripts
CP utils/redis_init_script/etc/init.d/redisvi /etc/init.d/redis------------- ----------------------# The second line inserts the following 2 lines # chkconfig:2345# Description: Redis is a persistent key-value database# modify default port Redisport=6379# change to Redisport =7963-----------------------------------
Add a startup item and start
--list redis# start Redis service Redis start# turn off Redis Services service Redis Stop
Redis default port, the default null password has a serious security problem, so the above installation process modified the default port also added password control.
Detailed Redis database configuration improper malicious intrusion process
Resources:
Three ways to start Redis
Redis 3 Install Notes on CentOS 6.5