[Nginx]
Step 1
Download the shell script
wget Https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx-O/etc/init.d/nginx
Step 2
chmod +x/etc/init.d/nginx
Step 3
Modify the code marked with red color to your configure
path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDAEMON =/usr/local/nginx/sbin/ nginxPS="Nginx"Pidname="Nginx" #lets do $PS-slavepidfile=$PIDNAME. pid#pid Filepidspath=/usr/local/nginx/logs #default PID location, your should change itDESCRIPTION="Nginx Server ..."RUNAS=root#user to run asSCRIPT_OK=0#ALA Error CodesScript_error=1#ALA Error CodesTRUE=1#BooleanFALSE=0#BooleanLockfile=/var/lock/subsys/nginxnginx_conf_file = "/usr/local/nginx/conf/nginx.conf"
Step 4
Vi/etc/rc.local
Add the Code
Service Nginx Start
[PHP-FPM]
Step 1
- F (php-5.4.x-source-dir)/sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
Step 2
chmod +x/etc/init.d/php-fpm
Step 3
Vi/etc/rc.local
Add the Code
Service PHP-FPM Start
[MySQL]
Step 1
Cp/path/to/your/mysql/support-files/mysql.server/etc/init.d/mysql
Step 2
Vi/etc/rc.local
Add the Code
Service MySQL Start
Has fun with ubuntu!