Ubuntu20.04源码部署洞察 II

洞察由宜信安全部开发,集成应用系统资产管理、漏洞全生命周期管理、安全知识库管理三位一体的管理平台。项目地址:https://github.com/creditease-sec/insight2

不是本人的项目,只是安装部署了一下。

1.环境准备

1.1更新系统

查看系统版本

# lsb_release -a

更新系统

取回更新的软件包列表信息

#apt-get update

进行一次升级

#apt-get upgrade

删除已下载的旧包文件

# apt-get autoclean

1.2Mysql服务

Ubuntu 20.04默认使用 MySQL8.0版本, 默认为root账户登录模式,无须密码,需要自行更改或者设置验证插件和登录密码。

查看默认的最新版本

# apt show mysql-server

安装mysql数据库

# apt-get install mysql-server

查看端口情况

# netstat -an|grep 3306

登录数据库(默认为root账户登录模式,无须密码)

#mysql

#use mysql;

 

设置root账号密码

# ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';

# update user set host = '%' where user ='root';

刷新缓存

# FLUSH PRIVILEGES;

退出数据库

#quit;

重启mysql服务后,就可以用设置好的账号密码登录了

# service mysql restart

登录数据库

# mysql -u root -p

1.3Redis服务

查看默认的最新版本

# apt show redis-server

安装redis

# apt-get install redis-server

安装完成后,Redis服务器会自动启动。查看服务情况

# ps -aux|grep redis

查看端口情况

#netstat -an|grep 6379

设置密码

#vi /etc/redis/redis.conf

 

客户端登录

# redis-cli -h 127.0.0.1 -p 6379 -a '密码'

-h 是地址,-p 端口 -a 是密码

1.4python3环境

Ubuntu20.04默认安装python3.8,我们可以不用安装了,但未安装pip。

查看python版本

#python3 -V

值得注意的是, Python 2 已经退出了历史的舞台,Ubuntu20.04也顺便 移除了 Python 2。

pip3 是一个用来安装 Python 软件包的工具。

安装pip3

# apt-get install python3-pip

更新pip3

#pip3 install --upgrade pip

1.5下载insight2源码

Ubuntu 20.04默认未安装git

 

安装git

#apt install git

下载insight2源码,笔者到下载root目录

#git clone https://github.com/creditease-sec/insight2.git

2.Mysql数据库初始化

笔者在insight2这个项目(https://github.com/creditease-sec/insight2)中未找到init.sql这个文件,可能是作者忘记放了。运气还算好,作者的另一个项目insight2_docker(https://github.com/creditease-sec/insight2_docker)找了。

下载init.sql

# git clone https://github.com/creditease-sec/insight2_docker

 

笔者是将insight2_docker项目下载在insight2目录中。init.sql文件所在的目录完整路径为:/root/insight2/insight2_docker/init,相对路径为:insight2_docker/init.sql

Mysql数据库初始化

# mysql -u root -p  < insight2_docker/init/init.sql

3.依赖库

安装依赖库

#apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

切换到insight2

#cd insight2

#ls

安装python依赖库

# pip3 install -r requirements.txt

4.配置文件修改

#vi settings.py

5.服务启动

启动服务

# python3 run.py --config=settings.py --port=80

查看端口

# netstat -an|grep 80

 

浏览器访问

 

默认账号/密码:admin/ admin!Aa2020

前台地址:http://ip

后台地址:http://ip/#/admin

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

林鸿风采

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值