Skip to content

Commit

Permalink
redis
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed Aug 19, 2016
1 parent fb0ac54 commit e1c1475
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
24 changes: 24 additions & 0 deletions redis/conf/redis2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
daemonize yes
pidfile /var/run/redis_7121.pid
port 7121
timeout 60
loglevel warning
logfile "/data/redis/redis-server-7121.log"
databases 16
rdbcompression yes
dbfilename dump-7121.rdb
dir /data/redis/data
requirepass O9WTHkVu9QjdqlzFr5FBgFmLzZ9Xu10r
maxclients 50000
maxmemory 1gb
maxmemory-policy volatile-lru
appendonly yes
appendfilename "appendonly7121.aof"
appendfsync everysec
no-appendfsync-on-rewrite yes
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
slowlog-log-slower-than 10000
slowlog-max-len 1024
hz 50
aof-rewrite-incremental-fsync yes
8 changes: 7 additions & 1 deletion redis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@ echo vm.overcommit_memory=1 >> /etc/sysctl.conf
sysctl -p
#sysctl vm.overcommit_memory=1
##或执行
#echo vm.overcommit_memory=1 >>/proc/sys/vm/overcommit_memory
#echo vm.overcommit_memory=1 >>/proc/sys/vm/overcommit_memory

##释放内存
#sync && echo 3 > /proc/sys/vm/drop_caches

##测试连接
#/opt/redis/bin/redis-cli -h 192.168.1.12 -p 7121 -a Msxxsdsdsfaqqqqqq

0 comments on commit e1c1475

Please sign in to comment.