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后 ...
随机推荐
- JavaScript基础系列目录(2014.06.01~2014.06.08)
下列文章,转载请亲注明链接出处,谢谢! 链接地址: http://www.cnblogs.com/ttcc/tag/JavaScript%20%E5%9F%BA%E7%A1%80%E7%9F%A5%E ...
- java的RMI(Remote Method Invocation)
RMI 相关知识RMI全称是Remote Method Invocation-远程方法调用,Java RMI在JDK1.1中实现的,其威力就体现在它强大的开发分布式网络应用的能力上,是纯Java的网络 ...
- OC基础--OC中的类方法和对象方法
PS:个人感觉跟C#的静态方法和非静态方法有点类似,仅仅是有点类似.明杰老师说过不要总跟之前学过的语言做比较,但是个人觉得,比较一下可以加深印象吧.重点是自己真的能够区分开! 一.OC中的对象方法 1 ...
- LightOJ1348 树链剖分
简单题,看题目就懂. #include<queue> #include<stack> #include<cmath> #include<cstdio> ...
- sql-函数avg,count,max,min,sum
常用函数 AVG (平均) COUNT (计数) MAX (最大值) MIN (最小值) SUM (总合) 运用函数的语法是: SELECT "函数名"("栏位名&qu ...
- 【POJ 2250】Compromise(最长公共子序列LCS)
题目字符串的LCS,输出解我比较不会,dp的时候记录从哪里转移来的,之后要一步一步转移回去把解存起来然后输出. #include<cstdio> #include<cstring&g ...
- BZOJ-1975 魔法猪学院 K短路 (A*+SPFA)
1975: [Sdoi2010]魔法猪学院 Time Limit: 10 Sec Memory Limit: 64 MB Submit: 1323 Solved: 433 [Submit][Statu ...
- hdu acmsteps 2.1.3 Cake
Cake Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submissi ...
- php两种导出excel的方法
所需要的:jquery库,phpexcel插件,页面导出excel效果测试文件explode.php,excel导出功能实现文件exp.php和explode_excel.php,文件相关内容在此文下 ...
- PHP函数篇详解十进制、二进制、八进制和十六进制转换函数说明
PHP函数篇详解十进制.二进制.八进制和十六进制转换函数说明 作者: 字体:[增加 减小] 类型:转载 中文字符编码研究系列第一期,PHP函数篇详解十进制.二进制.八进制和十六进制互相转换函数说明 ...