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- ...
随机推荐
- mac上为nginx打开防火墙
1 nginx的路径必须是物理路径,不能是链接 2 执行下面的两个命令后重启电脑 命令 sudo /usr/libexec/ApplicationFirewall/socketfilterfw --a ...
- ranlib
1 ranlib的缩写 random access library 2 ranlib的作用 为静态库的符号建立索引,可以加速链接,因此称用ranlib处理过的library为random access ...
- 查询局域网内全部电脑IP和mac地址等信息
怎么查询局域网内全部电脑IP和mac地址等信息_百度经验 https://jingyan.baidu.com/article/54b6b9c0348e432d583b47c1.html 枚举ping ...
- transport transmission
运输层 transport layer 传输控制协议 transmission control protocol
- apache配置访问限制
1.禁止访问某些文件/目录 增加Files选项来控制,比如要不允许访问 .txt扩展名的文件,保护php类库: <Files ~ "\.txt$"> Order all ...
- codeforces 686C C. Robbers' watch(dfs)
题目链接: C. Robbers' watch time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- VScode相关
这就是我想要的 VSCode 插件! VS Code 快捷键(中英文对照版) visual studio code 配置vue开发环境 vscode 这样的注释怎么生成? 能让你开发效率翻倍的 VSC ...
- E20170517-gg
jaw n. 下巴; 颌; indicator n. 指示器; gator n. 短吻鳄; median n. 中位数; 中线; [数] 中值;
- Tinkoff Challenge - Elimination Round C. Mice problem(模拟)
传送门 题意 给出一个矩形的左下角和右上角的坐标,给出n个点的初始坐标和运动速度和方向,询问是否存在一个时间使得所有点都在矩形内,有则输出最短时间,否则输出-1 分析 对于每个点如果运动过程中都不在矩 ...
- bzoj 2754: [SCOI2012]喵星球上的点名【AC自动机】
洛谷90,最后一个点死活卡不过去(也可能是我写的有问题? 比较暴力的做法,把询问带着标号建立AC自动机,用map存儿子. 然后用名字串在自动机上跑,以为是名或姓的子串就行所以把名和姓中间加个特殊字符拼 ...