redis install single单机安装

2024-07-04

http://download.redis.io/releases/

ver=redis-6.2.9
ver=redis-7.0.15
ver=redis-7.2.5

wget -c http://download.redis.io/releases/${ver}.tar.gz
tar zxf ${ver}.tar.gz
cd ${ver}
make && make install

/bin/cp utils/redis_init_script /etc/init.d/redis

sed -i 's/CONF$/CONF \&/g' /etc/init.d/redis
sed -i '/^CONF/d' /etc/init.d/redis
sed -i '18aCONF\=\"\/usr\/local\/bin\/redis.conf\"' /etc/init.d/redis

cat > /usr/local/bin/redis.conf << EOF bind 0.0.0.0 port 6379 requirepass 123456 EOF sed -i '/^echo/d' /etc/rc.local cat >> /etc/rc.local << EOT echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo 511 > /proc/sys/net/core/somaxconn

EOT

分类:Linux | 标签: |

相关日志

评论被关闭!