惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
B
Blog
P
Proofpoint News Feed
美团技术团队
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
有赞技术团队
有赞技术团队
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
罗磊的独立博客
L
LangChain Blog
GbyAI
GbyAI
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog

博客园 - calochCN

using webpack5 这里想配置一下mysql主从,并归档,以备使用 hotkey resizer, rect win small app using C, tool utils Using ES6 Module In Browser. reprint, Use of logrotate go copy object deep深拷贝 go get net/http connections count, using middleware 手动数据库分库分片策略 记录一下ubuntu 挂载一下raid1 硬盘的过程 好久不弄css导航条,这里再布一下 sapui5 说说备案问题,说说发现的腾讯云和gitee这些国内服务商,使用过程中发现的一些猫腻 我最近觉得自己的收藏夹很乱,因为没有事情做,就想闲着给自己做个网址导航的软件【一】 学日语看到一个笑话 抽几分钟,写个文档系统的前端页面,先排版一下. 文字竖排,从上到下排列,仿古文的写法 从前做前端的时候, 联通的好多html5活动, 页面布局如何整齐,回顾一个常用的 我依然没有用quest2串流过一次... 这次还是决定好好用hugo写一下模板系统
ubuntu 如何将任何app run为服务
calochCN · 2026-04-06 · via 博客园 - calochCN

这里有些服务要用:

1. app 的安装位置

2. app要添加到环境变量path里面

3. app 要添加服务,需要在systemd/system/下面添加app的service

sudo nano /etc/systemd/system/myapp.service

[Unit]
Description=My Application Service
After=network.target

[Service]
Type=simple
User=username  # 替换为运行应用的用户
ExecStart=/path/to/your/application  # 例如 /usr/bin/python3 /path/to/myapp.py
Restart=on-failure
Environment="PYTHONPATH=/path/to/your/python/modules"  # 如果需要设置环境变量

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload

sudo systemctl start myapp.service

sudo systemctl enable myapp.service

sudo systemctl status myapp.service

journalctl -u myapp.service