centos 8 xiashezhi.net corexiangmukaijizidongqidong
1.1在/etc/systemd/system 下創建pgsqlcodefirst.service文件;
pgsqlcodefirst.service文件添加:
2.使自啟動生效
systemctl enable pgsqlcodefirst.service
3.立即啟動項目服務
systemctl start pgsqlcodefirst.service
systemctl stop pgsqlcodefirst.service
systemctl restart pgsqlcodefirst.service
systemctl list-units --type=service
5.重啟服務:
shutdown -r now