Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xjtuwxg/9d868419f5d7b4076dc56fba15b4cf14 to your computer and use it in GitHub Desktop.
Save xjtuwxg/9d868419f5d7b4076dc56fba15b4cf14 to your computer and use it in GitHub Desktop.
Installation Openvswitch LTS in CentOS 7

The most recent release from the LTS series: http://openvswitch.org/releases/openvswitch-2.5.4.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.4.tar.gz

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

tar xfz openvswitch-2.5.4.tar.gz

Build the RPM package (no testing) and exit.

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

exit

As root, we’ll install the RPM package.

yum localinstall /home/ovs/rpmbuild/RPMS/x86_64/openvswitch-2.5.4-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment