• 巡风源码(一):install.sh安装及相关初始化


    一:脚本自动化安装【install.sh】

    1.1 判断Linux系统位数
    1.2 判断当前用户是否具有root权限,从而跳转sh的命令格式
    1.3 检查安装下载所需的命令,wget、curl从而调整远程下载xunfeng库的命令
    1.4 检查系统,并安装不同系统的依赖以及判断是否支持该系统
    1.5 检查python版本,目前仅支持python 2.7
    1.6 安装pip并升级
    1.7 git clone xunfeng 至 /opt/xunfeng目录并下载mongodb
    1.8 下载xunfeng所依赖的python库
    1.9 配置相关目录的权限并执行/install/config.sh

    二:配置信息执行【/install/config.sh】

    2.1 定义相关目录,如
    xunfeng根目录:/opt/xunfeng
    xunfeng数据库文件目录:/opt/xunfeng/xunfengdb
    xunfeng目录的用户组及用户等

    2.2 dbconfig()
    配置数据库密码,通过whiptail
    scan:scanlol666

    2.3 websiteconfig()
    配置巡风管理平台账号密码
    admin:xunfeng321

    2.4 writeconfig_confirm()
    数据库账号密码、管理平台密码确认

    2.5 wirteconfig()
    将2.4确认好的密码写入配置文件中,配置文件/opt/xunfeng/config.py

    2.6 install_service()
    设置日志目录、数据库目录的权限、用户组等

    2.7 initdb()
    初始化数据库,建立数据库xunfeng,未建表

    2.8 启动巡风
    /etc/init.d/xunfeng restart
    位于/install/files/xunfeng

    三:巡风启动【/install/files/xunfeng restart】

    3.1 /install/files/xunfeng
    巡风启动的命令函数定义区,包括重启,停止,查看状态
    包括数据库、web、aider、nascan、vulscan的执行,通过supervisor去控制
    不同进程写在/install/files/xunfeng.conf 配置文件中

  • 相关阅读:
    4、linux-grep awk sed and cuf sort uniq join
    2、linux-compress and uncompresse
    1、linux-wget
    Blast 如何使用Blast+(Linux)转载
    1、R-reshape2-cast
    2、R-reshape2-melt
    doc下批处理文件的感想
    关于大数的四则运算
    hadoop分布式安装教程(转)
    关于java中sizeof的问题
  • 原文地址:https://www.cnblogs.com/sojrs/p/10897348.html
Copyright © 2020-2023  润新知