简化部署frassessment用频风险服务安装手册

简化部署frassessment用频风险服务安装手册

# 修改网卡IP地址 

# 1.先执行命令ip a查看有多少网卡(记住网线插在哪个网口,下次不要插错,建议使用1号网口)

[root@liusw ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:d4:3d:1b brd ff:ff:ff:ff:ff:ff
    inet 192.168.137.11/24 brd 192.168.137.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::312e:cf7e:9403:6c97/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


# 2.用ethtool命令查看哪个网卡在工作

[root@liusw ~]# ethtool ens33
Settings for ens33:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes                   ———>此处为yes表示此网卡在工作

# 3.修改第二步查到的网卡IP地址
# centos网卡文件默认地址在/etc/sysconfig/network-scripts目录,修改以ifcfg- + 网卡名称的文件(举ifcfg-ens33)

[root@liusw ~]# ls /etc/sysconfig/network-scripts
ifcfg-ens33  ifdown-bnep  ifdown-ipv6  ifdown-ppp     ifdown-Team      ifup          ifup-eth   ifup-isdn   ifup-post    ifup-sit       ifup-tunnel       network-functions
ifcfg-lo     ifdown-eth   ifdown-isdn  ifdown-routes  ifdown-TeamPort  ifup-aliases  ifup-ippp  ifup-plip   ifup-ppp     ifup-Team      ifup-wireless     network-functions-ipv6
ifdown       ifdown-ippp  ifdown-post  ifdown-sit     ifdown-tunnel    ifup-bnep     ifup-ipv6  ifup-plusb  ifup-routes  ifup-TeamPort  init.ipv6-global

# 4.修改文件
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=yes
BOOTPROTO=static                ———>将此处dhcp修改为static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=c887bf0a-8a28-4abc-bb61-d8a587765769
DEVICE=ens33
ONBOOT=yes                      ———> 将yes修改为no
IPADDR=192.168.137.11           ———>新增IPADDR=此次的IP地址
GATEWAY=192.168.137.2           ———>新增GATEWAY=此次网关
NETMASK=255.255.255.0           ———>新增NETMASK=255.255.255.0(有可能不是这个,最好确认)
DNS=8.8.8.8                     ———>新增DNS=dns地址(可不填写)

# 5.重启网络服务
[root@liusw ~]# systemctl restart network

# 6.ip a查看是否更改了地址,ping一下其他服务器查看是否更改成功   




# 修改/安装用频风险分析服务IP地址 

# 1.确认 APP_FRASSESSMENT用频风险安装目录
# 此次为/data下安装

[root@liusw APP_FRASSESSMENT]# ls /data/APP_FRASSESSMENT
0  html  init  nginx  frassessment_service install_java.sh start.sh  stop.sh zookeeper_kafka kafka_service

# 2.进入安装目录,修改init文件的相关地址

[root@liusw APP_FRASSESSMENT]# cd /data/APP_FRASSESSMENT

[root@liusw APP_FRASSESSMENT]# vi init
#note that the file storage format is UNIX, avoid ^M under windows/DOS.

# the service port provided by the native to the external network
WEB_PORT=8082                   ———>web界面端口,无需更改,默认就好

# intranet background frequency analysis service address
SVC_IP=192.168.137.11           ———>本机IP地址
SVC_PORT=5002                   ———>服务端口,无需更改,默认就好

# KAFKA message center address
KAFKA_IP=192.168.137.11         ———>KAFKA地址
KAFKA_PORT=9092                 ———>KAFKA端口,无需更改,默认就好

# Map address
MAP_PROTOCOL=http
MAP_IP=192.168.137.11           ———>地图地址
MAP_PORT=8888                   ———>地图端口


# 3.清理KAFKA临时目录防止起不来

[root@liusw APP_FRASSESSMENT]# cd /data/APP_FRASSESSMENT/zookeeper_kafka

# 删除文件夹要小心 防止删除错误,建议先将其mv后测试,没问题后再删除
[root@liusw APP_FRASSESSMENT]# mv tmp tmp_20210808

# 3.修改完重启服务

[root@liusw APP_FRASSESSMENT]# cd /data/APP_FRASSESSMENT

[root@liusw APP_FRASSESSMENT]# ./stop.sh 

[root@liusw APP_FRASSESSMENT]# ./start.sh
# 启动时kafka会报一些错误,不影响服务工作,查看是否有其他报错。
# 启动成功后会定时与kafka通信
# 打开web界面http://IP:8082/#/main?ScenID=
# swagger调试地址http://ip:5002/swagger/frassessment-index.html
# 查询相关进程 ps -ef |grep "关键字"
# 查询相关服务端口 netstat -anpo|grep "端口号"

留下评论