[原创]OpenvSwitch安装
一、安裝環(huán)境:
ubuntu-12.04-64bit
二、使用root權(quán)限,安裝所需軟件:
apt-get install build-essential
apt-get install openssl
三、安裝openvswitch-1.9.3:
1.將下載文件拷貝到#/home/ruanjian/文件夾下;
2.解壓 tar -xzf openvswitch-1.9.3.tar.gz
3.生成內(nèi)核模式的OpenvSwitch時(shí)需指定內(nèi)核源碼編譯目錄,基本步驟為:
#cd openvswitch-1.9.3/
#./configure --with-linux=/lib/modules/`uname -r`/build
#make && make install
#insmod datapath/linux/openvswitch.ko
4.建立OpenvSwitch配置文件和數(shù)據(jù)庫(kù):
#mkdir -p /usr/local/etc/openvswitch
#ovsdb-tool create /usr/local/etc/openvswitch/conf.db /usr/local/share/openvswitch/vswitch.ovsschema
5.啟動(dòng)配置數(shù)據(jù)庫(kù):
#ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,manager_options --private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert --pidfile --detach
6.初始化數(shù)據(jù)庫(kù):
#ovs-vsctl --no-wait init
7.啟動(dòng)OpenvSwitch daemon,連接到同樣的Unix domain socket上:
#ovs-vswitchd --pidfile --detach
四、安裝結(jié)束。
五、啟動(dòng)OVS:
當(dāng)?shù)诙问褂玫臅r(shí)候需要啟動(dòng)OVS,步驟為:
1.進(jìn)入目錄:
#cd openvswitch-1.9.3/
2.加載openvswitch模塊:
#insmod datapath/linux/openvswitch.ko
3.啟動(dòng)配置數(shù)據(jù)庫(kù):
#ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,manager_options --private-key=db:SSL,private_key --certificate=db:SSL,certificate --bootstrap-ca-cert=db:SSL,ca_cert --pidfile --detach
4.初始化數(shù)據(jù)庫(kù)(可選,第一次安裝時(shí)必須輸入,啟動(dòng)不需要輸入,但輸入也不會(huì)有問(wèn)題)
#ovs-vsctl --no-wait init
5.啟動(dòng)OpenvSwitch daemon,連接到同樣的Unix domain socket上:
#ovs-vswitchd --pidfile --detach
6.啟動(dòng)完成。
六、關(guān)閉OVS:(腳本)
#!/bin/sh
kill `cd /var/run/openvswitch && cat ovs-brcompatd.pid ovsdb-server.pid ovs-vswitchd.pid ovs-controller.pid ovs-monitor-ipsec.pid`
?
轉(zhuǎn)載于:https://www.cnblogs.com/wsjhk/p/7050605.html
總結(jié)
以上是生活随笔為你收集整理的[原创]OpenvSwitch安装的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: os.environ详解
- 下一篇: IO(File 递归)