Also install mongodb if you will be running the database setup on this server as well.
If you get the following output:
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:
It's just because the pkg-ng binary package system have not been setup / bootstraped yet. Simply choose yes (y) here. And press enter.
Installing pm2
We need pm2 later to daemonize or Rocket.Chat build.
Now, install pm2:
Add user for Rocket.Chat
This user will be the one used for running Rocket.Chat server.
Be sure to save the password somewhere safe if you will need to login as the Rocket.Chat user in the future.
Switch to the newly created user
(Or what ever username you picked).
Building the dev_bundle
Setting up the environment
Set some environment Variables to make the build work under FreeBSD:
MAKE_CMD=gmake is important, because meteor requires GNU make to build. The fork we will be building lets us set MAKE_CMD so we don't have to do nasty stuff to our BSD make.
Building meteor
We need a fork of meteor which allows us to set MAKE_CMD as mentioned before:
Meteor comes with scripts to build it:
(These commands might take a long time to run depending on your hardware)
After compiling the development bundles above test out the meteor setup
This should give you output:
This should output no errors (Also version numbers might change).
Troubleshooting
That should run without problems. If you run into issues check the following:
is the Environment setup right?
Are the scripts running in bash?
do I have gmake installed?
Running Rocket.Chat
First, we need the meteor binary in our $PATH
Next, we need to download Rocket.Chat:
We need to install bcrypt separately.
After that: Go ahead and start Rocket.Chat!
The first launch of Rocket.Chat might take some time as its installing dependencies. If all goes well you would see output like this:
If you would like to have the Rocket.Chat daemon running while signed out. You could use tmux to keep it running.
Install tmux (optional)
Start a tmux session and run Rocket.Chat
This will run Rocket.Chat inside a tmux session allowing you to disconnect from the terminal and let the daemon running.
$ adduser
Username: rocketchat
Full name: User used for running rocket chat
Uid (Leave empty for default): *press enter*
Login group [rocketchat]: *press enter*
Login group is rocketchat. Invite rocketchat into other groups? []: *press enter*
Login class [default]: *press enter*
Shell (sh csh tcsh git-shell bash rbash nologin) [sh]: bash
Home directory [/home/rocketchat]: *press enter, or pick where you want your Rocket.Chat installation to be*
Home directory permissions (Leave empty for default): *press enter*
Use password-based authentication? [yes]: *press enter*
Use an empty password? (yes/no) [no]: *press enter*
Use a random password? (yes/no) [no]: yes
Lock out the account after creation? [no]: *press enter*
Username : rocketchat
Password : <random>
Full Name : User used for running Rocket.Chat
Uid : 1001
Class :
Groups : rocketchat
Home : /home/rocketchat
Home Mode :
Shell : /usr/local/bin/bash
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (rocketchat) to the user database.
adduser: INFO: Password for (rocketchat) is: qGn&j9nXBx&j*C#u
Add another user? (yes/no): no
$ cd $HOME
$ git clone -b freebsd https://github.com/williambr/meteor
$ cd meteor
$ ./scripts/build-mongo-for-dev-bundle.sh
$ ./scripts/build-node-for-dev-bundle.sh
$ ./scripts/generate-dev-bundle.sh
$ ./meteor --version
It's the first time you've run Meteor from a git checkout.
I will download a kit containing all of Meteor's dependencies.
Skipping download and installing kit from /usr/home/rocketchat/meteor2/dev_bundle_FreeBSD_amd64_0.5.16.tar.gz
*** SNIPPED HERE ***
Unreleased, running from a checkout at 9719021 (HEAD -> freebsd, origin/freebsd)
$ export PATH=$PATH:$HOME/meteor
$ cd $HOME
$ git clone https://github.com/RocketChat/Rocket.Chat.git
$ cd Rocket.Chat