用户可以根据自己的需求,使用特定选项分别启动/停止守护进程。
| $ mkdir -p /usr/local/var/run/openvswitch
|
- 场景一:仅启动ovsdb守护进程,不启动ovs-vswitchd守护进程。
| $ ovs-ctl --no-ovs-vswitchd start
|
- 场景二:仅启动ovs-vswitchd守护进程,不启动ovsdb守护进程。
| $ ovs-ctl --no-ovsdb-server start
|
- 场景三:配置本机OVS使用的ovsdb-server数据库文件,手动启动所有守护进程。
| $ mkdir -p /usr/local/etc/openvswitch
$ ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
$ mkdir -p /usr/local/var/run/openvswitch
$ 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
|