Installing Open vSwitch on Scientific Linux 6.8
To enable using Open vSwitch (OVS) on DTNs to control data transfer traffic (e.g., by shaping or steering) these instructions describe how to install OVS on SL6.8.
Most, if not all, of the commands require root permissions and these directions have been tested using the 'root' user ID.
These directions have also been tested from a remote host using Ansible with the playbook attached to this page.
The latest OVS version that seems compatible with SL6.8 is OVS 2.5.2 (at the time of this writing).
These directions are taken primarily from https://github.com/openvswitch/ovs/blob/branch-2.5/INSTALL.RHEL.md
Install (or verify installation of) the required packages.
yum -y install gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool
Install the software collections package associated with the SL6 distribution.
yum -y install http://ftp.scientificlinux.org/linux/scientific/6/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el6.noarch.rpm
Build the OVS RPM
Install Python 2.7 and the python-six library.
yum -y install python27 python-six
pip install six
Enable Python 2.7. (To always enable Python 2.7 for the root user who will be installing OVS, this line can be added to the ~/.bashrc fine \x97 this is necessary, for example, when using Ansible since a playbook may involve many separate SSH sessions.)
Create directories for building the OVS RPM.
mkdir -p ~/rpmbuild/SPECS
Get the OVS tarball (in this case for OVS 2.5.2 which can be found at http://openvswitch.org/releases/openvswitch-2.5.2.tar.gz
) and put it in ~/rpmbuild/SOURCES
cd ~/rpmbuild/SOURCES; lftpget http://openvswitch.org/releases/openvswitch-2.5.2.tar.gz
Unpack the tarball
cd ~/rpmbuild/SOURCES; tar -zxvf openvswitch-2.5.2.tar.gz
Copy the RHEL OVS spec file to the SPECS directory
cp ~/rpmbuild/SOURCES/openvswitch-2.5.2/rhel/openvswitch.spec ~/rpmbuild/SPECS
Edit the .spec file in the SPECS directory to include the correct requirement for python27. The "Requires" line in the .spec file should read 'Requires: logrotate, python27'
sed -i -e 's/python >= 2.7/python27/' ~/rpmbuild/SPECS/openvswitch.spec
Build the RPM (Note: The '--without check' argument prevents a full test suite execution \x97 if full testing is desired the argument may be omitted)
cd ~/rpmbuild/SPECS; rpmbuild -ba --without check openvswitch.spec
Install the OVS RPM
yum -y install ~/rpmbuild/RPMS/x86_64/openvswitch-2.5.2-1.x86_64.rpm
service openvswitch start
If desired, check that OVS is running
This should show the version of OVS that is active (e.g., 'ovs version: "2.5.2"')
- 01 Jun 2017