标签:imp iptables waiting moni work http monit dbf out
tar -zxvf redis-3.2.5.tar.gz -C /usr/src/cd /usr/src/redis-3.2.5/make && make install
mkdir -p /home/redis/binmkdir -p /home/redis/logmkdir -p /home/redis/pidmkdir -p /home/redis/db
cd /home/redis/
vim /home/redis/redis.conf根据实际需要修改配置文件,以下仅供参考
daemonize yespidfile /home/redis/pid/redis.pidlogfile /home/redis/log/redis.logdir /home/redis/dbport 6379tcp-backlog 511timeout 600tcp-keepalive 0loglevel noticedatabases 16save 900 1save 300 10save 60 10000rdbcompression yesdbfilename dump.rdbslave-serve-stale-data yesappendonly yesappendfilename "appendonly.aof"appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbslowlog-log-slower-than 10000slowlog-max-len 128latency-monitor-threshold 0notify-keyspace-events ""hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64hll-sparse-max-bytes 3000activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10aof-rewrite-incremental-fsync yes
# vm-enabled no# maxmemory 4G
vim /etc/init.d/redis#!/bin/sh## Simple Redis init.d script conceived to work on Linux systems# as it does use of the /proc filesystem.PATH=/home/redis/bin:/sbin:/usr/bin:/binREDISPORT=6379EXEC=/home/redis/bin/redis-serverCLIEXEC=/home/redis/bin/redis-cliPIDFILE=/home/redis/pid/redis.pidCONF="/home/redis/redis.conf"case "$1" instart)if [ -f $PIDFILE ]thenecho "$PIDFILE exists, process is already running or crashed"elseecho "Starting Redis server..."$EXEC $CONFfi;;stop)if [ ! -f $PIDFILE ]thenecho "$PIDFILE does not exist, process is not running"elsePID=$(cat $PIDFILE)echo "Stopping ..."$CLIEXEC -p $REDISPORT shutdownwhile [ -x /proc/${PID} ]doecho "Waiting for Redis to shutdown ..."sleep 1doneecho "Redis stopped"fi;;*)echo "Please use start or stop as first argument";;esac
chmod a+x /etc/init.d/redis
service redis startps -ef | grep redisnetstat -anptu | grep 6379
转载地址:http://www.cnblogs.com/jeffen/p/6066325.html
标签:imp iptables waiting moni work http monit dbf out
原文地址:http://www.cnblogs.com/puqiuxiaomao/p/redis.html