![homebrew를 사용하여 MongoDB를 시작할 때 문제가 발생했습니다.](https://linux55.com/image/59703/homebrew%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20MongoDB%EB%A5%BC%20%EC%8B%9C%EC%9E%91%ED%95%A0%20%EB%95%8C%20%EB%AC%B8%EC%A0%9C%EA%B0%80%20%EB%B0%9C%EC%83%9D%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
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
서비스 대신 서비스를 사용하는 데에도 문제가 있습니다.
답변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 서비스를 설치합니다.
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