MacOS installation Redis

Source: Internet
Author: User
Tags redis server

1. Download, unzip, rename and compile the Redis installation

wget http://download.redis.io/releases/redis-3.0.5.tar.gz
Tar xzf redis-3.0.5.tar.gz
MV redis-3.0.5 Redis
MV redis/usr/
Cd/usr/redis
Make
Make Test
Make install

2. Specify the location where the data files are saved
The Redis unzip directory has a profile redis.conf, edit this configuration file, and locate dir./This line. Redis writes the In-memory data to a file, and this configuration is the path to the specified data file save.

3. Start the service side

cp/usr/redis/redis.conf/usr/local/etc/
/usr/local/bin/redis-server/usr/local/etc/redis.conf

4. Testing the Client

Redis-cli

5. Automatically start Redis server

sudo vi/library/launchdaemons/io.redis.redis-server.plist

The contents are as follows

<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE plist Public "-//apple computer//dtd plist 1.0//en" "Http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version= "1.0" >
<dict>
<key>Label</key>
<string>io.redis.redis-server</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/redis-server</string>
<string>/usr/local/etc/redis.conf</string>
</array>
<key>RunAtLoad</key><true/> </dict>
</plist>

sudo launchctl load/library/launchdaemons/io.redis.redis-server.plist
sudo launchctl start io.redis.redis-server
sudo launchctl stop Io.redis.redis-server

MacOS installation Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.