我正在使用 openvswitch.tar 从 shell 文件安装 openvswitch
外壳文件:
#!/bin/bash
apt-get install -y git python-simplejson python-qt4 python-twisted-conch automake autoconf gcc uml-utilities libtool build-essential git pkg-config linux-headers-`uname -r`
tar -zxvf openvswitch-2.5.5.tar.gz
cd openvswitch-2.5.5
./boot.sh
./configure --with-linux=/lib/modules/`uname -r`/build
make && make install
cd datapath/linux
modprobe openvswitch
lsmod | grep openvswitch
touch /usr/local/etc/ovs-vswitchd.conf
mkdir -p /usr/local/etc/openvswitch
cd ../..
ovsdb-tool create /usr/local/etc/openvswitch/conf.db
vswitchd/vswitch.ovsschema
ovsdb-server /usr/local/etc/openvswitch/conf.db \
--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
ovs-vsctl show
ovs-vsctl --version
ps -ea | grep ovs
此 shell 文件的错误是
configure: error: Linux kernel in /lib/modules/4.15.0-45-generic/build is version 4.15.18, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)
make: *** 未指定目标,也未找到 makefile。停止。openvswitch 版本 2.5.5
.tar 版本 2.5.5
其他一切都在 shell 文件中运行