1. Development
A situational awareness system based on linux, developed based on python and flask framework, the project file directory is as follows:
-
admin - core algorithm
-
charts - chart generation
-
model - the class
-
app.py - the main file
-
config.py - configuration file
-
install.py - the installation file
The project file is at the end of the article~
2. Installation
1. Configuration
The database password is set to root/123456789 by default, the background default initial password is: admin/123456, and the apache log is the default path.
If you need to modify, please modify the database password and path in install.py and config.py.
2. Email password
If you don’t need the alarm, you can ignore it. If you need the alarm, please configure the email address and password in config.py yourself (ps: the password here is the email authorization code)
3. Environment
Adapt to linux, and due to the limited level of the author, the middleware only supports apache, ensure that the linux user authority is root, and the iptables firewall command is installed (iptables can be ignored without warning)
python3,pyecharts0.x
In particular, do not install jinja3.1.1 before the official solution is given, otherwise the markup will be damaged and cannot be rendered to the front end)
4. Order
Based on the above, execute the following command to install:
Please use python3 to execute:
python3 install.py
After the dependencies and the database are installed successfully, execute
python3 app.py
After the console outputs the following words, the installation is successful
INFO:werkzeug: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
****Visit 127.0.0.1:5000
source code acquisition
Technology must learn to share and communicate, and it is not recommended to work behind closed doors. One person can go fast, and a group of people can go farther.
Good articles are inseparable from the sharing and recommendation of fans, dry data, data sharing, data, and technical exchange improvement, all of which can be obtained by adding the communication group. The group has more than 2,000 friends. The best way to add notes is: source + interest directions, making it easy to find like-minded friends.
Method ①, add WeChat account: dkl88191, remarks: from CSDN + Situational Awareness System
Method ②, WeChat search official account: Python learning and data mining, background reply: Situational Awareness System