The redis configuration file is likely located at /usr/local/etc/redis.conf
cp /usr/local/etc/redis.conf /usr/local/etc/redis2.conf
Change the port number from 6379 to something else. I used 6380
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 6380
The LaunchAgent makes it easy to start the second redis instance
cp ~/Library/LaunchAgents/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/homebrew.mxcl.redis2.plist
Edit the LaunchAgent and change the following:
From: <string>homebrew.mxcl.redis</string>
To: <string>homebrew.mxcl.redis2</string>
From: <string>/usr/local/etc/redis.conf</string>
To: <string>/usr/local/etc/redis2.conf</string>
From: <string>/usr/local/var/log/redis.log</string>
To: <string>/usr/local/var/log/redis2.log</string>
From: <string>/usr/local/var/log/redis.log</string>
To: <string>/usr/local/var/log/redis2.log</string>
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis2.plist
launchctl start -w ~/Library/LaunchAgents/homebrew.mxcl.redis2.plist
Verify that the service is running (Note the port number)
[2.2.10] (develop) cip-private-feeds $ ps aux | grep redis
mhoitomt 1032 0.0 0.0 4346164 1064 ?? S 4Jun18 6:33.68 /usr/local/opt/redis/bin/redis-server 127.0.0.1:6379
mhoitomt 25137 0.0 0.0 4267768 900 s000 S+ 12:57PM 0:00.00 grep redis
mhoitomt 21990 0.0 0.0 4313396 2356 ?? S 12:45PM 0:00.29 /usr/local/opt/redis/bin/redis-server 127.0.0.1:6380
- redis-cli will default to port 6379. Add the port parameter to use redis-cli with the new database
redis-cli -p 6380