https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-debian-7

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04

1) Update Apt-Get

The apt-get update command is used to re-synchronize the package index files from their sources. If used in combination with the apt-get upgrade command, they install the newest versions of all packages currently available.

At the moment, we only need to do a thorough update:

sudo apt-get update

2) Install MySQL on your VPS

MySQL is a powerful database management system used for organizing and retrieving data

To install MySQL, open terminal and type in these commands:

sudo apt-get install mysql-server

During the installation, MySQL will ask you to set a root password. If you miss the chance to set the password while the program is installing, it is very easy to set the password later from within the MySQL shell.

Once you have installed MySQL, we should activate it with this command:

3) Install and Configure Nginx on your VPS

Installation

Initial installation is simple with the apt-get command.

sudo apt-get install nginx

nginx needs a command to begin running:

sudo service nginx start

Configuration

vim /etc/nginx/nginx.conf, 在http中加入以下代码,

      server {
listen 80; root /opt/app/blog/wz/wordpress/;
index index.php index.html index.htm; server_name iwangzheng.com; location / {
try_files $uri $uri/ /index.html;
} error_page 404 /404.html; error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
} location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; } }

nginx.conf的第一行是user www-data;

把这个项目目录的权限修改下

sudo chown -R www-data:www-data /opt/app/blog/wz/wordpress/

4) Install and Configure PHP

Installation

You probably guessed it! We will use the apt-get command to install PHP-FPM:

sudo apt-get install php5-fpm php5-mysql
sudo service nginx restart
sudo service php5-fpm restart

How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7的更多相关文章

  1. How To Install Linux & Nginx & MySQL & PHP (LEMP) stack on Raspberry Pi 3,Raspberry Pi 3,LEMP,Nginx,PHP, LEMP (not LNMP)

    1.   How To Install Linux & Nginx & MySQL & PHP (LEMP) stack on Raspberry Pi 3         R ...

  2. How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6

    About Lemp LEMP stack is a group of open source software to get web servers up and running. The acro ...

  3. How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6 【Reliable】

    About LAMP LAMP stack is a group of open source software used to get web servers up and running. The ...

  4. 如何在Ubuntu16.04 中安装Linux, Nginx, MySQL, PHP (LEMP 栈)

    介绍 LEMP 栈是用来开发动态网页和web 应用程序的一系列软件集合,LEMP描述的是Linux操作系统,Nginx web 服务器,以及后端数据存储MySQL/MariaDB数据库和服务器端动态脚 ...

  5. ubuntu14.04 LEMP(linux+nginx+mysql+php5)构建环境

    Install LEMP (Linux, Nginx, MySQL and PHP) Stack on Ubuntu Linux 14.04 LTS by VIVEK GITE on DECEMBER ...

  6. Linux Debian 7部署LEMP(Linux+Nginx+MySQL+PHP)网站环境

    我们在玩VPS搭建网站环境的时候,都经常看到所谓的LAMP.LNMP.LEMP,LAMP, 其中的A代表APECHE WEB驱动环境,LNMP中的N代表NGINX驱动环境,只不过海外的叫法NGINX ...

  7. 阿里云服务器部署php的laravel项目,在阿里云买ECS 搭建 Linux+Nginx+Mysql+PHP环境的

    在阿里云买ECS的时候选择自己习惯的镜像系统,我一般都是使用Linux Ubuntu,所以,以下的配置都是在Ubuntu 14.04稳定支持版的环境中搭建Linux+Nginx+Mysql+PHP环境 ...

  8. linux+nginx+mysql+php

    LNMP(linux+nginx+mysql+php)服务器环境配置   一.简介 Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为 “engine X”, 是一个高性能的 ...

  9. LNMP(Linux+Nginx+Mysql+PHP---源码)环境搭建

    LNMP(Linux+Nginx+Mysql+PHP(Perl)) Linux:[root@dep5 mysql]# cat /etc/issueRed Hat Enterprise Linux Se ...

随机推荐

  1. 记”Uri.IsWellFormedUriString”中的BUG

    场景 先上逻辑代码 1: /// <summary> 2: /// 图片真实地址 3: /// </summary> 4: public string FullImagePat ...

  2. express 笔记 app.helpers 和 app.locals

    app.helpers 和app.dynamicHelpers 是express2.X使用的 分别为静态/动态 视图助手通过其注册函数, 例如 app.helpers({ <span style ...

  3. nginx 负载均衡服务器的双机搞可用

    摘自书籍:<实战Nginx取代Apache高性能Web服务器>一书 P94 两种方式实现 一种方式是公司里的一台web服务器作为主服务器,另一台服务器作为热备服务器 主服务器绑定一个虚拟I ...

  4. Java-ArrayList

    package 集合类.list类; /** * System.Collections.ArrayList类是一个特殊的数组.通过添加和删除元素,就可以动态改变数组的长度. 一.优点 1.支持自动改变 ...

  5. 【kAriOJ】离散数学春季学期编程测试 1

    A.凯撒密码 题意: 给你k1,k2,和一串明文,一串密文. 明文用k1加密,密文用k2解密. 对于明文要把字母转换成大写字母,非字母全部删除. 额:要考虑到取模可能会变成负数,所以要加一下26再取模 ...

  6. linux 问答

    问:1 如何查看当前的Linux服务器的运行级别? 答: ‘who -r’ 和 ‘runlevel’ 命令可以用来查看当前的Linux服务器的运行级别. 问:2 如何查看Linux的默认网关? 答: ...

  7. 【poj1716】 Integer Intervals

    http://poj.org/problem?id=1716 (题目链接) 题意 给出n个区间,要求取出最少数量的不同的自然数,使每个区间中至少包含2个取出的数. Solution 差分约束. 运用前 ...

  8. POJ2187 Beauty Contest

    Description Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, ea ...

  9. foeach集合遍历

    package number; public class Number { public static void main(String[] args) { int[] arr={5,2,1,0,3, ...

  10. POJ1836Alignment(LCA)

    Alignment Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 15135   Accepted: 4911 Descri ...