Installing Redis on your Mac must first ensure that your Mac has Xcode installed.
Because it uses Xcode's command Tools.
(1) Download Redis http://redis.googlecode.com/files/redis-2.8.7.tar.gz extract to current directory.
(2) You can also download it at the terminal:
| 12 |
curl -O http://redis.googlecode.com/files/redis-2.8.7.tar.gzsudotar-zxf redis-2.8.7.tar.gz |
(3) Modify the folder name, compile
| 12345 |
mvredis-2.8.7 rediscd redis/sudo makesudo make testsudo makeisntall |
(4) You will find a redis.conf configuration file in the Redis directory, open the edit this profile and locate dir. This line is configured.
This configuration is to write in-memory data to a file, where the database file is to be saved to what is the role of this configuration.
I created the OPT folder under the Mac root directory (Note that this folder must have read and write permissions)
So the configuration for this line is dir/opt/redis/
Save the configuration file after the modification, and move the configuration file to the/etc directory.
(5) After the third step make install succeeds, you should see Redis in this directory
| 1 |
/usr/local/bin/redis-server |
(6) Try to start Redis
| 1 |
/usr/local/bin/redis-server/etc/redis.conf |
If it runs successfully, you will see the following Redis Boot service screen.
What a domineering start-up interface.
(7) The server has been successfully started, the next step we can start the client to try to connect the Redis service side, while writing data test a
OK, the server is successfully connected and the data is written. the introduction of the API is followed by refinement.
Redis installed on Mac