php-fpm开机自启
php-fpm.service
[Unit]
Description=php-fpm service
After=php-nginx.service mysql.server.service
Wants=php-nginx.service mysql.server.service
[Service]
Type=forking
User=root
Group=root
ExecStart=/Data/apps/php/sbin/php-fpm -R
Restart=always
[Install]
WantedBy=multi-user.target
nginx开机自启
nginx.service
[Unit]
Description=nginx - high performance web server
[Service]
Type=forking
User=root
Group=root
ExecStart=/Data/apps/nginx/sbin/nginx
Restart=always
[Install]
WantedBy=multi-user.target
mysql 开机自启
[Unit]
Description=MySQL Community Server
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
Alias=mysql.service
[Service]
Type=forking
User=mysql
Group=mysql
# Execute pre and post scripts as root
PermissionsStartOnly=true
# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql-systemd-start pre
# Start main service
ExecStart=/etc/init.d/mysql.server start
ExecStop=/etc/init.d/mysql.server stop
# Give up if ping don't get an answer
TimeoutSec=600
Restart=always
PrivateTmp=false
LimitNOFILE=65535
LimitNPROC=65535
网友评论