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- ...
随机推荐
- 初识 flask
1,Python现阶段三大主流web框架Django, Tornado, Flask对比 Django主要特点是大而全,集成了很多组件,列如:Models Admin Form等等,不管用得用不着反正 ...
- iOS开发——高级篇——多线程GCD死锁
面试题 请问以下代码打印结果: - (void)interview01 { // 以下代码是在主线程执行的 NSLog(@"执行任务1"); dispatch_queue_t qu ...
- Virtual IP address
https://en.wikipedia.org/wiki/Virtual_IP_address Virtual IP address From Wikipedia, the free encyclo ...
- hosts所在文件夹以及***
hosts所在文件夹: Windows 系统hosts位于 C:\Windows\System32\drivers\etc\hosts Android(安卓)系统hosts位于 /etc/hosts ...
- 在myeclipse中拷贝一个工程,修改部署的名字
在MyEclipse中,经常练习的时候需要建立多个工程,但是为了方便,通常的作法是:复制一个工程,然后直接粘贴,但是,部署以后会发现,使用新的工程名访问不了,报404错误. 其原因是没有修改W ...
- Lightoj 1020 - A Childhood Game
Allice先拿,最后拿球的输. Bob先拿,最后拿球的赢. 考虑Alice先拿球,当n=1时 Alice输 记dp[1]=0; n=2, dp[2]=1 n=3, dp[3]=1 因为n=1, ...
- wpa_supplicant介绍【转】
本文转载自:https://zhuanlan.zhihu.com/p/24246712 一.什么是wpa_spplicant wpa_supplicant本是开源项目源码,被谷歌修改后加入Androi ...
- eclipse svn修改用户名密码
1,svn客户端删除 2,eclipse 补充,上图为网友资料,但实际操作过程中,发现eclipse中svn为svnkit,但相应目录下无.keyring文件,最后按步骤2删除auth下所有文件,再次 ...
- Goland软件使用教程(二)
Goland软件使用教程(二)一.编码辅助功能 1. 智能补全 IDE通过自动补全语句来帮助您来编写代码.快捷键“Ctrl+shift+空格”将会给你一个在当前上下文中最相关符号的列表,当您 ...
- python的for...in...if...语句
Python中,for...[if]...语句一种简洁的构建List的方法,从for给定的List中选择出满足if条件的元素组成新的List,其中if是可以省略的.下面举几个简单的例子进行说明. &g ...