centos 解决nacos自动布署

发布时间:2024-04-29 16:53:40

在/lib/systemd/system下建立nacos.service,如下内容

[Unit]
Description=nacos
After=network.target
 
[Service]
Environment="JAVA_HOME=/root/soft/jdk1.8.0_202"
Type=forking
ExecStart=/root/soft/nacos/binstartup.sh -m standalone
ExecReload=/root/soft/nacos/bin/shutdown.sh
ExecStop=/root/soft/nacos/bin/shutdown.sh
PrivateTmp=true
 
[Install]
WantedBy=multi-user.target

设置自动启动

systemctl enable nacos

开启与关闭

systemctl start nacos
systemctl stop nacos

Card image cap
应用宝
Card image cap
APP STORE
Card image cap
应用宝
Card image cap
小米