CentOS 7的服务systemctl脚本存放在:/usr/lib/systemd/,有系统(system)和用户(user)之分,像需要开机不登陆就能运行的程序,还是存在系统服务里吧,即:/usr/lib/systemd/system目录下 [Unit] Description=MonitorJSCloud After=network.service [Service] Type=simple ExecStart=/usr/bin/python/root/test/ping_test.py…