apt-get方式安装lnmp环境
安装nginx
sudo apt-get install nginx
安装php和mysql
sudo apt-get install php5-cli php5-cgi php5-curl php5-mysql php5-fpm mysql-server 修改nginx配置文件
/etc/nginx/nginx.conf 添加 /etc/nginx/vhost/localhost.conf 文件
server {
listen ;
server_name localhost; #绑定域名
index index.htm index.html index.php; #默认文件
root /data/webroot; #网站根目录
location ~ \.php$ {
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
include fastcgi_params;
}
access_log /data/logs/access.log;
error_log /data/logs/error.log;
}
server {
listen ;
server_name test.localhost; #绑定域名
index index.htm index.html index.php; #默认文件
root /data/webroot/testRoot; #网站根目录
location ~ \.php$ {
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
include fastcgi_params;
}
access_log /data/logs/test_access.log;
error_log /data/logs/test_error.log;
}
检查nginx配置
sudo /usr/sbin/nginx -t
重启nginx
sudo /usr/sbin/nginx -s reload
启动php-cgi
php-cgi -b 127.0.0.1:9000
apt-get方式安装lnmp环境的更多相关文章
- Centos 6.8编译安装LNMP环境
Centos 6.8编译安装LNMP环境 参考资料: http://www.jb51.net/article/107429.htm https://phperzh.com/articles/1360 ...
- 阿里云Ubuntu安装LNMP环境之PHP7
在QQ群很多朋友问阿里云服务器怎么安装LNMP环境,怎么把项目放到服务器上面去,在这里,我就从头开始教大家怎么在阿里云服务器安装LNMP环境. 在这之前,我们先要知道什么是LNMP. L: 表示的是L ...
- 阿里云Ubuntu安装LNMP环境之Mysql
在QQ群很多朋友问阿里云服务器怎么安装LNMP环境,怎么把项目放到服务器上面去,在这里,我就从头开始教大家怎么在阿里云服务器安装LNMP环境. 在这之前,我们先要知道什么是LNMP. L: 表示的是L ...
- 阿里云Ubuntu安装LNMP环境之Nginx
在QQ群很多朋友问阿里云服务器怎么安装LNMP环境,怎么把项目放到服务器上面去,在这里,我就从头开始教大家怎么在阿里云服务器安装LNMP环境. 在这之前,我们先要知道什么是LNMP. L: 表示的是L ...
- CentOS 7 安装 LNMP 环境(PHP7 + MySQL5.7 + Nginx1.10)
记录下在CentOS 7 安装 LNMP 环境(PHP7 + MySQL5.7 + Nginx1.10)过程笔记. 工具 VMware版本号 : 12.0.0 CentOS版本 : 7.0 一.修改 ...
- WordPress安装篇(4):YUM方式安装LNMP并部署WordPress
YUM方式安装软件的优点就是简单.方便.快捷,本文介绍在Linux上如何使用YUM方式快速安装LNMP并部署WordPress.使用Linux CentOS 7.9 + Nginx 1.18 + My ...
- CentOS安装LNMP环境的基础组件
注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. 在安装LNMP环境之前,请确保已经使用yum安装了以下各类基础组件(如果系统已自带,还可以考虑yum update下基础组件): ...
- 在Raspberry配置优化安装LNMP环境总结
在Raspberry配置优化安装LNMP环境总结 apt-get update apt-get install nginx apt-get install php5-fpm php5-cli php5 ...
- 【转】lnmp_auto:自动化安装lnmp环境脚本
原文链接: lnmp_auto:自动化安装lnmp环境脚本 这哥们整理的这篇博文很好 转载分享 博文转载如下: 源代码在github上:https://github.com/jianfengye/ ...
随机推荐
- js-FCC算法-Symmetric Difference
创建一个函数,接受两个或多个数组,返回所给数组的 对等差分(symmetric difference) (△ or ⊕)数组. 给出两个集合 (如集合 A = {1, 2, 3} 和集合 B = {2 ...
- Jenkins的Publish Over FTP Plugin插件参数使用
无论在Windows还是Linux下,都是采用这样方式${WORKSPACE}
- 未在本地计算机上注册"microsoft.ACE.oledb.12.0"提供程序解决办法
错误信息:未在本地计算机上注册“microsoft.ACE.oledb.12.0”提供程序. 解决办法: 去http://download.microsoft.com/download/7/0/3/7 ...
- [NOIP2015] 普及组
金币 模拟 #include<iostream> #include<cstdio> using namespace std; int main(){ int k,n; scan ...
- Flipping Bits in Memory Without Accessing Them: An Experimental Study of DRAM Disturbance Errors
目录 . Rowhammer Introduction . Rowhammer Principle . Track And Fix 1. rowhammer introduction 今天的DRAM ...
- shell !符号
执行某历史命令 history找出历史命令id号 ! id
- C#把数据写到硬盘指定位置
FileStream fs; StreamWriter sw;string RootPath = @"C:\Advantech" + "\\tempData\\" ...
- 数据结构作业——N!的位数(斯特灵公式)
Description 求N!的位数 Input 输入第一行为一个正整数 n(1<=n<=25000). Output 输出 n!的位数. Sample Input 1020 Sample ...
- django redirect的几种方式
You can use the redirect() function in a number of ways. By passing some object; that object’s get_a ...
- 【原】ajaxupload.js上传报错处理方法
相信大家在工作中经常用到文件上传的操作,因为我是搞前端的,所以这里主要是介绍ajax在前端中的操作.代码我省略的比较多,直接拿js那里的 $.ajaxFileUpload({ url:'www.cod ...