From bdbdf2bbae551d10a67143559286bbab5310abc3 Mon Sep 17 00:00:00 2001 From: joglomedia Date: Wed, 23 Oct 2019 23:48:19 +0700 Subject: [PATCH] Enhance Redis with Authentication (requirepass) support --- scripts/install_redis.sh | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/scripts/install_redis.sh b/scripts/install_redis.sh index 96cad49..ecaecf0 100755 --- a/scripts/install_redis.sh +++ b/scripts/install_redis.sh @@ -2,7 +2,7 @@ # Redis server installer # Min. Requirement : GNU/Linux Ubuntu 14.04 -# Last Build : 01/08/2019 +# Last Build : 23/10/2019 # Author : ESLabs.ID (eslabs.id@gmail.com) # Since Version : 1.0.0 @@ -60,6 +60,7 @@ function init_redis_install { local REDISMEM_SIZE=2048 fi + # Optimize Redis config. cat >> /etc/redis/redis.conf <> /etc/redis/redis.conf <> /etc/sysctl.conf <> /etc/rc.local < /sys/kernel/mm/transparent_hugepage/enabled EOL fi - # Init script. + # Init Redis script. if [ ! -f /etc/init.d/redis-server ]; then run cp -f etc/init.d/redis-server /etc/init.d/ run chmod ugo+x /etc/init.d/redis-server @@ -105,11 +124,11 @@ EOL run link -s /lib/systemd/system/redis-server.service /etc/systemd/system/redis.service fi - # Reloading daemon. + # Reloading systemctl daemon. run systemctl daemon-reload fi - # Restart redis daemon. + # Restart Redis daemon. echo "Starting Redis server..." if [ -f /etc/systemd/system/redis.service ]; then run systemctl restart redis-server.service