opendaylight 源码编译
2015-09-11 15:08
453 查看
首先准备好编译环境:
系统:ubuntu14.04
jdk 1.7.0_79(jdk1.7以上)sudo apt-get install openjdk-7-jdk
maven 3.0以上sudo apt-get install maven
git安装sudo apt-get install git-core
编辑maven的setting.xml文件:**
cp -n ~/.m2/settings.xml{,.orig} ; \
wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
作用是将opendaylight的远程仓库添加进来,没有添加就会出现cannot find artifacts错误;
配置好环境变量:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_79
export JRE_HOME=JAVA H OME/jreexportCLASSPATH=.: {JAVA_HOME}/lib:JRE H OME/libexportPATH= {JAVA_HOME}/bin:PATHexportM2 H OME=/home/mark/mymaven/apache−mavenexportMAVEN O PTS= ′ −Xmx1048m−XX:MaxPermSize=512m ′ exportPATH= PATH:$M2_HOME/bin
1,按照网上的教程获取opendaylight源码
git clone https://git.opendaylight.org/gerrit/p/controller.git
2,准备mvn clean install
这里问题来了: 教程上是说在controller/opendaylight/distribution/opendaylight下进行maven,但是下载的源码却找不到此目录。于是在主目录下/controller进行mvn clean install.可以发现在karaf/target下产生了distribution.opendaylight-karaf-1.5.0-SNAPSHOT.tar.gz
解压缩tar xf distribution.opendaylight-karaf-1.5.0-SNAPSHOT.tar.gz
3,启动opendaylight
1)cd controller/karaf//target/distribution.opendaylight-karaf-1.6.0-SNAPSHOT/bin/
2)./karaf
成功后便可以看到以下图形:
__
_____ \ _ _ _ _____ \ ..| | || _ | |__/ |_
/ | \____ _/ _ \ / \ | | \_ \< | || | | |/ _| | \ \
/ | \ |> > /| | | ` \/ \___ || || / // > Y \ |
_______ / / _ >| /____ (_ / _||_/__ /|_| /|
\/|| \/ \/ \/ \/\/ /_/ \/
Hit ‘’ for a list of available commands
and ‘[cmd] –help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown OpenDaylight.
系统:ubuntu14.04
jdk 1.7.0_79(jdk1.7以上)sudo apt-get install openjdk-7-jdk
maven 3.0以上sudo apt-get install maven
git安装sudo apt-get install git-core
编辑maven的setting.xml文件:**
cp -n ~/.m2/settings.xml{,.orig} ; \
wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
作用是将opendaylight的远程仓库添加进来,没有添加就会出现cannot find artifacts错误;
配置好环境变量:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_79
export JRE_HOME=JAVA H OME/jreexportCLASSPATH=.: {JAVA_HOME}/lib:JRE H OME/libexportPATH= {JAVA_HOME}/bin:PATHexportM2 H OME=/home/mark/mymaven/apache−mavenexportMAVEN O PTS= ′ −Xmx1048m−XX:MaxPermSize=512m ′ exportPATH= PATH:$M2_HOME/bin
1,按照网上的教程获取opendaylight源码
git clone https://git.opendaylight.org/gerrit/p/controller.git
2,准备mvn clean install
这里问题来了: 教程上是说在controller/opendaylight/distribution/opendaylight下进行maven,但是下载的源码却找不到此目录。于是在主目录下/controller进行mvn clean install.可以发现在karaf/target下产生了distribution.opendaylight-karaf-1.5.0-SNAPSHOT.tar.gz
解压缩tar xf distribution.opendaylight-karaf-1.5.0-SNAPSHOT.tar.gz
3,启动opendaylight
1)cd controller/karaf//target/distribution.opendaylight-karaf-1.6.0-SNAPSHOT/bin/
2)./karaf
成功后便可以看到以下图形:
__
_____ \ _ _ _ _____ \ ..| | || _ | |__/ |_
/ | \____ _/ _ \ / \ | | \_ \< | || | | |/ _| | \ \
/ | \ |> > /| | | ` \/ \___ || || / // > Y \ |
_______ / / _ >| /____ (_ / _||_/__ /|_| /|
\/|| \/ \/ \/ \/\/ /_/ \/
Hit ‘’ for a list of available commands
and ‘[cmd] –help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown OpenDaylight.
相关文章推荐
- 从源码安装Mysql/Percona 5.5
- Aut2Exe编译au3脚本为可执行文件
- CentOS 6.3下编译安装Ruby 2.0笔记
- 把Lua编译进nginx步骤方法
- Lua中编译执行代码相关的函数详解
- 浅析Ruby的源代码布局及其编程风格
- Chrome Visual Studio 2005下的编译过程
- Windows下使用Cygwin编译MySQL客户端
- android的编译和运行过程深入分析
- asp.net 抓取网页源码三种实现方法
- JS小游戏之仙剑翻牌源码详解
- JS小游戏之宇宙战机源码详解
- jQuery源码分析之jQuery中的循环技巧详解
- 本人自用的global.js库源码分享
- java中原码、反码与补码的问题分析
- c#中xml文档注释编译dll引用到其它项目示例
- Lua cjson模块编译笔记及错误解决方法
- SQLSERVER编译与重编译发生场景及重用的利弊介绍
- 浅析使用Turck-mmcache编译来加速、优化PHP代码
- 如何编译libfreetype方法详解