阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Eclispse Che(1):CentOS 7 安装che服务

184次阅读
没有评论

共计 8260 个字符,预计需要花费 21 分钟才能阅读完成。

1,关于 eclipse Che

Eclispse Che(1):CentOS 7 安装 che 服务
Eclipse Che 是一个高性能的基于浏览器的集成开发环境,通过提供结构化的工作区、项目输入、模块化扩展插件来支持 Codenvy 的引擎。Eclipse Che 采用 Java 开发,支持 Windows、Linux 和 OS X 系统。提供扩展功能用于支持多种编程语言。目前支持的语言包括:C++、Go、Java、Python、Ruby、SQL,提供语法高亮、代码分析、代码辅助和调试功能。

构建工具支持:Ant、Bower、Grunt、Gulp、Maven 和 Npm

支持开发工具链:Code Mirror、Git、Orion、SSH、Subversion

相关阅读:Eclispse Che(2):启动 Che 服务,进入 IDE 界面   http://www.linuxidc.com/Linux/2016-04/130601.htm

2,安装

首先需要安装 docker。使用 CentOS7 直接 yum 安装:启动 docker。

yum -y install docker
service docker start
systemctl enable docker
# 增加开机启动。

eclipse che 下载地址:
http://www.eclipse.org/che/
开源的技术发展的真快,已经开始折腾云 IDE 了。
看看这个是用啥技术实现的。

github 项目地址:
https://github.com/eclipse/che/
看了看项目的 ide,居然是用 GWT 开发的。挺怀念的,之前一直研究这个,可惜没有使用上。

各种报错:

!!!
!!! Running 'docker' succeeded, but 'docker ps' failed. This usually means that docker cannot reach its daemon.
!!!
############################ 这个是因为 docker 服务没有启动。执行 service docker start,一定要有 docker 服务。!!!
!!! This Linux user is not in docker group. See https://docs.docker.com/engine/installation/Ubuntulinux/#create-a-docker-group
!!!

!!!
!!! This Linux user was launched with a UID != 1000. Che must run under UID 1000. See https://eclipse-che.readme.io/docs/usage#section-cannot-create-projects
!!!

!!!
!!! Running 'docker' succeeded, but 'docker ps' failed. This usually means that docker cannot reach its daemon.
!!!
############################ 因为组设置的不对,创建 docker 用户。useradd docker
gpasswd -a docker root
sudo su docker
sh bin/che.sh run

!!!
!!! JAVA_HOME is not set. Please set to directory of JVM or JRE.
!!!
修改 /home/docker/.bashrc 最后一行增加
#add JAVA_HOME
export JAVA_HOME=/usr/java/default
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

!!!
!!! Che requires Java version 1.8 or higher. We found 1.7.0_75.
!!!
必须安装 jdk 1.8

成功启动:

############## HOW TO CONNECT YOUR CHE CLIENT ###############
After Che server has booted, you can connect your clients by:
1. Open browser to http://localhost:8080, or:
2. Open native chromium app.
#############################################################

