zoukankan      html  css  js  c++  java
  • Hawkeye部署Github监控系统

    step1:python环境安装
    #pwd
    /usr/local/soft
    #wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz
    #unxz Python-3.5.5.tar.xz
    #tar -xvf Python-3.5.5.tar
    #cd Python-3.5.5
    #./configure --prefix=/usr/local/python/python3
    #make 
    #make install

    step2:克隆项目到本地
    #git clone https://github.com/0xbug/Hawkeye.git --depth 1
    #cd Hawkeye


    step3:python虚拟沙盒安装
    #pip install virtualenv
    # /usr/local/python/bin/virtualenv --python=/usr/local/python/python3/bin/python3 venv
    #source venv/bin/activate
    #pip install -r deploy/requirements.txt

    #deactivate  //退出沙盒

    step4:配置文件(github账号|mongodb账号)
    #cp config.ini.example config.ini
    #vim config.ini

    [Auth]
    ENABLE = 1
    TYPE = basic
    USERNAME =
    PASSWORD =
    
    [GitHub]
    USERNAME =******
    PASSWORD =******
    ERROR = We could not perform this search
    
    [MongoDB]
    HOST = 192.168.192.**2
    PORT = 27017
    ACCOUNT =gitlog
    PASSWORD =gitlog
    
    [Leakage]
    NODES = //*[@id="code_search_results"]/div/div[*]
    DATETIME = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/div/span[2]/relative-time
    LINK = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[2]
    PROJECT = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[1]
    USERNAME = //*[@id="code_search_results"]/div/div[{}]/div/a
    RAW = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[2]
    FILENAME = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[2]
    
    [Notice]
    ENABLE =1
    MAIL_SERVER =mail.cdeledu.com
    MAIL_PORT = 993
    FROM =****@cdeledu.com
    PASSWORD =******
    

    step5:【MongoDB 安装&配置】
    mongodb安装:
    #创建mongodb.repo文件
    #vim /etc/yum.repos.d/mongodb.repo
    [mongodb]
    name=MongoDB Repository
    baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
    gpgcheck=0
    enabled=1
    #安装mongodb
    #yum install -y mongodb-org
    #启动mongodb
    #/usr/bin/mongod -dbpath=/usr/local/mongodb/data -logpath=/usr/local/mongodb/hawkeye.log
    #创建mongodb实例
    #mongo
    >db.createUser({user:'gitlog',pwd:'gitlog',roles:[{role:'dbOwner',db:'Hawkeye'}]})

    【通过ip及端口方式连接mongo】

    #mongo 192.168.192.142:27017

    step6:启动hawkeye:
    #python Hawkeye.py
    #浏览器访问进行扫描规则及定时任务配置
    http://ip:5000/

    转载于:https://my.oschina.net/guiguketang/blog/1927234

  • 相关阅读:
    基于fis3的组件可视化道路
    前端性能——监控起步
    uploadify使用的一些经验总结
    浏览器加载和渲染HTML的过程(标准定义的过程以及现代浏览器的优化)
    github常见问题【转自百度知道】
    轮播的实现方式
    前端打包构建工具grunt快速入门(大篇幅完整版)
    一些很棒的js代码
    如何高效的编写Verlog HDL——菜鸟版
    基于FPGA的肤色识别算法实现
  • 原文地址:https://www.cnblogs.com/twodog/p/12136216.html
Copyright © 2011-2022 走看看