活到老学到老  

记录遇到问题的点点滴滴。

Openvswitch LTS in CentOS 7

6年前发布  · 1238 次阅读

The most recent release from the LTS series: http://openvswitch.org/releases/openvswitch-2.5.2.tar.gz

Instructions:

As the root user let’s install some packages:

yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel

Add a new user and switch to that user:

adduser ovs

su - ovs

Download source code and prepare the build environmen.

mkdir -p ~/rpmbuild/SOURCES

wget http://openvswitch.org/releases/openvswitch-2.5.2.tar.gz

cp openvswitch-2.5.2.tar.gz ~/rpmbuild/SOURCES/

tar xfz openvswitch-2.5.2.tar.gz

Build the RPM package (no testing) and exit.

rpmbuild -bb --nocheck openvswitch-2.5.2/rhel/openvswitch-fedora.spec

exit

As root, we’ll install the RPM package.

yum localinstall /home/ovs/rpmbuild/RPMS/x86_64/openvswitch-2.5.2-1.el7.centos.x86_64.rpm -y

Finally start the openvswitch service and check that it’s running.

systemctl start openvswitch.service

systemctl is-active openvswitch

active --> Ok

Make openvswitch service to start at boot time:

systemctl enable openvswitch

Let’s check that the command-line tools are ready:

ovs-vsctl -V

ovs-vsctl (Open vSwitch) 2.5.2

Compiled Apr  6 2017 13:07:27

DB Schema 7.12.1