15
15

More than 5 years have passed since last update.

Ubuntu14.04 / Vagrant に MEAN stack をインストールする

Last updated at Posted at 2014-09-09

MongoDB

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
$ sudo apt-get update
$ sudo apt-get install mongodb-10gen

curl

$ sudo apt-get install curl
$ sudo apt-get update

Node.js

$ sudo su
# curl -sL https://deb.nodesource.com/setup | bash -
# exit
$ sudo apt-get install nodejs

git

$ sudo apt-get update
$ sudo apt-get install git

Grunt、Bower

$ sudo npm install grunt-cli -g
$ sudo npm install bower -g

MEAN

$ sudo npm install -g meanio@latest
$ mean init <myApp>
$ cd <myApp>
$ npm install ←こける(下記)

最後の$ npm installError: EACCES, mkdir '/home/vagrant/.npm/ms/0.6.2と言われて書き込めないので、

$ sudo chmod 777 /home/vagrant/.npm/*

これで無事$ npm installできる。(もっと適切な方法があれば、ぜひ教えて下さい)

アプリケーションを起動する

$ grunt

これでhttp://localhost:3000でアプリケーションが動いているのを確認できる。

mean.jpg

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15