LNMP安装后自启动设置

本文介绍了如何在安装LNMP(Linux, Nginx, MySQL, PHP)后,进行自启动设置,确保系统重启后MySQL能够自动启动。" 113009983,10543465,微信小程序实现浮动电话按钮,"['微信小程序', '前端开发', '组件开发']
摘要由CSDN通过智能技术生成

mysql自启动

——————————————————————————————————————————————————————————

cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 2345 mysqld on
chown mysql:mysql -R /usr/local/mysql/
service mysqld start

———————————————————————————————————————————————————

nginx自启动
设置nginx开机启动

在 /etc/init.d/  目录下创建 nginx 文件 内容如下:
#!/bin/bash   
# nginx Startup script for the Nginx HTTP Server   
# this script create it by gcec at 2009.10.22.   
# it is v.0.0.1 version.   
# if you find any errors on this scripts,please contact gcec cyz.   
# and send mail to support at gcec dot cc.   
#   
# chkconfig: - 85 15  
# description: Nginx is a high-performance web and proxy server.   
#              It has a lot of features, but it's not for everyone.   
# processname: nginx   
# pidfile: /var/run/nginx.pid   
# config: /usr/local/nginx/conf/nginx.conf   
  
nginxd=/app/nginx/sbin/nginx                   *
nginx_config=/app/nginx/conf/nginx.conf           *
nginx_pid=/var/run/nginx.pid                   *
  
RETVAL=0  
pro
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值