MES系统登录和Linux操作

如何查看系统IP地址

[root@niitmes1 frontend]# ip addr
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
    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: eno1:  mtu 1500 qdisc mq state UP qlen 1000
    link/ether 94:40:c9:21:c4:fe brd ff:ff:ff:ff:ff:ff
    inet 10.1.3.58/24 brd 10.1.3.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet 10.1.3.63/32 scope global eno1
       valid_lft forever preferred_lft forever
    inet6 fe80::9640:c9ff:fe21:c4fe/64 scope link
       valid_lft forever preferred_lft forever
3: eno2:  mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 94:40:c9:21:c4:ff brd ff:ff:ff:ff:ff:ff
4: eno3:  mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 94:40:c9:21:c5:00 brd ff:ff:ff:ff:ff:ff
5: eno4:  mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 94:40:c9:21:c5:01 brd ff:ff:ff:ff:ff:ff

Liunx常用指令

cd {目录}     #切换到目录下
cat {文件}    #查看某个文件
more {文件}   #翻页查某个文件
tail -f {文件}  #一直监控查看某个文件
ll             #查看当前目录下有哪些文件

如何查看Keepalived配置和启动情况

[root@niitmes1 frontend]# cat /etc/keepalived/keepalived.conf
! Configuration File for keepalived

global_defs {
   notification_email {
     [email protected]
   }
   notification_email_from  [email protected]
   smtp_server 127.0.0.1
   smtp_connect_timeout 3
   router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state MASTER
    interface eno1
    virtual_router_id 40
    priority 101
    advert_int 2
    garp_master_delay 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
     track_interface {
        eno1
    }

    virtual_ipaddress {
      10.1.3.63
    }
}

[root@niitmes1 frontend]# service keepalived status
Redirecting to /bin/systemctl status  keepalived.service
● keepalived.service - LVS and VRRP High Availability Monitor
   Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-06-28 13:49:41 CST; 2h 55min ago
  Process: 11177 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 11178 (keepalived)
   CGroup: /system.slice/keepalived.service
           ├─11178 /usr/sbin/keepalived -D
           ├─11179 /usr/sbin/keepalived -D
           └─11180 /usr/sbin/keepalived -D

Jun 28 13:49:45 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:45 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:45 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:45 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:46 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:46 niitmes1 Keepalived_vrrp[11180]: VRRP_Instance(VIw_1) Sending/queueing gratuitous ARPs on eno1 for 10.1.3.63
Jun 28 13:49:46 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:46 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:46 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
Jun 28 13:49:46 niitmes1 Keepalived_vrrp[11180]: Sending gratuitous ARP on eno1 for 10.1.3.63
[root@niitmes1 frontend]#

PLC和PLM在MES中的配置文件整理

PLC :/home/ATOS/Server/back/opcua/config/config.properties

[root@niitmes1 config]# cat /home/ATOS/Server/back/opcua/config/config.properties
applicationName=niit-opcua-client
endpoint=opc.tcp://192.168.10.190:4840
authentication=0
username=admim
password=Atos1234
securityMode=Sign
securityPolicie=BASIC256SHA256

PLM:/home/ATOS/Server/back/niit-product/config/application-prod.yml

orderSyncPlm:
  syncPlm: false #是否同步到plm
  plmServiceAddress: http://192.168.89.15:7001/LZPLMInterface/services/PLMService?wsdl #PLM webservice接口地址
#默认opc ua applicationKey 与plc交互时候使用此key
applicatoinKey: niit-opcua-client

如何重启相关进程

PLC:

[root@niitmes3 back]# ps -ef |grep opc
root     18825     1  0 14:02 ?        00:01:20 java -jar opc-ua-app-1.0-SNAPSHOT.jar config/
root     24233  6284  0 17:11 pts/1    00:00:00 grep --color=auto opc
[root@niitmes3 back]# kill -9 18825
[root@niitmes3 back]# cd /home/ATOS/Server/back/opcua/
[root@niitmes3 opcua]# nohup java -jar opc-ua-app-1.0-SNAPSHOT.jar
config/                      niit-opcua-client.der        nohup.out                    test.sh
log/                         niit-opcua-client.pem        opc-ua-app-1.0-SNAPSHOT.jar  tmp
[root@niitmes3 opcua]# nohup java -jar opc-ua-app-1.0-SNAPSHOT.jar config/ &
[5] 24255
[root@niitmes3 opcua]# nohup: ignoring input and appending output to ‘nohup.out’

PLM:

[root@niitmes3 config]# ps -ef |grep cvc-niit-prouct-1.0.0.jar
root     18600     1  2 13:58 ?        00:04:11 java -jar cvc-niit-prouct-1.0.0.jar config/
root     23950  6284  0 17:04 pts/1    00:00:00 grep --color=auto cvc-niit-prouct-1.0.0.jar
[root@niitmes3 config]# kill -9 18600
[root@niitmes3 config]# cd /home/ATOS/Server/back/niit-product/
[root@niitmes3 niit-product]# nohup java -jar cvc-niit-prouct-1.0.0.jar config/ &
[4] 23958
[root@niitmes3 niit-product]# nohup: ignoring input and appending output to ‘nohup.out’

[root@niitmes3 niit-product]#

相关的日志文件如何查看

操作系统日志:tail -f /var/log/message
MES软件逻辑程序日志: tail -f /home/ATOS/Server/back/niit-product/nohup.out
MES软件OPCUA进程日志: tail -f /home/ATOS/Server/back/opcua/nohup.out

你可能感兴趣的:(MES系统登录和Linux操作)