redis的yum和編譯安裝redis
###############################################################################################vim
yum安裝bash
yum -y install --enablerepo=remi redisapp
echo "1" > /proc/sys/vm/overcommit_memoryide
redis-server /etc/redis.confspa
redis-cli shutdowndebug
-----------------------------------------------------------------------------------------server
redis的安裝xml
一、下載安裝包
ip
wget http://download.redis.io/releases/redis-2.8.3.tar.gz
1.二、編譯安裝
tar zxvf redis-2.8.3.tar.gz
cd redis-2.8.3
make
make install
1.三、配置參數:redis.conf
vim /usr/local/redis/etc/redis.conf
必定要設置bind 內網ip
由於redis配置不當會導致root被提權漏洞
---------------------------------------------------------
#!/bin/bash
daemonize yes
pidfile /usr/local/redis/var/redis.pid
bind 127.0.0.1
port 6379
timeout 300
loglevel debug
logfile /usr/local/redis/var/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir /usr/local/redis/var/
appendonly no
appendfsync always
glueoutputbuf yes
shareobjects no
shareobjectspoolsize 1024
---------------------------------------------------------------------------
cp /usr/local/redis/etc/redis.conf /app/redis-2.8.3/redis.conf
啓動redis
cd /app/redis-2.6.7/src/
./redis-server