[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/bin
DAEMON=/usr/local/nginx/sbin/nginx PS="nginx"
PIDNAME="nginx" #lets you do $PS-slave
PIDFILE=$PIDNAME.pid #pid file
PIDSPATH=/usr/local/nginx/logs #default pid location, you should change it DESCRIPTION="Nginx Server..." RUNAS=root #user to run as SCRIPT_OK=0 #ala error codes
SCRIPT_ERROR=1 #ala error codes
TRUE=1 #boolean
FALSE=0 #boolean lockfile=/var/lock/subsys/nginx
NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"

Step 4

vi /etc/rc.local

add the code

service nginx start

[php-fpm]

Step 1

cp -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

Have fun with Ubuntu!

[Ubuntu] Autostart nginx, php-fpm and mysql in Ubuntu14.04的更多相关文章

  1. Ubuntu 16.04 LTS 安装 Nginx/PHP 5.6/MySQL 5.7 (LNMP) 与Laravel

    Ubuntu 16.04 LTS 安装 Nginx/PHP 5.6/MySQL 5.7 (LNMP) 与Laravel 1.MySQL安装[安装 MariaDB]MariaDB是MySQL的一个分支首 ...

  2. Ubuntu下安装Nginx,PHP5(及PHP-FPM),MySQL

    .简介: Tomcat在高并发环境下处理动态请求时性能很低,而在处理静态页面更加脆弱.虽然Tomcat的最新版本支持epoll,但是通过Nginx来处理静态页面要比通过Tomcat处理在性能方面好很多 ...

  3. Ubuntu编译安装nginx,php,mysql

    摘要: 整理的Ubuntu编译安装nginx,php,mysql的步骤,主要来自对驻云的sh-1.4.1中脚本的整理,随时代进步,内容中的软件或者命令请自行更新 目录准备 创建用户 userdel w ...

  4. virtualbox搭建ubuntu server nginx+mysql+tomcat web服务器1 (未完待续)

    virtualbox搭建ubuntu server nginx+mysql+tomcat web服务器1 (未完待续) 第一次接触到 linux,不知道linux的确很强大,然后用virtualbox ...

  5. 记录一次自己对nginx+fastcgi(fpm)+mysql压力测试结果

    nginx + fastcgi(fpm) 压力测试: CentOS release 5.9 16核12G内存 静态页面: 并发1000,压测200秒,测试结果: 系统最大负载5.47 成功响应: 25 ...

  6. Ubuntu 14 编译安装 PHP 5.4.45 + Nginx 1.4.7 + MySQL 5.6.26 笔记

    Ubuntu 14 编译安装 PHP 5.4.45 + Nginx  1.8.0/1.4.7 + MySQL 5.6.26 笔记,主要是给自己的PC机安装,非生产环境! 一.下载必要的源码 1.1.下 ...

  7. [阿里云部署] Ubuntu+Flask+Nginx+uWSGI+Mysql搭建阿里云Web服务器

    部署地址:123.56.7.181 Ubuntu+Flask+Nginx+uWSGI+Mysql搭建阿里云Web服务器 这个标题就比之前的"ECS服务器配置Web环境的全过程及参考资料&qu ...

  8. Ubuntu+Django+Nginx+uWSGI+Mysql搭建Python Web服务器

    Ubuntu+Django+Nginx+uWSGI+Mysql搭建Python Web服务器 闲着无聊的时候部署了一个Django项目玩,用vm虚拟机部署的. 准备工作 我使用的系统是Ubuntu16 ...

  9. 手把手教你在Ubuntu上分别安装Nginx、PHP和Mysql

    手把手教你在Ubuntu上分别安装Nginx.PHP和Mysql

随机推荐

  1. 用httpPost对JSON发送和接收

    HTTPPost发送JSON: private static final String APPLICATION_JSON = "application/json"; private ...

  2. DPM总结

    DPM:Deformable Parts Model(来自http://www.cs.berkeley.edu/~rbg/latent/index.html) 目标检测算法 先计算梯度方向直方图,在用 ...

  3. 【C++Q】

    //c_str const char* str2Cchar(string s){ //const char* ss = s.c_str(); //出错,因为s会被析构,ss指向垃圾内容 ]; strc ...

  4. HTML标签的改变

    /*这些都是前端面试中经常考到的内容,必须要掌握的*/ 一.新的文档类型声明(DTD) 1.HTML5的DTD声明为:<!doctype html>或者<!DOCTYPE html& ...

  5. Sql Server中通配符

    Sql Server中通配符的使用 通配符_ "_"号表示任意单个字符,该符号只能匹配一个字符."_"可以放在查询条件的任意位置,且只能代表一个字符.一个汉字只 ...

  6. 忘记Mysql的root密码的处理办法

    1,停止MYSQL服务,CMD打开DOS窗口,输入 net stop mysql 2,在CMD命令行窗口,进入MYSQL安装目录 比如E:\Program Files\MySQL\MySQL Serv ...

  7. Malformed POM expected START_TAG or END_TAG not TEXT

    I resolved this problem by replacing blank space to tab. 规范些就解决这个问题了!!! 由此可见规范的重要性!

  8. Could not find class XXX referenced from method XXX.<YYY>

    Since some ADT-Version you have to set which libraries / projects should be exported too. Project-Pr ...

  9. Java遇见HTML——JSP篇之JSP基础语法

    一.JSP简介 JSP全名为Java Server Pages,Java服务器端页面,其根本是一个简化的Servlet设计,它实现了在Java中使用HTML标签.Jsp是一种动态网页技术标准,是在服务 ...

  10. expect实现交互式脚本

    #!/usr/bin/expect -f ##告诉解释器用expect来解释 set timeout 6 ##设置超时时间 ] ## 这个是传递给脚本的第一个参数,并把参数赋值给user ] ## 这 ...