How to install a redis server on a non root account

If you are using a managed vps host like Dreamhost, redis is not a standard service available for non root accounts. You may want to use redis for things like cacheing for php, memory for AI, and many other reasons. This short guide details how to compile redis and run under a non root account.

Create a redis folder and follow these steps to create the server.

wget https://download.redis.io/redis-stable.tar.gz
tar -xzvf redis-stable.tar.gz
cd redis-stable
make

That is all! Now you have a readis server ready to go. Your executables were built in the src folder. You will want to adjust a few settings from here by creating a configuration file and then running the server using that file.

redis-server redis.conf

Here is an example to open the server to incoming traffic and password protect it.

bind 0.0.0.0
port 9999
requirepass SuperSecretPassword

You are ready to go! I would suggest using something like pm2 to make sure the service stays running.

Comments or questions?

Please contact us! We are excited to hear from you.