亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

macos - Mac下Redis如何開機啟動
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-04-21 10:56:44
0
4
1022

Redis已經(jīng)安裝成功,請問Mac下如何開機啟動呢?

已解決問題,謝謝,特此總結: Mac下配置Redis服務器(自啟動、后臺運行)

PHP中文網(wǎng)
PHP中文網(wǎng)

認證0級講師

reply all(4)
巴扎黑

If you use brew, just brew install redis

Then it will tell you to

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

This way it can be started when the user logs in

If you compiled redis yourself, then write a redis.plist yourself

launchctl load YOUR_PATH/NAME_OF_REDIS.plist

Please replace {...} in the following examples with your own settings

<?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>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>local.autorun.redis</string>
    <key>ProgramArguments</key>
    <array>
      <string>{REDIS_BIN_PATH}/redis-server</string>
      <string>{REDIS_CONFIG_PATH}/redis.conf</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>UserName</key>
    <string>{YOUR_USERNAME}</string>
    <key>WorkingDirectory</key>
    <string>/usr/local/var</string>
    <key>StandardErrorPath</key>
    <string>/usr/local/var/log/redis.log</string>
    <key>StandardOutPath</key>
    <string>/usr/local/var/log/redis.log</string>
  </dict>
</plist>

Wish you success ;)

伊謝爾倫

Read the information: "Three Ways to Configure Mac OS X Startup Items" The answer below is indeed wrong, it seems not that simple.


The following is the wrong answer, just look at the joke

Although I have never used Redis, you can use the launchctl command to set up the process you want to start at boot.

This command is used to control the startup process (launchd) in OS X system. If you need to control the services started by launchd in real time, you can use this command control. For example, if you need to stop the Spotlight service, you can run the following command:

launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

If you want to start the service after stopping it, then:

launchctl load /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

You can try using the following command

launchctl load redis-server start
迷茫

Recommend two GUI tools, cakebrewlaunchrocket, cakebrew is used to manage brew’s formulae, and launchrocket is used to manage the start/stop/start of related services

Peter_Zhu

Now change to the following command:

brew services start redis
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template