6

I'm following the first section of the documentation for arangodb 2.7.3. I've made it as far as

brew install
/usr/local/sbin/arangod &

The very next section after install on basic cluster setup is written for folks using linux. It asks you to modify the configuration file, which I've done, followed by restarting arango via /etc/init.d/arangodb What is the correct way to restart the arango daemon on mac osx?

ThinkingInBits
  • 10,792
  • 8
  • 57
  • 82

3 Answers3

9

I know there is accepted answer, but documentation for using homebrew was updated and right now it is quite a bit easier:

Start service

sudo brew services start arangodb

Stop service

sudo brew services stop arangodb

Restart service

sudo brew services restart arangodb

Configuration file is located at

/usr/local/etc/arangodb3/arangod.conf

It is a lot easier to edit it vs changing settings in plist file located in the arangodb installation.

vittore
  • 17,449
  • 6
  • 44
  • 82
8

You should use the regular homebrew way to start/stop services which also works for ArangoDB.

Quoting brew install arangodb:

To have launchd start arangodb at login:

ln -sfv /usr/local/opt/arangodb/*.plist ~/Library/LaunchAgents

Then to load arangodb now:

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

Or, if you don't want/need launchctl, you can just run:

/usr/local/opt/arangodb/sbin/arangod --log.file -

You should refrain from killing services (be it ArangoDB or anything else) with -9 unless its really neccessary - no clean shut down will be possible, and you may loose data integrity. Killing without a specified signal will default to signal 15 (SIGTERM) which will command the service to shut itself down.

Community
  • 1
  • 1
dothebart
  • 5,972
  • 16
  • 40
  • Anyone reading it, please check my answer below as there is simpler way to do that two years later. – vittore Dec 29 '16 at 17:16
2

I'm going with:

jobs -l

to get the pid of the process. Followed by:

kill -9 <pid>

to kill the process. Followed by:

/usr/local/sbin/arangod &

to start the process once again.

ThinkingInBits
  • 10,792
  • 8
  • 57
  • 82
  • you should not kill with `-9` unless its really neccesary. It terminates your ArangoDB daemon without the chance of it to shut down properly. simply kill it, and wait until its done with its shutdown. – dothebart Jan 04 '16 at 10:47