# pkg install rabbitmq



## Native856 (Oct 17, 2021)

Hello, I wanted to install the RabbitMQ broker on the purchased server. I tried a command like "pkg install rabbitmq" but it didn't help. I don't have root access, but I know pkg is loaded (v1.16.3). FreeBSD (v12.2-RELEASE-p5). The only commands that are available are:


```
pkg: not enough arguments
Usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>|-r <rootdir>] [-C <configuration file>] [-R <repo config dir>] [-o var=value] [-4|-6] <command> [<args>]


For more information on available commands and options see 'pkg help'.
```

However, pkg help doesn't work


----------



## Argentum (Oct 18, 2021)

Native856 said:


> Hello, I wanted to install the RabbitMQ broker on the purchased server. I tried a command like "pkg install rabbitmq" but it didn't help. I don't have root access, but I know pkg is loaded (v1.16.3). FreeBSD (v12.2-RELEASE-p5). The only commands that are available are:


Do not know about *packages*, but I have done few installations from *ports* and can confirm that it is all good. 
Have one for experimentation just on this notebook:






You need *Erlang* for Rabbit. When installing from ports all the dependencies were also OK.


----------



## T-Daemon (Oct 18, 2021)

Native856 said:


> I don't have root access


Please get root access. No root access no pkg-install(8) possible. A user can be granted permissions to install packages, but to grant users permissions it also needs root access).


----------



## Native856 (Oct 18, 2021)

I learned from the server administration that RabbitMQ is loaded by default. But I also learned from them "*You should prepare your own configuration, set exports and ports. Adequately to what you want to use."
All ports must be reserved, if the port is full: changes.* "
Because when I was using:

```
[My_login@s49]:$ rabbitmq-server
mkdir: /var/db/rabbitmq/mnesia: Permission denied
Failed to create directory: /var/db/rabbitmq/mnesia
```

I found out I had no access. So I tried to manually start the server like this:

```
[My_login@s49]:$ RABBITMQ_MNESIA_DIR=/usr/home/My_login/RabbitMQ/db ./rabbitmq-server
```

But I got:

```
Protocol 'inet_tcp': register/listen error: econnrefused
```

I found out somewhere that it was something related to Erlang and his prts.
And I checked it with:

```
[My_login@s49]:$ epmd
epmd: Mon Oct 18 15:12:15 2021: failed to bind socket: Operation not permitted
[My_login@s49]:$ epmd -debug
epmd: Mon Oct 18 15:12:21 2021: epmd running - daemon = 0
epmd: Mon Oct 18 15:12:21 2021: failed to bind socket: Operation not permitted
```

Something feels like it's probably too much for me and I don't know if I can handle it. :/


----------



## astyle (Oct 18, 2021)

Unfortunately, on FreeBSD, there's not much you can do without root access. Installing, starting, and configuring servers is one of those things. 


Native856 said:


> [My_login@s49]:$ rabbitmq-server mkdir: /var/db/rabbitmq/mnesia: Permission denied Failed to create directory: /var/db/rabbitmq/mnesia


Lack of root access is why you keep getting all those "Permission Denied" errors.

I'd suggest you get your money back and rent a server elsewhere... I've seen info that Google has servers for rent, complete with root access, but that will take some digging to find a link.


----------



## Native856 (Oct 18, 2021)

How can I prepare my own RabbitMQ configuration? 
So to change the path to the base.


----------



## astyle (Oct 18, 2021)

Native856 said:


> How can I prepare my own RabbitMQ configuration?
> So to change the path to the base.


Look on the home website for RabbitMQ.... just google it. There should be some info that you can type up by hand into Notepad.exe, and upload it to the server.


----------



## Native856 (Oct 22, 2021)

Ok, 
I found out 


> Configuration files should be properly set and configuration configurations set, or the flag should be dispensed when starting the rabbit-server. According to the document, it contains information: it contains the configuration file"
> "*To override the main RabbitMQ config file location, use the RABBITMQ_CONFIG_FILE environment variable. Use .conf as file extension for the new style config format, e.g. /etc/rabbitmq/rabbitmq.conf or /data/configuration/rabbitmq/rabbitmq.conf*"



So how can I run rabbitmq-server with the flag?


----------



## astyle (Oct 22, 2021)

... contact the admins and work with them to run rabbitmq with the flag. You personally can't do it because *root access is required* for even running the command *to start the server*.

Even if you have a custom .conf file in your $HOME that you can use, the server still needs to be configured to find it. And with possible errors in config logic and syntax, the server daemon may not even start. To prevent that from happening, root access is a difference maker.


----------

