Linux平台单机部署切换ip

本文描述,若iot系统,在linux上单机部署,服务器ip修改后,iot系统ip如何更改

1.替换ip
cd /usr/local/hvisions/iot/config/ vi system-config #按下 :(英文冒号)进入底线命令模式; 键入下方命令,oldIp需要替换为旧ip,newIp需要替换为新ip;替换完成后,保存文件退出 %s/oldIp/newIp/g
2.执行stop-all-services.sh脚本;若停止某个服务时卡住,ctrl + c,使用docker stop 命令手动停止服务
cd /usr/local/hvisions/iot/services ./stop-all-services.sh
3.重新安装service-agent服务,license服务
#停止service-agent服务,license服务 systemctl stop service-agent systemctl stop license #查询service-agent服务,license服务是否停止 systemctl status service-agent systemctl status license #重新安装service-agent服务,license服务 cd /usr/local/hvisions/iot/script ./install-service-agent.sh /usr/local/hvisions/iot/ ./install-license-local.sh /usr/local/hvisions/iot/
4.执行stop-all-services.sh脚本;请耐心等待系统启动完成,若系统长时间未启动成功,请及时联系售后工程师
cd /usr/local/hvisions/iot/services ./start-all-services.sh
2024-04-25
0