nacos
# cat /etc/systemd/system/nacos.service
[Unit]
Description=nacos
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/src/nacos/bin/startup.sh
ExecStop=/usr/local/src/nacos/bin/shutdown.sh
PrivateTmp=true
[Install]
WantedBy=multi-user.target
redis
# cat /etc/systemd/system/redis.service
[Unit]
Description=redis
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
ExecStart=/usr/local/src/redis/bin/redis-server /usr/local/src/redis/redis.conf
[Install]
WantedBy=multi-user.target
mysql
# cat /etc/systemd/system/mysqld.service
[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
User=mysql
Group=mysql
ExecStart=/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf
LimitNOFILE = 5000
标签:target,After,redis,nacos,usr,mysql
From: https://www.cnblogs.com/liudianer/p/17698822.html