nginx for ubuntu
1.创建文件夹 :mkdir nginx
2.解压nginx: tar zxvf nginx.gz.tar
3.nginx 初始化:在nginx的路径下执行:./configure
有可能会报错:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
解决办法:yum -y install pcre-devel ,如果报
执行 sudo apt install yum 还是报错,查找资料后发现在ubuntu中要用apt-get 的方法安装PCRE 依赖包
sudo apt-get install openssl libssl-dev
sudo apt-get install libpcre3 libpcre3-dev
sudo make 命令进行编译
sudo make install 安装nginx软件
这是默认安装到user文件夹下
4.nginx的启动与关闭
1.找到默认nginx的安装文件夹 usr/local/sbin 是nginx脚本所在的位置
nginx -h :查看nginx所有相关命令 nginx 的操作时通过发送信号给进程进行操作
nginx -q 测试配置时只显示错误
nginx -s SINGLE(信号类型) 向主机进程发送信号 :nginx -s quit 关闭nginx nginx -s reload 启动nginx
nginx -p :设置nginx服务器路径前缀
nginx -t :检查nginx服务器配置文件是否有语法错误
nginx -c :指定nginx的配置文件
nginx for ubuntu的更多相关文章
- [django] Deploy Django Applications Using uWSGI and Nginx on Ubuntu 14.04
关键点1:chmod-socket=666 (mysite_uwsgi.ini) 关键点2 : 工程目录和虚拟环境目录搞清楚 几个参考: http://uwsgi-docs.readthedocs.i ...
- How To Install Nginx on Ubuntu 16.04 zz
Introduction Nginx is one of the most popular web servers in the world and is responsible for hostin ...
- How to install nginx in Ubuntu
The steps for installing the nginx on Ubuntu below. 1.install the packages first. apt-get install gc ...
- nginx 在ubuntu上使用笔记(绑定域名)
1. 重启nginx的两个语句: sudo service nginx restart sudo nginx -s reload 2. nginx配置文件路径: etc/nginx/ 尤其是 site ...
- Django + Gunicorn + Nginx 部署 Ubuntu 服务器
Django + Gunicorn + Nginx 部署服务器 获取腾讯云 root权限 本人的服务器使用的是腾讯云,腾讯云默认是没有开放 root 用户的,我们来创建 root 用户. 创建 roo ...
- nginx 在ubuntu 上的启动,停止,重启
vi 显示行号 :set num 在开始玩nginx之前,得先安装nginx,可以参考 <ubuntu15.10_x64 安装 nginx> 启动 sudo /usr/local/ng ...
- Build Laravel Blog PigJian by PHP7 and Nginx on Ubuntu
Recently, I found an interesting framework Laravel written by PHP. i have never used PHP to write an ...
- Install nginx on ubuntu
1. Install libpcre3, libpcre3-dev2. Install zlib1g-dev3. Download nginx and unzip it4. ./configure5. ...
- 在Ubuntu 12.4 下安装 nginx, MySQL, PHP
LNMP是时下很流行的网站配置,我在配置蝉大师服务器的时候顺带把经验做个分享,蝉大师的网址是:http://www.ddashi.com/ 1.第一步, 跟新apt-get 输入: sudo apt- ...
随机推荐
- Servlet学习总结,为理解SpringMVC底层做准备
Servlet 一句话概括 :处理web浏览器,其他HTTP客户端与服务器上数据库或其他应用交互的中间层 Servlet 生命周期 : 1.类加载, 2.实例化并调用init()方法初始化该 Serv ...
- 嵌入式开发之dmva---基于DMVA2平台720P高清智能分析
http://wenku.baidu.com/view/2190746ba45177232f60a2b8.html
- iOS开发——高级篇——FMDB 数据库简单使用
#import <Foundation/Foundation.h> @interface UserDB : NSObject // 把userDB设计成一个单例类 + (id)shareI ...
- SprigMVC基础测试
创建POJO package org.entity; public class User { private int id; private String userName; private Stri ...
- YTU 1010: 目标柏林
1010: 目标柏林 时间限制: 1000 Sec 内存限制: 64 MB 提交: 32 解决: 15 题目描述 1945年初,苏军和英美联军已从东西两面攻入德国国境. 4月初,在苏军和英美联军的 ...
- ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling
ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling ...
- 1.ARC模式下如何兼容非ARC的类
ARC模式下如何兼容非ARC的类 :转变为ARC的, -f-objc-arc 非ARC模式下如何兼容ARC的类 :转变为非ARC -fno-objc-arc
- 二.OC基础--1,对象的存储细节,2,#pragma mark指令,3,函数和对象方法的区别,4,对象和方法之间的关系 ,5.课堂习题
1,对象的存储细节, 1. 当创建一个对象的时候:Person *p1 = [Person new],做了三件事情: 1,申请堆内存空间: 2,给实例变量初始化: 3,返回所申请空间的首地址; 2. ...
- 洛谷P4136 谁能赢呢?——博弈
题目:https://www.luogu.org/problemnew/show/P4136 每个人有足够聪明,一定会把图走满: 所以n为偶数先手胜,n为奇数后手胜. 代码如下: #include&l ...
- 2-3 Windows下一站式开发环境anaconda搭建
D:\Users\ZHONGZHENHUA\Anaconda3\Scripts\activate.bat https://www.geforce.com/hardware/notebook-gpus/ ...