How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7

时间:2021-10-16 00:16:28

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.

How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7

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. 检索 COM 类工厂中 CLSID 为 {820280E0-8ADA-4582-A1D9-960A83CE8BB5} 的组件失败,原因是出现以下错误: 80040154 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))。

    检索 COM 类工厂中 CLSID 为 {820280E0-8ADA-4582-A1D9-960A83CE8BB5} 的组件失败,原因是出现以下错误: 80040154 没有注册类 (异常来自 HRE ...

  2. 【C#】分享一个可灵活设置边框的Panel

    ---------------------------更新:2014-05-19--------------------------- 优化了一下逻辑,就是既然可以通过设置BorderSide=Non ...

  3. 【BZOJ1002】[FJOI2007]轮状病毒 递推+高精度

    Description 给定n(N<=100),编程计算有多少个不同的n轮状病毒. Input 第一行有1个正整数n. Output 将编程计算出的不同的n轮状病毒数输出 Sample Inpu ...

  4. MSSQL 2012 拒绝了对对象 &&num;39&semi;extended&lowbar;properties&&num;39&semi; &lpar;数据库 &&num;39&semi;mssqlsystemresource&&num;39&semi;,架构 &&num;39&semi;sys&&num;39&semi;&rpar;的 SELECT 权限

    查看数据库的表的时候报如下错误: MSSQL 拒绝了对对象 ) 解决方法: 在数据库里相应的用户权限中,把db_denydatareader的复选框的勾去掉.db_denydatareader是拒绝访 ...

  5. java高薪之路&lowbar;&lowbar;008&lowbar;Annotation

    元注解 共有4种 @Retention 表示需要在什么级别保存该注释信息(生命周期) |--- RetentionPolicy.SOURCE: 停留在java源文件,编译器被丢掉 |--- Reten ...

  6. &grave;cocos2dx非完整&grave; 游戏架构缩影 添加启动流程

    这期的话题可能不是很好, 我没有想到很好的词句去更好的表达. 我一直都是很固执的认为, 同一类型的游戏,在开发做的前期工作上面其实都是可以复用的,也就是大同小异的.从游戏启动,启动日志,启动检查,检查 ...

  7. ROM存储1&sol;4周期正弦信号构造DDS

    上周的时候,老师让编写一个简单的dds程序,本文说明了整个过程中我遇到问题以及一些个人的思考.初次接触FPGA,如有问题请多多指教~ 1.几个疑问,解决和没有解决的. 为何采用ROM而不是直接采用DD ...

  8. 如何使用SVN管理我们的源代码

    今天把公司的SVN服务器配置给做了一下,根据公司部门的不同,划分了不同的访问目录,并给不同目录配置了相应的权限,算是把这份差事给干完了,但其实我对自己的工作是不满意和有遗憾的,因为目前公司的SVN服务 ...

  9. JPA常用注解

    JPA全称Java Persistence API.JPA通过JDK 5.0注解或XML描述对象-关系表的映射关系,并将运行期的实体对象持久化到数据库中.        JPA由EJB 3.0软件专家 ...

  10. BandwagonHost

    https://kiwivm.64clouds.com/main-exec.php?mode=extras_* https://kiwivm.64clouds.com/main-e ...