1: ?第一步以root身份执行以下操作:
在/Library/LaunchDaemons下新建com.redis.plist,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.redis</string>
        <key>RunAtLoad</key>
        <true/>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/bin/redis-server</string>
                <string>/etc/redis.conf</string>
        </array>
</dict>
</plist>
2:执行如下操作: ? ? ? ?
? ? ? ? 2.1 ? ? sudo launchctl load?/Library/LaunchDaemons/com.redis.plist
? ? ? ? 2.2 ? ??sudo launchctl start com.redis
原文:http://hongtoushizi.iteye.com/blog/2217824