Eureka源码分析系列0:Eureka源码下载&debug环境搭建
2016-06-09 00:00
441 查看
官方网址: https://github.com/Netflix/eureka
版本地址: https://github.com/Netflix/eureka/releases
官方wiki: https://github.com/Netflix/eureka/wiki
当我写这篇文章的时候,发布的最后一个版本是: 1.4.8 ,所以本文将以1.4.8为例进行讲解!
http://blog.csdn.net/defonds/article/details/36678783 --- 网友写的启动Eureka,按照这个做就行
-----------------------------------------------------------------------------------------------------------------------------------------
首先,你得构建好一个Tomcat-8.0.33的debug环境
原理是根据tomcat bin启动命令,加上classpath-加上java类路径即可。
jdb -Deureka.environment=proc -Djava.util.logging.config.file=/root/apache-tomcat-8.0.33-bin/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/root/apache-tomcat-8.0.33-bin/endorsed -classpath /root/apache-tomcat-8.0.33-bin/bin/bootstrap.jar:/root/apache-tomcat-8.0.33-bin/bin/tomcat-juli.jar:/root/tomcat-8.0.33-debug:/root/tomcat-8.0.33-debug/*:/root/eureka-1.4.8-debug:/root/eureka-1.4.8-debug/* -Dcatalina.base=/root/apache-tomcat-8.0.33-bin -Dcatalina.home=/root/apache-tomcat-8.0.33-bin -Djava.io.tmpdir=/root/apache-tomcat-8.0.33-bin/temp org.apache.catalina.startup.Bootstrap start
注意: tomcat的端口请改成80端口!
-----------------------------------------------------------------------------------------------------------------------------------------
0)整体架构
1)下载
推荐使用git
git clone https://github.com/Netflix/eureka.git
然后用1.4.8的源码替换这个文件夹的文件
2)本地编译
./gradlew clean build
这里如果编译报错,请翻墙再重新编译!
编译成功,结果看
--
3)复制eureka-server下面的war包入tomcat,启动tomcat
当然,你也可以直接复制http://mvnrepository.com/artifact/com.netflix.eureka/eureka-server 选择自己的版本!
4)访问 http://192.168.1.160:8080/eureka/
如果tomcat端口已经改成80,则网址为 http://192.168.1.160/eureka/
(貌似需要好几分钟才可以正确访问网址,待我后面弄清楚再解释!)
那么,到这里,就成功启动了eureka-server!
下面,就需要去研究eureka启动时,到底做了哪些事情!
版本地址: https://github.com/Netflix/eureka/releases
官方wiki: https://github.com/Netflix/eureka/wiki
当我写这篇文章的时候,发布的最后一个版本是: 1.4.8 ,所以本文将以1.4.8为例进行讲解!
http://blog.csdn.net/defonds/article/details/36678783 --- 网友写的启动Eureka,按照这个做就行
-----------------------------------------------------------------------------------------------------------------------------------------
首先,你得构建好一个Tomcat-8.0.33的debug环境
原理是根据tomcat bin启动命令,加上classpath-加上java类路径即可。
jdb -Deureka.environment=proc -Djava.util.logging.config.file=/root/apache-tomcat-8.0.33-bin/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/root/apache-tomcat-8.0.33-bin/endorsed -classpath /root/apache-tomcat-8.0.33-bin/bin/bootstrap.jar:/root/apache-tomcat-8.0.33-bin/bin/tomcat-juli.jar:/root/tomcat-8.0.33-debug:/root/tomcat-8.0.33-debug/*:/root/eureka-1.4.8-debug:/root/eureka-1.4.8-debug/* -Dcatalina.base=/root/apache-tomcat-8.0.33-bin -Dcatalina.home=/root/apache-tomcat-8.0.33-bin -Djava.io.tmpdir=/root/apache-tomcat-8.0.33-bin/temp org.apache.catalina.startup.Bootstrap start
注意: tomcat的端口请改成80端口!
-----------------------------------------------------------------------------------------------------------------------------------------
0)整体架构
1)下载
推荐使用git
git clone https://github.com/Netflix/eureka.git
然后用1.4.8的源码替换这个文件夹的文件
2)本地编译
./gradlew clean build
这里如果编译报错,请翻墙再重新编译!
编译成功,结果看
--
3)复制eureka-server下面的war包入tomcat,启动tomcat
当然,你也可以直接复制http://mvnrepository.com/artifact/com.netflix.eureka/eureka-server 选择自己的版本!
4)访问 http://192.168.1.160:8080/eureka/
如果tomcat端口已经改成80,则网址为 http://192.168.1.160/eureka/
(貌似需要好几分钟才可以正确访问网址,待我后面弄清楚再解释!)
那么,到这里,就成功启动了eureka-server!
下面,就需要去研究eureka启动时,到底做了哪些事情!
相关文章推荐
- 【转】为什么不应该使用ZooKeeper做服务发现
- SpringCloud(第 051 篇)EurekaServer集群高可用注册中心以及简单的安全认证
- SpringCloud(第 050 篇)Netflix Eureka 源码深入剖析(下)
- 服务注册发现eureka
- (九)整合spring cloud云服务架构 - HongHu commonservice-eureka 项目构建过程
- (八)整合spring cloud云服务架构 - eureka 基础
- (五) 整合spring cloud云服务架构 - HongHu云架构代码结构构建
- 微服务开发架构——Spring Cloud常见问题与总结<一>Eureka常见问题
- Spring Cloud版——电影售票系统<—>Eureka微服务注册与发现
- 微服务开发架构——Spring Cloud常见问题与总结<四>Spring Cloud 各组件配置属性
- Spring Cloud版——电影售票系统<二>使用Ribbon实现客户端负载均衡
- eureka配置心跳和剔除不可用服务
- eureka集群
- eureka常用配置
- eureka 配合及常见问题
- Spring cloud 系列之 服务注册与发现 Eureka
- springcloud——Eureka深入
- 使用 Eureka 实现服务注册与发现
- Spring Cloud Eureka IDEA创建服务端和客户端
- SpringCloud调研系列1:服务注册