CentOS7.0にOpenDaylightをインストールしてOpenFlowコントローラ実装

<用意する物>

https://my.vmware.com/jp/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0

  • CentOS7.0のisoファイル(CentOS以外のLinux系でもおそらく可能)

http://isoredirect.centos.org/centos/7/isos/x86_64/

  • Opendaylight Helium-SR4

https://www.opendaylight.org/software/release-archives

 

1.VMWareからCentOS7.0を立ち上げコンソールを開く

2.OSを最新に更新する

[(user-name)@localhost]$ su -
パスワード:(ログインパスワード)
[root@localhost]#yum -y update

3. javaのバージョンを確認し、java-1.7.0-openjdkがインストールされているか確認する。インストールされていなかった場合、インストールする。

 

javaのバージョン確認

#java --version

 

java-1.7.0-openjdkのインストール

#yum install java-1.7.0-openjdk

 

4.環境変数JAVA_HOMEを設定する。

#export JAVA_HOME=/etc/alternatives/jre_1.7.0_openjdk

 

5. mavenのインストール

#yum install maven

 

6. 事前にダウンロードしたdistribution-karaf-0.2.3-Helium-SR3.zipをCentOSへコピーし、解凍する。解凍したディレクトリ(distribution-karaf-0.2.3-Helium-SR3)が長ったらしいのでopendaylightに改名する。

# mv distribution-karaf-0.2.3-Helium-SR3 opendaylight 

 

7.opendaylightにカレントディレクトリを移す。

# cd /home/(user-nama)/opendaylight 

 

8.opendaylightを起動する。

すると、以下のように表示される。

$ ./bin/karaf
 
    ________                       ________                .__  .__       .__     __       
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_     
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\   
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |     
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|     
            \/|__|        \/     \/        \/     \/\/            /_____/      \/         
 
 
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

 9.必要なfeatureをインストールする。

opendaylight-user@root>feature:install odl-dlux-core odl-restconf-all odl-mdsal-apidocs odl-l2switch-switch odl-dlux-node 

 10.インストールされているか確認する。

opendaylight-user@root>feature:list -i

 11.Webページで確認する。

google-chromehttp://localhost:8181/dlux/index.html(opendaylightのバージョンがberylliumの場合http://localhost:8181/index.html )にアクセスする。
初期ID/PASSはadmin/adminである。feature等をインストールした後は、Webページを更新することでその反映を確認できる。
Chrome以外のブラウザだとログイン画面などが表示されない可能性があるので、Chromeを強く推奨
※URLのlocalhostの部分はホスト自身のIPアドレスでも可。
 
chromeのインストールと起動方法
#chmod u+x install_chrome.sh
#./install_chrome.sh
#logout     //root権限ログアウト
$google_chrome       //chrome起動