Using CATALINA_BASE:   /data/eclipse-che/tomcat
Using CATALINA_HOME:   /data/eclipse-che/tomcat
Using CATALINA_TMPDIR: /data/eclipse-che/tomcat/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /data/eclipse-che/tomcat/conf/:/usr/java/default/lib/tools.jar:/data/eclipse-che/tomcat/bin/bootstrap.jar:/data/eclipse-che/tomcat/bin/tomcat-juli.jar
2016-03-14 12:56:11,212[main]             [INFO ] [o.a.c.s.VersionLoggerListener 89]    - Server version:        Apache Tomcat/8.0.29
2016-03-14 12:56:11,214[main]             [INFO ] [o.a.c.s.VersionLoggerListener 91]    - Server built:          Nov 20 2015 09:18:00 UTC
2016-03-14 12:56:11,214[main]             [INFO ] [o.a.c.s.VersionLoggerListener 93]    - Server number:         8.0.29.0
2016-03-14 12:56:11,214[main]             [INFO ] [o.a.c.s.VersionLoggerListener 95]    - OS Name:               Linux
2016-03-14 12:56:11,227[main]             [INFO ] [o.a.c.s.VersionLoggerListener 97]    - OS Version:            3.10.0-229.el7.x86_64
2016-03-14 12:56:11,227[main]             [INFO ] [o.a.c.s.VersionLoggerListener 99]    - Architecture:          amd64
2016-03-14 12:56:11,227[main]             [INFO ] [o.a.c.s.VersionLoggerListener 101]   - Java Home:             /usr/java/jdk1.8.0_40/jre
2016-03-14 12:56:11,228[main]             [INFO ] [o.a.c.s.VersionLoggerListener 103]   - JVM Version:           1.8.0_40-b26
2016-03-14 12:56:11,228[main]             [INFO ] [o.a.c.s.VersionLoggerListener 105]   - JVM Vendor:            Oracle Corporation
2016-03-14 12:56:11,228[main]             [INFO ] [o.a.c.s.VersionLoggerListener 107]   - CATALINA_BASE:         /data/eclipse-che/tomcat
2016-03-14 12:56:11,229[main]             [INFO ] [o.a.c.s.VersionLoggerListener 109]   - CATALINA_HOME:         /data/eclipse-che/tomcat
2016-03-14 12:56:11,229[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.util.logging.config.file=/data/eclipse-che/tomcat/conf/logging.properties
2016-03-14 12:56:11,229[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
2016-03-14 12:56:11,229[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Xms256m
2016-03-14 12:56:11,229[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Xmx1024m
2016-03-14 12:56:11,230[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.security.egd=file:/dev/./urandom
2016-03-14 12:56:11,230[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dport.http=8080
2016-03-14 12:56:11,230[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.home=/data/eclipse-che
2016-03-14 12:56:11,230[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.logs.dir=/data/eclipse-che/tomcat/logs/
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcom.sun.management.jmxremote
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcom.sun.management.jmxremote.ssl=false
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dche.local.conf.dir=/data/eclipse-che/conf/
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.endorsed.dirs=/data/eclipse-che/tomcat/endorsed
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcatalina.base=/data/eclipse-che/tomcat
2016-03-14 12:56:11,231[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Dcatalina.home=/data/eclipse-che/tomcat
2016-03-14 12:56:11,232[main]             [INFO ] [o.a.c.s.VersionLoggerListener 115]   - Command line argument: -Djava.io.tmpdir=/data/eclipse-che/tomcat/temp
2016-03-14 12:56:11,521[main]             [INFO ] [o.a.c.http11.Http11NioProtocol 425]  - Initializing ProtocolHandler ["http-nio-8080"]
2016-03-14 12:56:11,544[main]             [INFO ] [o.a.t.util.net.NioSelectorPool 72]   - Using a shared selector for servlet write/read
2016-03-14 12:56:11,573[main]             [INFO ] [o.a.catalina.startup.Catalina 587]   - Initialization processed in 924 ms
2016-03-14 12:56:11,625[main]             [INFO ] [c.m.JmxRemoteLifecycleListener 332]  - The JMX Remote Listener has configured the registry on port 32001 and the server on port 32101 for the Platform server
2016-03-14 12:56:11,625[main]             [INFO ] [o.a.c.core.StandardService 433]      - Starting service Catalina
2016-03-14 12:56:11,625[main]             [INFO ] [o.a.c.core.StandardEngine 259]       - Starting Servlet Engine: Apache Tomcat/8.0.29
2016-03-14 12:56:11,758[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 916]        - Deploying web application archive /data/eclipse-che/tomcat/webapps/swagger.war
2016-03-14 12:56:12,425[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 980]        - Deployment of web application archive /data/eclipse-che/tomcat/webapps/swagger.war has finished in 667 ms
2016-03-14 12:56:12,426[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 916]        - Deploying web application archive /data/eclipse-che/tomcat/webapps/dashboard.war
2016-03-14 12:56:12,695[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 980]        - Deployment of web application archive /data/eclipse-che/tomcat/webapps/dashboard.war has finished in 269 ms
2016-03-14 12:56:12,697[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 916]        - Deploying web application archive /data/eclipse-che/tomcat/webapps/ide.war
2016-03-14 12:56:19,156[ost-startStop-1]  [WARN ] [p.DockerExtConfBindingProvider 51]   - DockerExtConfBindingProvider
2016-03-14 12:56:21,243[ost-startStop-1]  [INFO ] [.c.p.d.c.DockerRegistryChecker 43]   - Probing registry 'http://localhost:5000'
2016-03-14 12:56:21,267[ost-startStop-1]  [WARN ] [.c.p.d.c.DockerRegistryChecker 50]   - Docker registry http://localhost:5000 is not available, which means that you won't be able to save snapshots of your workspaces.
How to configure registry?
        Local registry  -> https://docs.docker.com/registry/
        Remote registry -> set up 'docker.registry.auth.*' properties
2016-03-14 12:56:23,230[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 980]        - Deployment of web application archive /data/eclipse-che/tomcat/webapps/ide.war has finished in 10,532 ms
2016-03-14 12:56:23,232[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 1036]       - Deploying web application directory /data/eclipse-che/tomcat/webapps/ROOT
2016-03-14 12:56:23,325[ost-startStop-1]  [INFO ] [o.a.c.startup.HostConfig 1152]       - Deployment of web application directory /data/eclipse-che/tomcat/webapps/ROOT has finished in 93 ms
2016-03-14 12:56:23,342[main]             [INFO ] [o.a.c.http11.Http11NioProtocol 470]  - Starting ProtocolHandler ["http-nio-8080"]
2016-03-14 12:56:23,350[main]             [INFO ] [o.a.catalina.startup.Catalina 638]   - Server startup in 11776 ms

3,使用

成功启动之后就可以看到面板页面:
Eclispse Che(1):CentOS 7 安装 che 服务
可以创建一个新的项目:
Eclispse Che(1):CentOS 7 安装 che 服务
Eclispse Che(1):CentOS 7 安装 che 服务
Eclispse Che(1):CentOS 7 安装 che 服务
Eclispse Che(1):CentOS 7 安装 che 服务
遇到一个问题,从 docker 官网下载镜像出现问题。
Eclispse Che(1):CentOS 7 安装 che 服务
可以使用国内的几个镜像解决。
不在这里讨论了。

4,总结

eclipse che 都已经发布到 4 的版本了。还没有咋研究呢。
总体感觉上肯定没有本地 IDE 功能强大。
思路挺好的。可以将 docker 结合起来,而且还开源,将来做一些云服务,还是挺好的。
由于国内网络问题,没有进入工作界面。
只要有网络的地方,使用浏览器都能让码农干活。
这种项目最好还是不要发明出来的好!!!

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2016-04/130602.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计8260字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中