How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7
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的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 如何在Ubuntu16.04 中安装Linux, Nginx, MySQL, PHP (LEMP 栈)
介绍 LEMP 栈是用来开发动态网页和web 应用程序的一系列软件集合,LEMP描述的是Linux操作系统,Nginx web 服务器,以及后端数据存储MySQL/MariaDB数据库和服务器端动态脚 ...
- 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 ...
- Linux Debian 7部署LEMP(Linux+Nginx+MySQL+PHP)网站环境
我们在玩VPS搭建网站环境的时候,都经常看到所谓的LAMP.LNMP.LEMP,LAMP, 其中的A代表APECHE WEB驱动环境,LNMP中的N代表NGINX驱动环境,只不过海外的叫法NGINX ...
- 阿里云服务器部署php的laravel项目,在阿里云买ECS 搭建 Linux+Nginx+Mysql+PHP环境的
在阿里云买ECS的时候选择自己习惯的镜像系统,我一般都是使用Linux Ubuntu,所以,以下的配置都是在Ubuntu 14.04稳定支持版的环境中搭建Linux+Nginx+Mysql+PHP环境 ...
- linux+nginx+mysql+php
LNMP(linux+nginx+mysql+php)服务器环境配置 一.简介 Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为 “engine X”, 是一个高性能的 ...
- LNMP(Linux+Nginx+Mysql+PHP---源码)环境搭建
LNMP(Linux+Nginx+Mysql+PHP(Perl)) Linux:[root@dep5 mysql]# cat /etc/issueRed Hat Enterprise Linux Se ...
随机推荐
- 开源分布式计算引擎 & 开源搜索引擎 Iveely 0.5.0 为大数据而生
Iveely Computing 产生背景 08年的时候,我开始接触搜索引擎,当时遇到的第一个难题就是大数据实时并发处理,当时实验室的机器我们可以随便用,至少二三十台机器,可以,却没有程序可以将这些机 ...
- CoffeeScript及相关文本标记语言
粗步看了下CoffeeScript(简称cs),发现cs这玩意还是有些问题,当然最大的问题之一是缺乏称手的工具.要是能放VS里编译调试当然好.但是转来转去的,真不如直接多敲几个JS字符串. 问题之二就 ...
- jquery基本方法
jquery的delay sleep 与js的setTime的区别. delay 和sleep推荐不要用,太难用了. click on live delegate bind http://www.jb ...
- 标准IDispose模式浅析
DoNet资源 众所周知,.Net内存管理分托管资源和非托管资源,把内存中的对象按照这两种资源划分,然后由GC负责回收托管资源(Managed Resource),而对于非托管资源来讲,就需要程序员手 ...
- WCF入门(9)
前言 上次搬家空调出了点问题,和修空调的师傅商量了一下,感觉还是讲理的. 今天又在公司基本没有任何存在感的过了一天,纠结...领导还不在... 前些天往手机里面放了几集WCF入门视频,今天用暴风影音看 ...
- 每天一个linux命令(23): chown命令
chown将指定文件的拥有者改为指定的用户或组,用户可以是用户名或者用户ID:组可以是组名或者组ID:文件是以空格分开的要改变权限的文件列表,支持通配符.系统管理员经常使用chown命令,在将文件拷贝 ...
- HP 电脑装 纯净版的win7
新买的 HP 电脑,自带 Win10 的操作系统,今天把它改成 装win7 系统 在安装的过程中遇到的问题 1.数字证书错误.您安装的操作系统来源不明之类的错误,具体没有记下来 2.磁盘的格式不是NT ...
- 【CodeForces 577B】Modulo Sum
题 题意 给你n(1 ≤ n ≤ 106)个数a1..an(0 ≤ ai ≤ 109),再给你m( 2 ≤ m ≤ 103)如果n个数的子集的和可以被m整除,则输出YES,否则NO. 分析 分两种情况 ...
- 【转】mac os x系统上Android开发环境的搭建
由于Google官方已经不提供Adt-Bundle下载了,主推AndroidStudio.可以从这个链接下载http://www.androiddevtools.cn.上面不光有adt-bundle, ...
- BZOJ-1875 HH去散步 DP+矩阵乘法快速幂
1875: [SDOI2009]HH去散步 Time Limit: 20 Sec Memory Limit: 64 MB Submit: 1196 Solved: 553 [Submit][Statu ...