grupogua there's not a shared instance running, but we do have Redis v5 installed via SCL which you can use to spin up your own instance like so:
- Create a new "Nginx Proxy Port" application for your Redis app. Make a note of the app's name and port assignment. I'll use "redis_app" and "55555" for the name and port in the rest of this example.
- Log on to your server via SSH as the app's shell user.
- Run the following commands to download your initial
redis.conf
:
cd ~/apps/redis_app
wget https://raw.githubusercontent.com/redis/redis/5.0.5/redis.conf
- Edit
~/apps/redis_app/redis.conf
to set the following values, replacing 55555
with your assigned port, shelluser
with your app's shell user name, and redis_app
with the name of your app:
port 55555
daemonize yes
pidfile /home/shelluser/apps/redis_app/redis.pid
logfile /home/shelluser/logs/apps/redis_app/redis.log
- If you'd prefer to connect via a UNIX socket instead of a network port then adjust the Redis configuration as follows:
port 0
unixsocket /home/shelluser/apps/redis_app/redis.sock
unixsocketperm 700
- Start the app:
scl enable rh-redis5 -- redis-server ~/apps/redis_app/redis.conf
You'll then be able to connect to Redis using 127.0.0.1
as the host and your assigned port as the port, or via your UNIX socket path.
To use redis-cli
or other utilities prefix the command with scl enable rh-redis5 --
, for example to shut down Redis:
scl enable rh-redis5 -- redis-cli -h 127.0.0.1 -p 55555 shutdown
Hope this helps 🙂