LoginSignup
0
1

More than 5 years have passed since last update.

dockerのcentOS6にionicのモバイルweb開発環境を構築したメモ

Posted at

node.jsを用意する

インストール

参考
http://qiita.com/you21979@github/items/4efd9fc4363573191b5c

# yum install epel-release
# yum install nodejs npm --enablerepo=epel
# yum install gcc gcc-c++

アップデート

参考
http://parashuto.com/rriver/tools/updating-node-js-and-npm

最新版にはエラーがあるので、安定版のv6.9.4でアップデートする。

# n 6.9.4
…

# ln -sf /usr/local/bin/node /usr/bin/node
# node -v
v6.9.4

ionicの開発環境を作る

インストール

参考
http://qiita.com/pugiemonn/items/744032601c728dbbe7b4

開発のための準備

上記を参考に進めていく。

# yo ionic
...

Error: EACCES: permission denied, mkdir '/root/.config'

同じようなエラーにぶち当たっている方がいたのでそちらを参考に。
http://qiita.com/tubone/items/11a7ceb3e7013139abab
パーミッションをいちいち変更していってもエラーはなくなるが、
新しいユーザーを作るとエラーが出なくなった。

# useradd ionic
# gpasswd -a ionic root
Adding user ionic to group root

ionicの作業フォルダのパーミッションを変更する

# chmod 774 -R /[作業フォルダ名]

もういちど

$ yo ionic

今度は成功する。
いざサーバーを…

$ grunt serve
...

Warning: Error: Cannot find where you keep your Bower packages. Use --force to continue.

そのあともbowerとgitがないと言われるのでsuに戻ってインストール

# npm install -g bower
# yum install git
# su ionic
$ grunt serve

...
Warning: Error: Cannot find where you keep your Bower packages. Use --force to continue.

まだだめだった。

$ bower install
$ grunt serve

こんどこそサーバーが立ち上がる。

0
1
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
0
1