Follow the directions on this page to get the latest stable (released) version of Meteor running on FreeBSD. As of this writing, that's version 1.4.1.1 utilizing NodeJS 4, MongoDB 3.2, and NPM 3.9
Requirements
- FreeBSD 10.3, 11.0 (might work on 9.3).
- The 64-bit version of FreeBSD must be used (32-bit is not tested).
- Internet connection required.
Quick and Easy Way
If your in a rush, the following commands will get you going.
pkg install -y mongodb32 node4 git-lite gmake python bash npm2
fetch https://raw.githubusercontent.com/tuaris/meteor-freebsd/master/install.sh
sh install.sh
To get a more detailed view of the process, continue reading.
Dependencies
The install process expects these dependent packages to be installed and present on your system. Currently the install will not install these for you and simply assumes they are already their. You can skip over this section if you already have the required dependencies installed.
You can install these packages using the pre-built binaries or your self using the ports system. Unfortunately Meteor has a hard dependency on bash.
- www/npm2
- www/node4
- databases/mongodb32
- devel/git-lite
- devel/gmake
- lang/python
- shells/bash
You can install the packages using:
pkg install -y mongodb32 node4 git-lite gmake python bash npm2
Note: If the mongodb32 package is missing, you will need to build it from the ports system. This can take several hours. As an alternative to this, you can add a custom pkg repo that includes these packages:
sh -c 'echo -e "RocketChat: {\n\turl: "http://pkg.morante.net/rocketchat/\${ABI}",\n\tenabled: yes\n}" > /usr/local/etc/pkg/repos/RocketChat.conf'
Install Instructions
Once you have all the dependent packages and ports installed, proceed to installing Meteor. A convenient script will do all the work for you. The install script will download Meteor from it's official Github repository, the FreeBSD specific patches, and generate a dev_bundle.
fetch https://raw.githubusercontent.com/tuaris/meteor-freebsd/master/install.sh
sh install.sh
By default it will install everything into a sub-folder in your current directory named meteor. The install script accepts a full path as the first argument if you wish to override this.
The process could take several minutes depending on the speed of your system. Thier will be lots of output and many warnings. The warnings are a normal part of the process and are nothing to be concern about. The installer is complete when you see the following output.
BUNDLING
DONE
Test It!
Go ahead and test t by running ./meteor --version in the directory where it's installed. The first time you run it, you'll see some messages about it downloading and installing a kit.
./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.
Installing kit from /usr/home/daniel/meteor/dev_bundle_FreeBSD_amd64_0.6.15.tar.gz
Installed dependency kit v0.6.15 in dev_bundle.
First off, it's not really downloading anything. It's just using the generated dev-bundle. Secondly, the version number shown is completely irrelevant. I will probably change that in a future release of the install script.
The first run will take a while to complete
meteor: updating npm dependencies -- meteor-deque...
modules-runtime: updating npm dependencies -- install...
modules: updating npm dependencies -- reify...
promise: updating npm dependencies -- meteor-promise, promise...
ecmascript-runtime: updating npm dependencies -- meteor-ecmascript-runtime...
babel-compiler: updating npm dependencies -- meteor-babel...
babel-runtime: updating npm dependencies -- regenerator-runtime, meteor-babel-helpers...
ddp-client: updating npm dependencies -- faye-websocket, lolex, permessage-deflate...
npm-mongo: updating npm dependencies -- mongodb...
logging: updating npm dependencies -- cli-color...
xmlbuilder: updating npm dependencies -- xmlbuilder...
Upon a successfully first run, the Meteor version and commit ID should be printed out as the last line. Subsequent runs will be much faster.
Unreleased, running from a checkout at e9a57a9 (HEAD, tag: release/METEOR@1.4.1.1, origin/release-1.4.1.1)
As a convenient and to save some typing, we can create an alias for the meteor command:
alias meteor /home/admin/meteor/meteor
The above assumes you have installed Meteor in a sub-folder named meteor in your home directory. To make it persist on your next login, add it to your ~/.cshrc (or other location if you are using a different shell)
Sample Application
To be sure things are indeed working correctly, we should run a sample application. Luckily this is very easy. Using the instructions from Meteor's tutorial, we simply do the following (assuming you created an alias for the meteor command):
cd ~
mkdir apps
cd apps
meteor create simple-todos
The output should be something like:
webapp: updating npm dependencies -- connect, parseurl, send, useragent...
ddp-server: updating npm dependencies -- permessage-deflate, sockjs...
mongo: updating npm dependencies -- mongodb-uri...
http: updating npm dependencies -- request...
caching-compiler: updating npm dependencies -- lru-cache, async...
minifier-js: updating npm dependencies -- uglify-js...
es5-shim: updating npm dependencies -- es5-shim...
minifier-css: updating npm dependencies -- css-parse, css-stringify...
minifyStdCSS: updating npm dependencies -- source-map...
Created a new Meteor app in 'simple-todos'.
To run your new app:
cd simple-todos
meteor
Now run the application as stated above
cd simple-todos
meteor npm install
meteor
Meteor will install dependent nodejs packages and start the related services and finally you app. A successful run should look like something below:
[[[[[ /usr/home/daniel/simple-todos ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
Open your browser to the IP address of the machine and the port specified, click the button "Click Me" a few times...
Yes! Meteor is indeed working on FreeBSD!.