Some little questions from a redis newbie

Hi guys,
I’m totally new to Redis, and I’m very impressed with its performance.
I started by accident, developing a Drupal site locally on Mamp, which has Redis built in.

There are a few things I don’t understand:

  1. The Redis server is up and I have 3 sites connected (1 + 2 mirror for testing sites), but if I open the stats I have this result:
    /Applications/MAMP/Library/bin/redis-cli -s /Applications/MAMP/tmp/redis.sock --stat
    iMac:~ Reportec$ /Applications/MAMP/Library/bin/redis-cli -s /Applications/MAMP/tmp/redis.sock --stat
    Could not connect to Redis at /Applications/MAMP/tmp/redis.sock: No such file or directory

and in fact the redis.sock file is not in that directory or anywhere else.

Basically, the only files I have available in ~/Applications/Mamp(Library/bin are:

and in ~/Applications/Mamp/Library/logs/redis_error.log

  1. Same thing happens with the radis.conf file, which I occasionally read about it in some instructions, but which doesn’t exist anywhere in my installation. Can I create it/them from scratch?

  2. Last but not least, a local server is not always on like a normal server, so every time I restart the mac I have to start the redis server by going into the redis-server exec. Is there a tool to get it started quickly?

How rude; I hit send before thanking anyone who can help me figure out what I can do to improve my knowledge and operation with Redis.
Thanks to all

1 Like

I’m new to redis too, but I’ll tell you based on what I know.

There is a parameter in the redis.conf file that specifies the Unix socket path. you can find the path to the redis.sock file.

# Unix socket.
# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
# unixsocket /tmp/redis.sock
# unixsocketperm 700

I don’t know anything about mac, but in my case, I wrote and registered a script file and a service file to start redis automatically.

Hi @kautumn,
thanks for your useful answer, that unfortunately at the moment I can’t use, not having in my configuration the redis.sock file.

I’m afraid that to exploit the full potential of Redis I’ll have to install it from scratch locally and disable the Mamp extension which is very limited in its handling.

Thanks again

I tend to use the Docker images for my Redis installs for these sorts of reasons. That said, you can just create a redis.conf file and reference it from the command-line when you run redis-server.

$ redis-server /path/to/redis.conf

Thanks @guyroyse
That’s what I wanted to understand, if the redis.conf file MUST BE created by installer or it could also be created afterwards (after all it’s a PATH/TO/FILE matter, as i understood).

Thanks again

1 Like