给大家的福利
零基础入门
对于从来没有接触过网络安全的同学,我们帮你准备了详细的学习成长路线图。可以说是最科学最系统的学习路线,大家跟着这个大的方向学习准没问题。
同时每个成长路线对应的板块都有配套的视频提供:
因篇幅有限,仅展示部分资料
需要体系化学习资料的朋友,可以加我V获取:vip204888 (备注网络安全)
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
添加一个名为features的module
打开项目,在samples目录下的pom.xml中添加名为features的module,如下图
添加features
在features目录下添加pom.xml,内容如下
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<version>5.0.5</version>
<relativePath/>
</parent>
<groupId>org.opendaylight.controller.samples</groupId>
<artifactId>mytoaster-features-aggregator</artifactId>
<version>1.10.3-SNAPSHOT</version>
<packaging>pom</packaging>
<name>org.opendaylight.controller.samples :: ${project.artifactId}</name>
<modules>
<module>odl-mytoaster</module>
<module>odl-mytoaster-provider</module>
<module>features-mytoaster</module>
</modules>
</project>
在features中添加三个目录,odl-mytoaster,odl-mytoster-provider,features-mytoaster。
mkdir odl-mytoaster odl-mytoster-provider features-mytoaster
添加前
添加后
之后,在三个目录下分别添加pom.xml文件,内容如下
odl-mytoaster下的pom.xml文件内容
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
<version>5.0.5</version>
<relativePath/>
</parent>
<groupId>org.opendaylight.controller.samples</groupId>
<artifactId>features-mytoaster</artifactId>
<version>1.10.3-SNAPSHOT</version>
<packaging>feature</packaging>
<name>ODL::org.opendaylight.mytoaster::${project.artifactId}</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>odl-mytoaster-provider</artifactId>
<version>${project.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>odl-mytoaster</artifactId>
<version>${project.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
</dependencies>
</project>
odl-mytoaster下的pom.xml内容
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
<version>5.0.5</version>
<relativePath/>
</parent>
<groupId>org.opendaylight.controller.samples</groupId>
<artifactId>odl-mytoaster</artifactId>
<version>1.10.3-SNAPSHOT</version>
<packaging>feature</packaging>
<name>OpenDaylight::mytoaster::Impl[Karaf Feature]</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>1.10.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>odl-mdsal-broker</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sample-toaster</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
features-mytoaster的内容
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
<version>5.0.5</version>
<relativePath/>
</parent>
<groupId>org.opendaylight.controller.samples</groupId>
<artifactId>odl-mytoaster-provider</artifactId>
<version>1.10.3-SNAPSHOT</version>
<packaging>feature</packaging>
<name>OpenDaylight::mytoaster::Impl[Karaf Feature]</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>1.10.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>odl-mdsal-broker</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sample-toaster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sample-toaster-provider</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
再次编译
进入controller-stable-sodium/opendaylight/md-sal/samples
在该目录下再次执行以下命令
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true
耗时5分半…
再次编译成功
添加toaster到opendaylight中
我选择了上篇文章SDN-OpenDaylight(Solium版本)应用开发入门HelloWorld中创建的helloworld项目。
在helloworld/karaf/target/assembly/system/org/opendaylight/controller下创建一个名为 samples的目录在改目录中创建如下几个文件夹 features-mytoaster odl-mytoaster-consumer sample-toaster-consumer features_mytoaster odl-mytoaster-provider sample-toaster-provider odl-mytoaster sample-toaster
mkdir samples
cd samples
mkdir features-mytoaster odl-mytoaster-consumer sample-toaster-consumer features_mytoaster odl-mytoaster-provider sample-toaster-provider odl-mytoaster sample-toaster
添加目录
在每个目录中创建和 toaster 项目中对应 module version 相同名称的目录,即创建1.10.3-SNAPSHOT目录
mkdir 1.10.3-SNAPSHOT
其他目录也有,共8个
在 odl 开头的目录中(odl-mytoaster、odl-mytoaster-provider),将前面 toaster 构建的 target目录 中找到 feature目录并将其每一个目录中的feature.xml放入创建的和版本名相同的目录(1.10.3-SNAPSHOT)中
使用cp命令
在以 sample 开头的目录(三个)中放入对应模块构建的 jar 包,不要结尾有sources的,另外两个同理。
添加jar包
feature:repo-add mvn:org.opendaylight.controller.samples/features-mytoaster/1.10.3-SNAPSHOT/xml/features
添加mytoaster
显示mytoaster已安装
Postman测试
学习路线:
这个方向初期比较容易入门一些,掌握一些基本技术,拿起各种现成的工具就可以开黑了。不过,要想从脚本小子变成黑客大神,这个方向越往后,需要学习和掌握的东西就会越来越多以下是网络渗透需要学习的内容:
需要体系化学习资料的朋友,可以加我V获取:vip204888 (备注网络安全)
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!