deepin开机自动启动服务备忘


systemctl enable mysql.service(设置开机自启)
sudo systemctl start nginx.service
sudo systemctl restart nginx.service
$ sudo systemctl stop nginx.service

PS:使用命令 systemctl is-enabled postfix.service 得到的值可以是enable、disable或static,这里的 static 它是指对应的 Unit 文件中没有定义[Install]区域,因此无法配置为开机启动服务。

刚刚配置的服务需要让systemctl能识别,就必须刷新配置

systemctl daemon-reload

sudo systemctl daemon-reload

最后采用wiki上的记录,在/etc/rc.local文件中添加即可,无需以上操作。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM