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 ...
随机推荐
- 第一章 OO大智慧
今天,正式开始读王涛写的<你必须知道的.NET(第二版)>,刚开始读了序,觉得写的相当精彩,就被吸引住了.看了一会发现本书的特点可能就是以例举例,形象生动,比较期待的样子.虽然前面讲的概念 ...
- css编写的时候注意什么
1.尽量少写div.别没事干就加一个div层. 我们尽量做到代码清晰,结构清晰. 2.css的定位,漂浮,容量,margin,padding我们用的时候尽量. 写的时候,有很多种,但是我们必须要求自己 ...
- [USACO2005][POJ2226]Muddy Fields(二分图最小点覆盖)
题目:http://poj.org/problem?id=2226 题意:给你一个字符矩阵,每个位置只能有"*"或者“.",连续的横着或者竖的“*"可以用一块木 ...
- 7、面向对象以及winform的简单运用(委托)
委托 1.概念: 委托可以看成是一个函数的“容器”,将某一具体的函数“装入”后,就可以把它当成函数一样使用.委托变量可看成是一种类型安全的函数指针,它只能接收符合其要求的函数地址. 2.定义方法:de ...
- WCF入门(11)
前言 终于出太阳了. 可惜风太大,凉在阳台上的衣服全被吹到了地上,外加几双袜子被吹掉了,gone. 第11集 Difference between DataContract and MessageCo ...
- 安装xampp二三事
1.chrome 找不到页面时会自动跳转到hao123 安装完chrome后,想测试下localhost,结果找不到页面,当然正常的显示是“该页面无法显示”才对,可恨啊,总是直接转到hao123页面上 ...
- 北京大学信息科学技术学院计算机专业课程大纲选摘--JAVA
- JS模式-基本的单例模式
//singleton var SingletonTester = (function(){ function Singleton(options){ options = options || {}; ...
- JS:采摘自JS精粹
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jdownload的使用
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...