标签:mct net start reload targe mysq 启动文件 usr 服务
vim /lib/systemd/system/nginx.service[Unit]
Description=nginx
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
PrivateTmp=true
[Install]
WantedBy=multi-user.target
设置nginx开机自启动systemctl enable nginx.service
开启nginx服务:systemctl start nginx.service
vim /lib/systemd/system/mysql.service
文件内容:
[Unit]
Description=mysql
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/mysql/support-files/mysql.server start
ExecStop=/usr/local/mysql/support-files/mysql.server stop
ExecRestart=/usr/local/mysql/support-files/mysql.server restart
ExecReload=/usr/local/mysql/support-files/mysql.server reload
PrivateTmp=true
[Install]
WantedBy=multi-user.target
设置mysql服务开机自启动systemctl enable mysql.service
vim /etc/systemd/system/php-fpm.service
文件内容:
[Unit]
Description=php-fpm
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/php/sbin/php-fpm
PrivateTmp=True
[Install]
WantedBy=multi-user.target
设置php-fpm服务开机自启动:systemctl enable php-fpm.service
启动php-fpm:systemctl start php-fpm.service
标签:mct net start reload targe mysq 启动文件 usr 服务
原文地址:http://blog.51cto.com/14033037/2332687