Ubuntu16.04上安装MHN

Ubuntu16.04上安装MHN

首先到Github上获取最新的代码:sudo git clone https://github.com/threatstream/mhn.git
然后sudo ./install.sh

安装过程中遇到几个问题:

  1. 安装jdk8 出错

    dpkg: error processing package oracle-java8-installer (--configure)
    

    就是系统中对应的jdk的安装配置与目前系统的不一致。需要修改,可以参照:
    https://blog.csdn.net/zdx1996/article/details/89320302

  2. mongodb报错

    Failed to start mongodb.service: Unit mongodb.service is masked.
    

    系统中安装的mongodb服务是:mongod,而MHN的配置中是Mongodb,当然找不到了。
    在当前安装目录中查找:systemctl start mongodb 替换就可以了。
    参照:https://www.centos.bz/2017/11/mongodb两个报错处理方法/

  3. 调度

    Collecting git+https://github.com/defnull/bottle/ (from -r requirements.txt (line 5))
    Cloning https://github.com/defnull/bottle/ to /tmp/pip-req-build-MusvkW
    Running command git clone -q https://github.com/defnull/bottle/ /tmp/pip-req-build-MusvkW
    error: RPC failed; curl 18 transfer closed with outstanding read data remaining
    fatal: The remote end hung up unexpectedly
    fatal: 过早的文件结束符(EOF)
    fatal: index-pack failed
    ERROR: Command "git clone -q https://github.com/defnull/bottle/ /tmp/pip-req-build-MusvkW" failed with error code 128 in None
    
    

    就是要安装bottle时,报错了, 可以先把这个安装了

    wget http://bottlepy.org/bottle.py
    sudo pip install bottle
    

    下次运行到这里时,就不会再报这个错误了。
    参照: https://blog.csdn.net/pc_mvp/article/details/84341304

  4. nginx启动错误

    Job for nginx.service failed because  exited with error code. "systemctl status nginx.service" and journalctl -xe.
    invoke-rc.d: initscript nginx, action "start" failed.
    nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since 一 2019-06-03 20:00:18 CST; 6ms ago
    Process: 27773 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
    Process: 27767 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    
    

    通过查日志发现,80端口被其他应用占用了,停掉服务,释放该端口即可。

猜你喜欢

转载自blog.csdn.net/wwlhz/article/details/90759313