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
#!/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