• 网安平台安装


    网安平台建立在夜莺监控基础上
    首先需要改/n9e/n9e-2.7.2/etc/nginx.conf下的配置
    网安平台使用8080端口
    夜莺平台端口修改为8081
    #################################################
    user root;

    worker_processes 1;
    worker_cpu_affinity auto;

    error_log /var/log/nginx/error.log;
    pid /run/nginx.pid;

    include /usr/share/nginx/modules/*.conf;

    events {
    use epoll;
    worker_connections 20480;
    }

    http {
    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

    access_log /var/log/nginx/access.log main;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    include /etc/nginx/conf.d/*.conf;


    proxy_connect_timeout 5000ms;
    proxy_send_timeout 10000ms;
    proxy_read_timeout 30000ms;
    proxy_buffers 64 8k;
    proxy_busy_buffers_size 128k;
    proxy_temp_file_write_size 64k;
    proxy_redirect off;
    proxy_next_upstream error invalid_header timeout http_502 http_504;

    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-Port $remote_port;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    gzip on;
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    gzip_comp_level 2;
    gzip_types application/javascript application/x-javascript text/css text/javascript image/jpeg image/gif image/png;
    gzip_vary off;
    gzip_disable "MSIE [1-6].";

    upstream n9e.monapi {
    server 127.0.0.1:5800;
    keepalive 10;
    }

    upstream n9e.index {
    server 127.0.0.1:5830;
    keepalive 10;
    }

    upstream n9e.transfer {
    server 127.0.0.1:5810;
    keepalive 10;
    }

    server {
    listen 8081 default_server;
    server_name _;
    root /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    root /opt/n9e/n9e-2.7.2/pub;
    }

    location /api/portal {
    proxy_pass http://n9e.monapi;
    }

    location /api/index {
    proxy_pass http://n9e.index;
    }

    location /api/transfer {
    proxy_pass http://n9e.transfer;
    }
    }
    server {
    listen 8080 default_server;
    server_name _;
    root /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    root /opt/netsec/dist;
    index index.html;
    }

    location /net {
    proxy_pass http://127.0.0.1:8089;
    }
    }
    }
    #################################################
    启动nginx
    /opt/n9e/nginx-1.14.2/sbin/nginx -c /opt/n9e/n9e-2.7.2/etc/nginx.conf
    如果已经登录夜莺监控记得kill掉nginx进程重启nginx

    前端
    mkdir /opt/netsec
    将dist(前端压缩文件包)传送到该目录
    7z x /opt/netsec/dist.zip -o.
    这个包有问题,在xftp里面将乱码字改成dist

    此时在网址栏输入本机ip:8080已经可以看见前端页面


    后端
    将openjdk1.8.0_41.7z包传送到/opt/temp目录下
    7z x openjdk1.8.0_41.7z -o/opt/n9e
    将netsec-v1.1.25.jar包传送到/opt/netsec目录
    cd /opt/netsec/
    nohup /opt/n9e/openjdk1.8.0_41/bin/java -jar -Xmx256m -Dspring.profiles.active=166 netsec-v1.1.25.jar > netsec.log 2>&1 &
    启动 (nohup ----- & 后台运行)

    tail -f netsec.log 监控日志,不报错就行

    后端配好后登录,网址栏输入 IP:8080
    用户 admin 密码:123456


    ps aux|grep java
    kill 进程

  • 相关阅读:
    江西理工大学南昌校区cool code竞赛
    喵哈哈村的魔法考试 Round #3 (Div.2) ABCDE
    项目管理概要记录
    JS开发引用HTML DOM的location和document对象
    Linux下触摸屏驱动程序分析
    敦泰FT6X06单层自容调屏
    FT5X06 如何应用在10寸电容屏(linux-3.5电容屏驱动简析&移植10寸电容屏驱动到Android4.2) (by liukun321咕唧咕唧)
    基于FT5x06嵌入式Linux电容触摸屏驱动
    Linux/Android多点触摸协议
    高通 8x12 添加 TP和按键
  • 原文地址:https://www.cnblogs.com/shenyuanhaojie/p/14024093.html
Copyright © 2020-2023  润新知