Heim  >  Artikel  >  Datenbank  >  在windows部署nexus编译hadoop cdh4.3

在windows部署nexus编译hadoop cdh4.3

WBOY
WBOYOriginal
2016-06-07 16:32:37912Durchsuche

部署nexus 死活启动不了nexus,下载了多个版本。最后下载tomcat7 + 2.5的war才可以。把war包丢到webapps目录下,启动tomcat会自动解压。。停掉tomcat,把目录改名为nexus吧。。 修改nexus\WEB-INF\plexus.properties里的路径,jar包会下载到这里 nexus-work=

部署nexus

死活启动不了nexus,下载了多个版本。最后下载tomcat7 + 2.5的war才可以。把war包丢到webapps目录下,启动tomcat会自动解压。。停掉tomcat,把目录改名为nexus吧。。

修改nexus\WEB-INF\plexus.properties里的路径,jar包会下载到这里

nexus-work=E:/sonatype-work/nexus

为避免出现tomcat内存溢出,新建文件setenv.bat,设置内存

set CATALINA_OPTS=-server -Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m

重新启动tomcat,启动完成后,访问http://localhost:8080/nexus, 用户名:admin 密码:admin123

配置maven

修改 {maven}/conf/settings.xml文件,指定本地repo目录,会把lib下载到这里

E:\apache-maven-3.1.0\repository

修改镜像,找到mirrors这里

    
      central
      central
      central
      http://127.0.0.1:8080/nexus/content/repositories/central
      cdh.repo
      cdh.repo
      cdh.repo
      http://localhost:8080/nexus/content/repositories/cdh.repo
  

上面的cdh.repo是我新增的,要在nexus上新增一个mirror,注意mirrorOf这个参数,这个是从pom.xml里的repositories找出来的,而且有个路径。

编译hadoop

编译前要改hadoop-project\pom.xml等里的protobuf-java版本,否则会下载个2.4的版本会用不了。


com.google.protobuf
protobuf-java
2.5.0
compile

需要安装好cygwin和protoc.exe(从网站下载丢到cygwin的bin目录就可以了。。),需要在cygwin里执行 mvn eclipse:eclipse

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn