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/ ...
随机推荐
- Leetcode Wiggle Sort II
Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]... ...
- Leetcode Find K Pairs with smallest sums
本题的特点在于两个list nums1和nums2都是已经排序好的.本题如果把所有的(i, j)组合都排序出来,再取其中最小的K个.其实靠后的很多组合根本用不到,所以效率较低,会导致算法超时.为了简便 ...
- poj 1269 线段相交/平行
模板题 注意原题中说的线段其实要当成没有端点的直线.被坑了= = #include <cmath> #include <cstdio> #include <iostrea ...
- Markdown编辑器简单总结
字体大小: #1 ##2 添加链接: 文字链接 [blog](http://yalantis.com/blog/how_we_created_tab_bar_animation_for_ios/?ut ...
- tomcat 和servlet之间的关系
http://tomcat.apache.org/whichversion.html pache Tomcat Versions Apache Tomcat® is an open source so ...
- class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class
今天在工作中遇到了下面的问题: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springfram ...
- hihoCoder 1401 Registration
多队列模拟. 与POJ #1025 Department类似, 不过简化很多. 貌似这类模拟题经常出现. 用STL中的优先队列 (priority_queue<>) 很好写. 这题我写得很 ...
- jQuery中的text()、html()和val()以及innerText、innerHTML和value
*jQuery中设置或者获取所选内容的值:text();设置或者获取所选元素的文本内容: html();设置或者获取所选元素的内容(包括html标记): val();设置或者获取表单字段的值(前提是表 ...
- centos7安装mplayer 错误集锦
(1)在 linux下运行程序时,发现了error while loading shared libraries这种错误,一时间不知道解决办法,在网上搜索,终于解决了:./tests: error w ...
- Python3导入cookielib失败
Python 3 改成 http.cookiejar了,所以只要改成import http.cookiejar就自动导入cookiejar了,如果还是不行,就把所有的.pyc删掉试试.