
Bobs-MacBook-Pro-2:~ bobhannan$ brew services start mongodb
Error: Unknown command: services
Bobs-MacBook-Pro-2:~ bobhannan$ brew services list
Error: Unknown command: services
services の代わりに service を使用すると問題が発生します。
答え1
というコマンドはありませんbrew services
。
これらが存在します:
brew install
brew uninstall
brew search
brew list
brew update
brew upgrade
brew pin/unpin
brew doctor
brew install -vd
brew --env | config
brew create URL --no-fetch
brew edit
以下の方法でインストールできます:
curl -o /usr/local/bin/brew-services.rb https://gist.githubusercontent.com/lwe/766293/raw/75a7907004bbff0eb3b072d1d951be2cfe7e5020/brew-services.rb
chmod +x /usr/local/bin/brew-services.rb
brew services help
答え2
まず、homebrew/boneyard をタップして brew サービスをインストールします (1 回)。
brew tap homebrew/boneyard
注: mongo を自動起動するように launchctl を設定します
$ launchctl ロード ~/Library/LaunchAgents/homebrew.mxcl.mongo.plist $ launchctl アンロード ~/Library/LaunchAgents/homebrew.mxcl.mongo.plist
ソース :http://robots.thoughtbot.com/starting-and-stopping-background-services-with-homebrew