Start and Stop the shell script after openvswitch 2.1.2 is installed.

Source: Internet
Author: User
Tags stop script openvswitch

After openvswitch 2.1.2 is installed, it is often possible to start and stop. To avoid repeating the script to start and stop the terminal code, it is best to write it in a different script to facilitate the next call. The premise is that openvswitch has been installed and the database Conf. DB has been created according to the following statements:

    mkdir -p /usr/local/etc/openvswitch    ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema



Start script:

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 --detachovs-vsctl --no-wait initovs-vswitchd --pidfile --detach

Enable the ovsdb-server and-vswtichd services.



Stop script:

kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid`##cat ovs-brcompatd.pid ovs-controller.pid ovs-monitor-ipsec.pid##
Go to the installation path of openvswitch and kill the ovsdb-server and ovs-vswitchd processes.

Start and Stop the shell script after openvswitch 2.1.2 is installed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.