Skip to content

Commit 2e7aab9

Browse files
Homebrew guide: doc improvements related to #1573
1 parent db09cdf commit 2e7aab9

File tree

2 files changed

+75
-16
lines changed

2 files changed

+75
-16
lines changed

site/install-generic-unix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ in development environments.
2929
There's a separate [binary package for Windows](./install-windows-manual.html).
3030

3131
Unlike with the cases of [Debian](./install-debian.html), [RPM](./install-rpm.html) and [Windows installer](./install-windows.html) packages,
32-
[node management](#running-generic-unix) with this package type is performed solely using
32+
[node management](#managing-node) with this package type is performed solely using
3333
[RabbitMQ CLI tools](./cli.html) or by the operator setting up e.g. a `systemd` service manually.
3434

3535
## <a id="downloads" class="anchor" href="#downloads">Downloads</a>
@@ -74,7 +74,7 @@ It is a good candidate for including into `PATH`.
7474

7575
## <a id="operations" class="anchor" href="#operations">Operations</a>
7676

77-
### <a id="running-generic-unix" class="anchor" href="#running-generic-unix">Running and Managing the Node</a>
77+
### <a id="managing-node" class="anchor" href="#managing-node">Running and Managing the Node</a>
7878

7979
Unlike some other installation methods, namely the [Debian](./install-debian.html) and [RPM packages](./install-rpm.html), RabbitMQ
8080
generic UNIX binary build does not require `sudo`. It can be uncompressed

site/install-homebrew.md

Lines changed: 73 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ limitations under the License.
2323
[RabbitMQ formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/rabbitmq.rb) is available from
2424
[Homebrew](https://brew.sh/)'s core tap (out of the box).
2525

26-
The formula will also install a reasonably recent [supported Erlang/OTP version](./which-erlang.html)
26+
The formula will also install a recent [supported Erlang/OTP version](./which-erlang.html)
2727
as a dependency.
2828

2929

@@ -43,10 +43,79 @@ brew install rabbitmq
4343

4444
Installing the RabbitMQ formula will install key dependencies such as a [supported Erlang/OTP version](./which-erlang.html).
4545

46-
## <a id="operations" class="anchor" href="#operations">Operations</a>
46+
## <a id="locations" class="anchor" href="#locations">Locations</a>
4747

48-
The RabbitMQ server scripts and [CLI tools](./cli.html) are installed into the `sbin` directory under `/usr/local/Cellar/rabbitmq/<version>/` for macOS Intel or `/opt/homebrew/Cellar/rabbitmq/<version>/` for Apple Silicon,
49-
which is accessible from `/usr/local/opt/rabbitmq/sbin` for for macOS Intel or `/opt/homebrew/opt/rabbitmq/sbin` for Apple Silicon. Links to binaries have been created under `/usr/local/sbin` for macOS Intel or `/opt/homebrew/sbin` for Apple Silicon.
48+
The RabbitMQ server scripts and [CLI tools](./cli.html) are installed into the `sbin` directory under `/usr/local/Cellar/rabbitmq/{version}/` for Intel Macs
49+
or `/opt/homebrew/Cellar/rabbitmq/<version>/` for Apple Silicon Macs.
50+
51+
They should be accessible from `/usr/local/opt/rabbitmq/sbin` for for Intel Macs or `/opt/homebrew/opt/rabbitmq/sbin` for Apple Silicon Macs.
52+
Links to binaries have been created under `/usr/local/sbin` for Intel Macs or `/opt/homebrew/sbin` for Apple Silicon ones.
53+
54+
To find out locations for your installation, use
55+
56+
<pre class="lang-bash">
57+
brew info rabbitmq
58+
</pre>
59+
60+
With Homebrew, the node and CLI tools will use the logged in user account by default.
61+
62+
63+
## <a id="managing-node" class="anchor" href="#managing-node">Running and Managing the Node</a>
64+
65+
Unlike some other installation methods, namely the [Debian](./install-debian.html) and [RPM packages](./install-rpm.html), RabbitMQ
66+
Homebrew formula uses [generic UNIX binary builds](./install-generic-unix.html) and does not require `sudo`.
67+
68+
#### Starting the Server
69+
70+
To start a node in the foreground, run
71+
72+
<pre class="lang-bash">
73+
CONF_ENV_FILE="/opt/homebrew/etc/rabbitmq/rabbitmq-env.conf" /opt/homebrew/opt/rabbitmq/sbin/rabbitmq-server
74+
</pre>
75+
76+
To start a node in the background, use `brew service start`:
77+
78+
<pre class="lang-bash">
79+
brew services start rabbitmq
80+
</pre>
81+
82+
#### Stopping the Server
83+
84+
To stop a running node, use
85+
86+
<pre class="lang-bash">
87+
brew services stop rabbitmq
88+
</pre>
89+
90+
or CLI tools directly:
91+
92+
<pre class="lang-bash">
93+
/opt/homebrew/opt/rabbitmq/sbin/rabbitmqctl shutdown
94+
</pre>
95+
96+
The command will wait for the node process to stop. If the target node is not running,
97+
it will exit with an error.
98+
99+
#### Configuring the Server
100+
101+
File and directory locations used by Homebrew differ from Intel Macs to Apple Silicon ones.
102+
To find out locations for your installation, use
103+
104+
<pre class="lang-bash">
105+
brew info rabbitmq
106+
</pre>
107+
108+
On Apple Silicon Macs, [RabbitMQ configuration file](configure.html#configuration-files) located at `/opt/homebrew/etc/rabbitmq/rabbitmq.conf`.
109+
The file does not exist by default and can be created.
110+
111+
It is possible to [use environment variables](configure.html#customise-general-unix-environment) to control certain settings.
112+
`rabbitmq-env.conf` is located at `/opt/homebrew/etc/rabbitmq/rabbitmq-env.conf`
113+
114+
See RabbitMQ [configuration guide](configure.html) to learn more.
115+
116+
## <a id="cli" class="anchor" href="#cli"></a>
117+
118+
The formula sets up links to CLI tools under `/usr/local/sbin` for Intel Macs or `/opt/homebrew/sbin` for Apple Silicon Macs.
50119

51120
In case that directory is not in `PATH` it's recommended to append it:
52121

@@ -59,13 +128,3 @@ export PATH=$PATH:/opt/homebrew/sbin
59128

60129
Add the above export to the shell profile (such as `~/.bashrc` for bash or `~/.zshrc` for zsh)
61130
to have `PATH` updated for every new shell, including OS restarts.
62-
63-
The server can then be started with `rabbitmq-server` in the foreground or with `brew services start rabbitmq`
64-
to have it run under launchd in the background.
65-
66-
With Homebrew, the node and CLI tools will use the logged in user account by default.
67-
Using `sudo` is not required.
68-
69-
Otherwise operations are no different from the generic binary build.
70-
Please refer to the [Operations section](install-generic-unix.html#operations) of
71-
the generic binary build guide.

0 commit comments

Comments
 (0)