LoginSignup
6
4

More than 5 years have passed since last update.

Raspberry PiにCloud9をインストールし開発環境を整える

Posted at

自宅に設置したRaspberry PiにCloud9 Coreをインストールし、自前のCloud9環境を構築する。

Node.jsのインストール

最新版のNode.jsとnpmをインストールする。

$ curl -L https://git.io/v7kPb | bash
$ node -v
v10.10.0
$ npm -v
6.4.1

参考: https://qiita.com/mascii/items/77c685df65c4cbca9315

Cloud9 Coreのインストール

$ git clone https://github.com/c9/core.git c9sdk
$ cd c9sdk
$ scripts/install-sdk.sh
$ node server.js --listen 0.0.0.0 -p 8080 -a : # ブラウザから動作確認する

Cloud9をサービスとして登録しサーバ起動時に自動起動する

$ sudo vim /etc/systemd/system/c9.service
$ cat /etc/systemd/system/c9.service
[Unit]
Description=Cloud9 Core

[Service]
Type=simple
PIDFile=/var/run/cloud9.pid
ExecStart=/usr/local/bin/node server.js --listen 0.0.0.0 -p 8080 -a :
User=pi
Group=pi
WorkingDirectory=/home/pi/c9sdk
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
$ sudo systemctl enable c9
Created symlink /etc/systemd/system/multi-user.target.wants/c9.service → /etc/systemd/system/c9.service.
$ sudo systemctl start c9

これでRaspberry Piの起動時にCloud9も自動で起動されるようになる。

6
4
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
6
4