如何在ubuntu16.04中安装OpenvSwitch。
它不在存储库中。

发布于 2019-03-24 09:45:32
运行以下命令
sudo apt update
sudo apt upgrade
sudo apt install openvswitch-switch那就开始
sudo ovs-vswitchd在桌面中创建一个名为ovs的目录(文件夹),然后从OpenVSwitch网站下载https://www.openvswitch.org/releases/openvswitch-2.5.6.tar.gz并将其保存在ovs文件夹中。这一点很重要,因为下面的步骤3。
右击它并选择extract或在终端中一次运行以下命令来解压它:
cd ~/Desktop/ovs/
tar -xvf openvswitch-2.5.6.tar.gzOpenVSwitch需要先安装一些依赖项。在终端中运行以下命令:
sudo apt install build-essential fakeroot graphviz autoconf automake bzip2 debhelper dh-autoreconf libssl-dev libtool openssl procps python-all python-qt4 python-twisted-conch python-zopeinterface module-assistant dkms make libc6-dev python-argparse uuid-runtime netbase kmod python-twisted-web iproute2 ipsec-tools openvswitch-switch racoon确认是否安装了所有依赖项。如果全部安装完毕,下面的命令将不返回任何内容。否则它会告诉你哪一个不见了。这个命令应该在上面提取的openvswitch目录中运行:
sudo dpkg-checkbuilddeps您有两个选项,根据是否要运行单元测试,请使用以下命令之一。
运行单元测试。
sudo fakeroot debian/rules binary不要运行单元测试
sudo DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary这将在~/Desktop中生成以下借方
openvswitch-common_2.5.6-1_amd64.deb
openvswitch-datapath-dkms_2.5.6-1_all.deb
openvswitch-datapath-source_2.5.6-1_all.deb
openvswitch-dbg_2.5.6-1_amd64.deb
openvswitch-ipsec_2.5.6-1_amd64.deb
openvswitch-pki_2.5.6-1_all.deb
openvswitch-switch_2.5.6-1_amd64.deb
openvswitch-test_2.5.6-1_all.deb
openvswitch-testcontroller_2.5.6-1_amd64.deb
openvswitch-vtep_2.5.6-1_amd64.deb最重要的是打开开关--普通开关和开开关开关.其余的可以安装取决于您的确切需求。
cd ~/Desktop
sudo dpkg -i ../openvswitch-common_2.5.6-1_amd64.deb
sudo dpkg -i ../openvswitch-switch_2.5.6-1_amd64.deb名为ovs-vswitchd的openvswitch守护进程将自动运行。您可以使用以下方法确认:
ps -ef | grep ovs应该返回这样的输出。
ovsdb-server: monitoring pid 24477 (healthy)
ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
ovs-vswitchd: monitoring pid 24487 (healthy)
ovs-vswitchd unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach --monitor除非它没有运行,否则可以使用以下方法手动启动:
sudo ovs-vswitchd这些信息加上文档可以在http://www.openvswitch.org/support/dist-docs-2.5/上找到。
https://askubuntu.com/questions/1128111
复制相似问题