1. Compile and install ovs from source code: Install dependencies: # apt install make # apt install gcc # apt install build-essential # apt install libssl-dev # apt install libcap-ng-dev # apt install python2.7 # apt install python-pip # pip install six # apt install autoconf # apt install automake # apt install libtool Download source package # apt install git # git clone https://github.com/openvswitch/ovs.git (the downloaded git project directory is ~/ovs) Generate configuration files # ./boot.sh (in the root directory of the ovs project) Configuration # ./configure -with-linux=/lib/modules/$(uname -r)/build Compile # make # make install # make modules_install # config_file="/etc/depmod.d/openvswitch.conf" # for module in datapath/linux/*.ko; do modname="\$(basename \${module})" echo "override \${modname%.ko} * extra" >> "\$config_file" echo "override \${modname%.ko} * weak-updates" >> "\$config_file" done # depmod -a # /sbin/modprobe openvswitch # /sbin/lsmod | grep openvswitch start up export PATH=$PATH:/usr/local/share/openvswitch/scripts # ovs-ctl start test # ovs-vsctl show # ovs-vsctl add-br mybridge # ovs-vsctl add-port mybridge eth0 2. Uninstalling Ovs After starting ovs, if you change the ovs source code and want to update the ovs service, do the following: # ovs-ctl stop Stop ovs service # ovs-dpctl show View the kernel, there will be a datapath of ovs-system # ovs-dpctl del-dp ovs-system Delete the datapath that appeared in the previous step (if you do not do this step, rmmod may report an error) # rmmod openvswitch Uninstall the openvswitch kernel module. Use lsmod | grep openvswitch to find no openvswitch. # Enter the ovs source code directory and recompile and install according to the previous compilation steps References Open vSwitch on Linux, FreeBSD and NetBSD The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue integrates PDF.js to implement PDF preview and add watermark steps
>>: MySQL free installation version configuration tutorial
time(); function Function prototype: time_t time(...
Written in front No matter how well the code is w...
This reading note mainly records the operations r...
Table of contents el-scrollbar scroll bar el-uplo...
This article uses examples to illustrate the prin...
For example, if your current path is /var/log and...
Understanding object.defineProperty to achieve re...
When the carriage return character ( Ctrl+M ) mak...
1. What is master-slave replication? Master-slave...
In the process of using Vue to develop projects, ...
When is the table used? Nowadays, tables are gene...
Table of contents Start and stop Database related...
MySQL can be connected not only through the netwo...
Table of contents Preface 1. 404 Page 1. Causes 2...
After reading the following article, you can depl...