1. 程式人生 > >Cloud9 3.0 SDK安裝

Cloud9 3.0 SDK安裝

roc rip c++ rep orm meteor cpp start config

Cloud9 IDE是一個基於Node.JS構建的JavaScript程序開發Web IDE。它擁有一個非常快的文本編輯器支持為JS, HTML, CSS和這幾種的混合代碼進行著色顯示。Cloud9 IDE還為node.js和Google Chrome集成調試器可以在IDE中啟動、暫停和停止。能夠在雲計算環境中測試和部署你的代碼。使用WebDAV,它還可以連到遠程工作臺。Cloud9 IDE擁有一個插件系統用來擴展現有功能,當前該IDE已經捆綁好幾個插件。

一、docker

docker鏡像地址:https://hub.docker.com/r/kdelfour/cloud9-docker/

【linux操作記錄】


[root@localhost ~]# docker search cloude9
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
[root@localhost ~]# docker search cloud9
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/kdelfour/cloud9-docker Automated Cloud9 IDE (http://c9.io) Build 103 [OK]
docker.io docker.io/sapk/cloud9 Cloud9 instance 40 [OK]
docker.io docker.io/cloud9/workspace Base image for the Cloud9 docker workspaces 11
docker.io docker.io/eeacms/cloud9 Cloud9 v3 Dockerfile 4 [OK]
docker.io docker.io/cloud9/shared Cloud9 shared space 3
docker.io docker.io/mstev0du/cloud9-ide Cloud9 IDE SDK with UID/GID mapping suppor... 3 [OK]
docker.io docker.io/cloud9/ws-cpp C++ workspace type 2
docker.io docker.io/cloud9/ws-default Default workspace 2
docker.io docker.io/rawmind/cloud9-sdk Cloud9 sdk docker image. 2 [OK]
docker.io docker.io/cloud9/ws-php PHP workspace type 1
docker.io docker.io/cloud9/ws-ruby Ruby on Rails workspace type 1
docker.io docker.io/egoexpress/cloud9 Cloud9 IDE (http://c9.io) to use within an... 1 [OK]
docker.io docker.io/lormann/cloud9 Cloud9 v3 1
docker.io docker.io/cloud9/ws-cloud9-hackspace 0
docker.io docker.io/cloud9/ws-coderdojo-nl 0
docker.io docker.io/cloud9/ws-html5 HTML5 workspace type 0
docker.io docker.io/cloud9/ws-meteor 0
docker.io docker.io/cloud9/ws-nodejs node.js workspace type 0
docker.io docker.io/cloud9/ws-python Django workspace type 0
docker.io docker.io/cloud9/ws-python-plain 0
docker.io docker.io/cloud9/ws-wordpress Wordpress workspace type 0
docker.io docker.io/cloverzrg/cloud9 AWS Cloud9 https://aws.amazon.com/cn/cloud9/ 0 [OK]
docker.io docker.io/quimnut/cloud9ide cloud9 ide on phusion image 0
docker.io docker.io/tcjn/cloud9-docker Cloud9 0 [OK]
docker.io docker.io/zuolan/cloud9-ide Cloud9-IDE-v3 on Ubuntu 0
[root@localhost ~]# docker pull docker.io/kdelfour/cloud9-docker

Using default tag: latest
Trying to pull repository docker.io/kdelfour/cloud9-docker ...
latest: Pulling from docker.io/kdelfour/cloud9-docker
a3ed95caeb02: Pull complete
2de59b831a23: Pull complete
a898f8c7f6ba: Pull complete
706514fbad74: Pull complete
e61e3d2ec3f0: Pull complete
9f5d8030ce13: Pull complete
19354fd2342f: Pull complete
2ae48536a0b1: Pull complete
433dc682daa8: Pull complete
a2111130f7f6: Pull complete
6caa5964565f: Pull complete
ed51c3e69066: Pull complete
9d6c8361afb6: Pull complete
ea0ead720ce2: Pull complete
99cd4d82407d: Pull complete
627fe943e133: Pull complete
6761a0276a15: Pull complete
5f2d63e668a7: Pull complete
Digest: sha256:0e47424ea67c175e7705eb44f07f86c4b2a88788eb87b1fc1f65bc3670067716
Status: Downloaded newer image for docker.io/kdelfour/cloud9-docker:latest
[root@localhost ~]# docker images

REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/centos latest 5182e96772bf 2 months ago 200 MB
docker.io/kdelfour/cloud9-docker latest c75f6cd12329 7 months ago 848 MB
[root@localhost ~]#
[root@localhost ~]# docker run -it -d -p 80:80 kdelfour/cloud9-docker
WARNING: IPv4 forwarding is disabled. Networking will not work.
d0e62b906e410a30ba05c213c8f3fc2c472728885b82cf4df70a80a458adb84f
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0e62b906e41 kdelfour/cloud9-docker "supervisord -c /e..." 20 seconds ago Up 13 seconds 0.0.0.0:80->80/tcp, 3000/tcp sharp_northcutt

daun:此時可以在瀏覽器訪問看見頁面,如下:

技術分享圖片

[root@localhost ~]# docker stop d0e62b906e41
d0e62b906e41
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d0e62b906e41 kdelfour/cloud9-docker "supervisord -c /e..." 4 minutes ago Exited (0) 7 seconds ago sharp_northcutt
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker start d0e62b906e41
d0e62b906e41
[root@localhost ~]# docker exec -it d0e62b906e41 /bin/bash 【duan:進入到容器內部,目錄/cloud9就是,改動plugins下的js文件,刷新頁面就會出現效果】
root@d0e62b906e41:/cloud9# ls
LICENSE NOTICE bin configs local package.json scripts settings user-plugins
LICENSE-COMMERCIAL-USE README.md build docs node_modules plugins server.js test
root@d0e62b906e41:/cloud9#

二、Linux
源碼下載地址:https://github.com/c9/core

Linux需要先行安裝nodejs,python 等

--------------------------------------------
CentOS 下源碼安裝 Node.js
1、下載源碼,你需要在https://nodejs.org/en/download/下載最新的Nodejs版本,本文以v0.10.24為例:

cd /usr/local/src/
wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
2、解壓源碼

tar zxvf node-v0.10.24.tar.gz
3、 編譯安裝

cd node-v0.10.24
./configure --prefix=/usr/local/node/0.10.24
make
make install
4、 配置NODE_HOME,進入profile編輯環境變量
vim /etc/profile
設置nodejs環境變量,在 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL 一行的上面添加如下內容:

#set for nodejs
export NODE_HOME=/usr/local/node/0.10.24
export PATH=$NODE_HOME/bin:$PATH
:wq保存並退出,編譯/etc/profile 使配置生效

source /etc/profile
驗證是否安裝配置成功

node -v
輸出 v0.10.24 表示配置成功
--------------------------------------------

nodejs安裝完成後安裝c9
步驟如下:
git clone https://github.com/c9/core.git c9sdk
cd c9sdk
scripts/install-sdk.sh

運行:node server.js
訪問:http://localhost:8181/ide.html

運行:node server.js -p 8080 -a :
訪問:http://127.0.0.1:8080/ide.html
-------------------------


【linux操作記錄】

[root@localhost home]#

[root@localhost home]# git clone git://github.com/c9/core.git c9sdk
正克隆到 ‘c9sdk‘...
remote: Enumerating objects: 52806, done.
remote: Total 52806 (delta 0), reused 0 (delta 0), pack-reused 52806
接收對象中: 100% (52806/52806), 35.29 MiB | 41.00 KiB/s, done.
處理 delta 中: 100% (32452/32452), done.

[root@localhost home]# cd c9sdk
[root@localhost c9sdk]# ls
bin docs NOTICE server.js
build LICENSE package.json settings
CODE_OF_CONDUCT.md LICENSE-COMMERCIAL-USE plugins test
configs local README.md user-plugins
CONTRIBUTING.md node_modules scripts
[root@localhost c9sdk]#


[root@localhost c9sdk]#
[root@localhost c9sdk]#
[root@localhost c9sdk]# scripts/install-sdk.sh 【duan:這一步會有報錯出現,根據提示,進行操作】
which: no npm in (/usr/lib64/qt-3.3/bin:/root/perl5/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin)
來自 https://github.com/c9/core
* [新分支] c9 -> c9/c9
* [新分支] gh-pages -> c9/gh-pages
* [新分支] master -> c9/master
* [新分支] smf-sdk -> c9/smf-sdk
Already up-to-date.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12157 100 12157 0 0 8363 0 0:00:01 0:00:01 --:--:-- 8366
Error: please install glibc-static to proceed
To do so, log into your machine and type ‘yum install glibc-static‘
[root@localhost c9sdk]# yum install glibc-static
已加載插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
正在解決依賴關系
........................

[email protected] node_modules/connect
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected])
--------------------------------------------------------------------
Success!
run ‘node server.js -p 8080 -a :‘ to launch Cloud9

------------------------------------------------------------------------------------------
出現上面的Success!提示,就是安裝成功了


啟動:
[root@localhost c9sdk]# node server.js -p 8080 -a :
Starting standalone
Connect server listening at http://127.0.0.1:8080
CDN: version standalone initialized /home/c9sdk/build
Started ‘/home/c9sdk/configs/standalone‘ with config ‘standalone‘!
Cloud9 is up and running

截圖:

技術分享圖片

技術分享圖片

Cloud9 3.0 SDK安裝