Last active
June 4, 2021 13:07
-
-
Save jewishmoses/75854576a448cd36c39f1a3a5d9d997d to your computer and use it in GitHub Desktop.
Install redis for production
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
sudo apt install build-essential -y | |
sudo apt install tcl -y # for make test | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
make test | |
sudo make install | |
sudo mkdir /etc/redis | |
sudo mkdir /var/redis | |
sudo cp utils/redis_init_script /etc/init.d/redis_6379 | |
sudo cp redis.conf /etc/redis/6379.conf | |
sudo mkdir /var/redis/6379 | |
sudo nano /etc/redis/6379.conf | |
# Set daemonize to yes (by default it is set to no). | |
# Set the pidfile to /var/run/redis_6379.pid | |
# Set the logfile to /var/log/redis_6379.log | |
# Set the dir to /var/redis/6379 (very important step!) | |
# Set the requirepass to your desired password | |
sudo update-rc.d redis_6379 defaults | |
sudo /etc/init.d/redis_6379 start | |
rm install-redis.sh redis-stable redis-stable.tar.gz -r |
Author
jewishmoses
commented
Jun 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment