zoukankan      html  css  js  c++  java
  • (OK) INSTALL CORE on Fedora 23 or CentOS 7

    -----------------------INSTALL CORE --- OK OK


    Fedora 23:

    dnf install bash bridge-utils ebtables iproute libev python procps-ng net-tools tcl tk tkimg autoconf automake make libev-devel python-devel ImageMagick help2man


    //重要,在CORE中,执行 /root/.core/configs/m-MPE-manet.imn,不能正常初始化。需要执行如下命令。

    //  http://blog.csdn.net/ztguang/article/details/51262543

    dnf install kernel-modules-extra-`uname -r`


    CentOS 7:
    yum install bash bridge-utils ebtables iproute libev python procps-ng net-tools tcl tk tkimg autoconf automake make libev-devel python-devel ImageMagick help2man


    You can obtain the CORE source from the CORE source page. Choose either a stable release version orthe development snapshot available in thenightly_snapshots directory.The-j8 argument tomake will run eight simultaneous jobs, to speed upbuilds on multi-core systems. Notice theconfigure flag to tell the buildsystem that a systemd service file should be installed under Fedora.

    [root@localhost core-4.8]# ./bootstrap.sh
    [root@localhost core-4.8]# ./configure --with-startup=systemd
    [root@localhost core-4.8]# make -j4
    [root@localhost core-4.8]# make install

    Note that the Linux RPM and Debian packages do not use the/usr/local prefix, and files are instead installed to/usr/sbin, and /usr/lib. This difference is a result of aligning with the directorystructure of Linux packaging systems and FreeBSD ports packaging.

    Another note is that the Python distutils in Fedora Linux will install the COREPython modules to/usr/lib/python2.7/site-packages/core, instead ofusing thedist-packages directory.

    The CORE Manual documentation is built separately from thedoc/ sub-directory in the source. It requires Sphinx:

    sudo yum install python-sphinx
    cd core-4.8/doc
    make html
    make latexpdf
    -----------------------INSTALL CORE --- OK OK



    -----------------------Test CORE

    To test that the CORE Network Emulator is working, start the CORE daemon and the GUI.

    [root@localhost core-4.8]# pwd
    /opt/tools/network_simulators/core/core-4.8

    [root@localhost core-4.8]# /etc/init.d/core-daemon start
    [root@localhost core-4.8]# core-gui

    [root@localhost core-4.8]# ls /tmp/pycore.56386/
    n1                    n1.xy                 n3.pid                n5.log                n7.conf/              n9
    n10                   n2                    n3.xy                 n5.pid                n7.log                n9.conf/
    n10.conf/             n2.conf/              n4                    n5.xy                 n7.pid                n9.log
    n10.log               n2.log                n4.conf/              n6                    n7.xy                 n9.pid
    n10.pid               n2.pid                n4.log                n6.conf/              n8                    n9.xy
    n10.xy                n2.xy                 n4.pid                n6.log                n8.conf/              nodes
    n1.conf/              n3                    n4.xy                 n6.pid                n8.log                servers
    n1.log                n3.conf/              n5                    n6.xy                 n8.pid                session-deployed.xml
    n1.pid                n3.log                n5.conf/              n7                    n8.xy                 state

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    关键点
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    core-svnsnap.tgz

    [root@localhost core]# pwd
    /opt/tools/network_simulators/core/core

    [root@localhost core]# gedit ./daemon/core/mobility.py
    -------------------------------------设置节点移动的时间间隔
        def runround(self):
            ''' Advance script time and move nodes.
            '''
            #ztg add
            time.sleep(6)
    -------------------------------------设置节点移动的间距
            #ztg add
            #wp = self.WayPoint(time, nodenum, coords=(x,y,z), speed=speed)
            wp = self.WayPoint(time, nodenum, coords=(x,y,z), speed=3)
    -------------------------------------
    [root@localhost core]# systemctl start squid.service
    [root@localhost core]# systemctl start docker

    [root@localhost core]# /etc/init.d/core-daemon stop
    [root@localhost core]# make uninstall ;  make clean
    [root@localhost core]# make -j4
    [root@localhost core]# make install
    [root@localhost core]# systemctl enable core-daemon
    Created symlink from /etc/systemd/system/multi-user.target.wants/core-daemon.service to /etc/systemd/system/core-daemon.service.

    problem:
    [root@n6 n6.conf]# docker info
    WARNING: bridge-nf-call-iptables is disabled
    WARNING: bridge-nf-call-ip6tables is disabled
    resolve:
    [root@localhost core]# iptables -F
    [root@localhost core]# ip6tables -F

    [root@localhost 桌面]# service core-daemon status
    Redirecting to /bin/systemctl status  core-daemon.service
    core-daemon.service - Common Open Research Emulator Service
       Loaded: loaded (/etc/systemd/system/core-daemon.service; disabled)
       Active: inactive (dead)

    [root@localhost 桌面]# cat /etc/systemd/system/core-daemon.service

        [Unit]  
        Description=Common Open Research Emulator Service  
        After=network.target  
      
        [Service]  
        Type=forking  
        PIDFile=/var/run/core-daemon.pid  
        ExecStart=/usr/bin/python /usr/local/sbin/core-daemon -d  
      
        [Install]  
        WantedBy=multi-user.target 


    Here maybe what is installed with 'make install':

        /usr/local/bin/core-gui  
        /usr/local/sbin/core-daemon  
        /usr/local/sbin/[vcmd, vnoded, coresendmsg, core-cleanup.sh]  
        /usr/local/lib/core/*  
        /usr/local/share/core/*  
        /usr/local/lib/python2.6/dist-packages/core/*  
        /usr/local/lib/python2.6/dist-packages/[netns,vcmd].so  
        /etc/core/*  
        /etc/init.d/core 


    [root@localhost core]# /usr/share/openvswitch/scripts/ovs-ctl --system-id=random start
    Starting ovsdb-server                                      [  OK  ]
    Configuring Open vSwitch system IDs                        [  OK  ]
    Starting ovs-vswitchd                                      [  OK  ]
    Enabling remote OVSDB managers                             [  OK  ]


    //Fedora 23 & CentOS 7

    [root@localhost core]# systemctl daemon-reload
    [root@localhost core]# systemctl start core-daemon.service
    [root@localhost core]# core-gui



    ----------------
    NOTE: first to run the following command if using docker.
    # systemctl start docker.service
    ----------------

    NOTE: /root/.core/configs/m-MPE-manet.imn


    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ----------------
    error:
    ----------------
      File "/usr/lib/python2.7/site-packages/docker/client.py", line 142, in _raise_for_status
        raise errors.APIError(e, response, explanation=explanation)
    APIError: 400 Client Error: Bad Request ("client version 1.10 is too old. Minimum supported API version is 1.21, please upgrade your client to a newer version")
    ----------------

    solution:
    ----------------
    # gedit /opt/tools/network_simulators/core/core/daemon/core/services/dockersvc.py
    ----------------
    if 'Client' in globals():
        client = Client(version='1.21')
    ----------------
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  • 相关阅读:
    Keras安装
    sql根据查询顺序返回结果
    @Configuration @Bean
    SQL高级优化系列
    数据结构与算法系列(二)-- 算法
    数据结构与算法系列(一)-- 数据结构
    Golang中Label的用法
    日志收集系统系列(五)之LogTransfer
    日志收集系统系列(四)之LogAgent优化
    日志收集系统系列(三)之LogAgent
  • 原文地址:https://www.cnblogs.com/ztguang/p/12646750.html
Copyright © 2011-2022 走看看