• systemd + ryu


    [root@kunpeng82 ryu]# pwd
    /root/ryu
    [root@kunpeng82 ryu]# vi /etc/systemd/system/openflow.service
    [Unit]
    Description = openflow controler
    
    [Service]
    #ExecStart=/usr/local/bin/ryu-manager /usr/local/lib/python2.7/dist-packages/ryu/app/simple_switch_13.py
    ExecStart=/usr/local/bin/ryu-manager /root/ryu/ryu/ryu/app/simple_switch_13.py
    Restart=always
    Type=simple
    
    [Install]
    WantedBy=multi-user.target
    
    "/etc/systemd/system/openflow.service" 11L, 300C written
    [root@kunpeng82 ryu]# systemctl list-unit-files --type=service | grep openflow
    openflow.service                              disabled
    [root@kunpeng82 ryu]# systemctl start openflow
    [root@kunpeng82 ryu]# ps -alxg | grep ryu-manager
    4     0 60138     1  20   0 167104 55104 ep_pol Ss   ?          0:01 /bin/python3 /usr/local/bin/ryu-manager /root/ryu/ryu/ryu/app/simple_switch_13.py
    0     0 60144 59968  20   0 110656  2496 pipe_w S+   pts/0      0:00 grep --color=auto ryu-manager

    [root@kunpeng82 app]# pip3 list | grep ryu
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    ryu (4.34)
    [root@kunpeng82 app]# pip3 show  ryu
    Name: ryu
    Version: 4.34
    Summary: Component-based Software-defined Networking Framework
    Home-page: https://ryu-sdn.org
    Author: Ryu project team
    Author-email: ryu-devel@lists.sourceforge.net
    License: Apache License 2.0
    Location: /usr/local/lib/python3.6/site-packages
    Requires: eventlet, msgpack, netaddr, oslo.config, ovs, routes, six, tinyrpc, webob
    [root@kunpeng82 app]# ls /usr/local/lib/python3.6/site-packages/ryu
    app   cfg.py  contrib     exception.py  hooks.py     lib     ofproto      services  topology
    base  cmd     controller  flags.py      __init__.py  log.py  __pycache__  tests     utils.py
    [root@kunpeng82 app]# ls /usr/local/lib/python3.6/site-packages/ryu/app/
    bmpstation.py         __pycache__           simple_switch_12.py       simple_switch.py
    cbench.py             rest_conf_switch.py   simple_switch_13.py       simple_switch_rest_13.py
    conf_switch_key.py    rest_firewall.py      simple_switch_14.py       simple_switch_snort.py
    example_switch_13.py  rest_qos.py           simple_switch_15.py       simple_switch_stp_13.py
    gui_topology          rest_router.py        simple_switch_igmp_13.py  simple_switch_stp.py
    __init__.py           rest_topology.py      simple_switch_igmp.py     simple_switch_websocket_13.py
    ofctl                 rest_vtep.py          simple_switch_lacp_13.py  wsgi.py
    ofctl_rest.py         simple_monitor_13.py  simple_switch_lacp.py     ws_topology.py
    [root@kunpeng82 app]# rz -be 
    [root@kunpeng82 app]# cp simple_switch_13_5.py  /usr/local/lib/python3.6/site-packages/ryu/app/
    [root@kunpeng82 app]# /usr/local/bin/ryu-manager ryu.app.simple_switch_13_5
  • 相关阅读:
    DB2控制中心创建触发器
    将web应用迁到TongWeb
    DB2自增列数据处理
    Android 所有版本区别总结(转)
    C#强制关闭Excel进程(通过COM使用Excel时)
    Web开发中的ContentType类型大全
    Javascript中闭包(Closure)的探索(一)基本概念
    Javascript 中闭包(Closure)的探索(三)私有函数中的this
    VS2008中Web Reference和Service Reference的区别
    ASP.NET中模拟管理员用户提升权限
  • 原文地址:https://www.cnblogs.com/dream397/p/13150796.html
Copyright © 2020-2023  润新知