ubuntu 12.04 server编译安装nginx
tar -xvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./config
make
make install
above is for zlib(refers http://zlib.net/ for zlib),and below is for pcre-devel
apt-get install libpcre3 libpcre3-dev
then, compile and install nginx(get the newest stable source code from nginx.org)
virtualenv nginx_env
cd nginx_env
source bin/activate
tar -xvf nginx-1.6.2.tar.gz
cd nginx-1.6.2
./configure
make
make install
output log with "make"
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using builtin md5 code
+ sha1 library is not found
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
=========================test it ==========================
/usr/local/nginx/nginx
just open page 'http://127.0.0.1' in web browser and see what happens.
and one more effort, let's try to use nginx with gunicorn.
first, install gunicorn.
pip install gunicorn
then, django
easy_install django
next, start a project ,and run it with gunicorn
django-admin startproject test_gn
cd test_gn
gunicorn -D test_gn.wsgi
finally ,configure nginx
vi /usr/local/nginx/conf/nginx.conf
and add a server like below down
server{
listen localhost:88;
location / {
proxy_pass http://127.0.0.1:8000;
}
location /static/ {
autoindex:on;
alias absolute/path/to/static/dir;
}
}
restart the nginx server(kill the older progress and start a new one)
------------------编译源码有时候不一定能解决问题---------------
可以参考这个来升级nginx: https://www.binss.me/blog/install-lastest-nginx-on-ubuntu/
ubuntu 12.04 server编译安装nginx的更多相关文章
- Ubuntu 12.04 server 如何安装 OpenERP 7(转)
不经意的一次看到OpenERP这个开源ERP,就被其丰富的功能,简洁的画面,熟悉的语言所吸引.迫不及待的多方查询资料,自己架设一个测试环境来进行了解.以下为测试安装时候的步骤说明,以备查询,并供有需要 ...
- ubuntu 12.04下编译安装nginx-1.9.3
1,下载nginx-1.9.3.tar.gz 两种方式: (1).ubuntu 下终端中(ctrl+alt+t) 运行命令: wget http://nginx.org/download/nginx- ...
- Ubuntu 12.04本地编译安装Vim
1.下载Vim,参考http://www.vim.org/git.php 2.编译安装Vim,参考https://github.com/Valloric/YouCompleteMe/wiki/Buil ...
- 如何在Ubuntu 12.04 Server 中安装图形用户界面
root@ubuntu:~# gedit /etc/environment root@ubuntu:~# gedit /etc/profile ---------------------------- ...
- 安装Redmine 2.3.0(Ubuntu 12.04 Server)
怀揣着为中小企业量身定做一整套开源软件解决方案的梦想开始了一个网站的搭建.http://osssme.org/ 安装Redmine 2.3.0(Ubuntu 12.04 Server) 翻译源\参考源 ...
- dell r710 安装ubuntu 12.04 server 启动后进入initramfs解决办法
dell r710 安装ubuntu 12.04 server 启动后进入initramfs解决办法 grub 启动菜单后加入 rootdelay=90, 如下:/boot/vmlinuz-2.6.3 ...
- OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(三)——计算节点的安装
序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 计算节点: 1.准备结点 安装好ubuntu 12.04 Server 64bits后,进入ro ...
- OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(二)——网络节点的安装
序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 网络节点: 1.安装前更新系统 安装好ubuntu 12.04 Server 64bits后,进 ...
- OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(一)——控制节点的安装
序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 控制节点: 1.准备Ubuntu 安装好Ubuntu12.04 server 64bits后 ...
随机推荐
- angular_$inject
<!DOCTYPE HTML> <html lang="zh-cn" ng-app="MainApp"> <head> &l ...
- navigationBar设置透明度
将NavigationBar设置透明(仅将指定视图控制器进行透明处理),步骤如下:1.在视图控制器的头文件中实现UINavigationControllerDelegate,例如:@interface ...
- artDialog 文档
artDialog —— 经典.优雅的网页对话框控件. 支持普通与 12 方向气泡状对话框 完善的焦点处理,自动焦点附加与回退 支持 ARIA 标准 面向未来:基于 HTML5 Dialog 的 AP ...
- oracle基本语句
ALTER TABLE SCOTT.TEST RENAME TO TEST1--修改表名 ALTER TABLE SCOTT.TEST RENAME COLUMN NAME TO NAME1 --修改 ...
- python 学习笔记2(list/directory/文件对象/模块/参数传递)
### Python的强大很大一部分原因在于,它提供有很多已经写好的,可以现成用的对象. 11. list list是一个类.每个列表都属于该类. >>>nl = [1,2,5,3, ...
- Hession矩阵与牛顿迭代法
1.求解方程. 并不是所有的方程都有求根公式,或者求根公式很复杂,导致求解困难.利用牛顿法,可以迭代求解. 原理是利用泰勒公式,在x0处展开,且展开到一阶,即f(x) = f(x0)+(x-x0)f' ...
- codevs1358 棋盘游戏
题目描述 Description 这个游戏在一个有10*10个格子的棋盘上进行,初始时棋子位于左上角,终点为右下角,棋盘上每个格子内有一个0到9的数字,每次棋子可以往右方或下方的相邻格子移动,求一条经 ...
- android studio中the logging tag can be most 23 characters
转:http://blog.csdn.net/voiceofnet/article/details/49866047 今天写代码的时候,突然发现平时用的好好的Log竟然报错,提示信息为:the log ...
- 用word写博客
都知道word的编辑功能强大,那如何用word写博客呢? 以博客园为例 1.写好word文档后,文件->共享->发送至博客,或者新建博客模板 2. 再博客的界面点击管理账户,新建账户,如果 ...
- MVC执行顺序
MVC在底层和传统的asp.net是一致的,在底层之上,相关流程如下: 1)Global.asax里,MvcApplication对象的Application_Start()事件中,调用 RouteC ...