#Redis安装包下载 cd /usr/local/src if [ ! -f redis-${version}.tar.gz ] then curl -o /usr/local/src/redis-${version}.tar.gz http://download.redis.io/releases/redis-${version}.tar.gz fi
#Redis依赖包安装 yum clean all yum makecache fast yum -y install gcc gcc-c++ tcl
##关闭Linux的THP(内存管理系统)通过使用更大的内存页面,来减少具有大量内存的计算机上的TLB的开销 if [ -f /sys/kernel/mm/transparent_hugepage/enabled ] then echo never > /sys/kernel/mm/transparent_hugepage/enabled fi
if [ -f /sys/kernel/mm/transparent_hugepage/defrag ] then echo never > /sys/kernel/mm/transparent_hugepage/defrag fi EOF chmod u+x /etc/rc.d/rc.local
if [ -f /sys/kernel/mm/transparent_hugepage/enabled ] then echo never > /sys/kernel/mm/transparent_hugepage/enabled fi
if [ -f /sys/kernel/mm/transparent_hugepage/defrag ] then echo never > /sys/kernel/mm/transparent_hugepage/defrag fi