OVS的下载安装
作者:互联网
OVS安装步骤:
1. 下载源码
#wget http://openvswitch.org/releases/openvswitch-2.3.0.tar.gz
#tar -zxvf openvswitch-2.3.0.tar.gz
2. 安装编译与其他配置
#cd openvswitch-2.3.0/
#sudo su
#./boot.sh
#./configure --with-linux=/lib/modules/`uname -r`/build
#make
#make install
#make modules_install
#touch /etc/depmod.d/openvswitch.conf
#chmod -R 777 /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/lsmod | grep openvswitch
3. 初始化数据库
#sudo mkdir -p /usr/local/etc/openvswitch
#sudo ovsdb-tool create /usr/local/etc/openvswitch/conf.db \
vswitchd/vswitch.ovsschema
#sudo mkdir -p /usr/local/var/run/openvswitch
4. 创建日志文件
#sudo mkdir -p /usr/local/var/log/openvswitch
#sudo touch /usr/local/var/log/openvswitch/ovsdb-server.log
#sudo touch /usr/local/var/log/openvswitch/ovs-vswitchd.log
5. 修改环境变量
#sudo gedit /etc/profile
#export PATH=$PATH:/usr/local/share/openvswitch/scripts
#source /et/profile
6. 启动OVS
#sudo su
#ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
--pidfile --detach --log-file
#ovs-vsctl --no-wait init
#ovs-vswitchd --pidfile --detach --log-file
7. 查看版本号
#ovs-vsctl --version
8. 停止OVS脚本
#sudo kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid`
注:每次重新启动OVS,都需要输入第6项的启动命令。
参考网址:https://blog.csdn.net/daihanglai7622/article/details/90047214
标签:OVS,log,--,sudo,openvswitch,usr,下载安装,local 来源: https://www.cnblogs.com/qt2021/p/15151809.html