Brief guidance to linux systemd configuration

Brief guidance to linux systemd configuration

Notice: This article is only available in Chinese version. :( 习惯了诸如 " systemctl {start|status|stop|enable|disable} httpd " 等类似的命令?在Linux中如何将普通的应用程序设置成服务? 这里以 frp client 为例,实现在 Ubuntu 18.04 上的普通的应用程序添加进守护进程以方便配置自启动。 配置service文件 在应用程序的安装或配置位置,新建一个 frpc.service ,然后再来按照区块编辑这个文件: Unit 负责服务的描述,启动顺序和依赖关系。 Before 和 After 定义服务的启动顺序(在某个程序之前或之后)。 require 要求某个服务启动成功,否则不会启动该自定义服务,而 Wants 则不会终止该自定义服务的启动。 …

Continue Reading