`

[web architect]1. nginx on ubuntu

 
阅读更多

快速简易版

sudo apt-key add nginx_signing.key (见附件)

sudo apt-get install nginx

ls /usr/share/nginx/www/

50x.html  index.html

 

专业定制版

1.Download

1.1 Download nginx source

eric@ubuntu:~$ sudo wget http://nginx.org/download/nginx-1.3.11.tar.gz -P /opt/library
--2013-01-19 19:07:16--  http://nginx.org/download/nginx-1.3.11.tar.gz
Resolving nginx.org (nginx.org)... 206.251.255.63
Connecting to nginx.org (nginx.org)|206.251.255.63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 744064 (727K) [application/octet-stream]
Saving to: `/opt/library/nginx-1.3.11.tar.gz'

100%[================================================================================>] 744,064     39.6K/s   in 24s

2013-01-19 19:07:41 (30.0 KB/s) - `/opt/library/nginx-1.3.11.tar.gz' saved [744064/744064]

eric@ubuntu:~$ ls /opt/library/
nginx-1.3.11.tar.gz

 

1.2. Download pcre(Perl Compatible Regular Expressions/Perl兼容正则表达式库)

eric@ubuntu:~$ sudo wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.bz2 -P /opt/library/
--2013-01-19 19:15:08--  ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.bz2
           => `/opt/library/pcre-8.21.tar.bz2'
Resolving ftp.csx.cam.ac.uk (ftp.csx.cam.ac.uk)... 131.111.8.80
Connecting to ftp.csx.cam.ac.uk (ftp.csx.cam.ac.uk)|131.111.8.80|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/software/programming/pcre ... done.
==> SIZE pcre-8.21.tar.bz2 ... 1174037
==> PASV ... done.    ==> RETR pcre-8.21.tar.bz2 ... done.
Length: 1174037 (1.1M) (unauthoritative)

100%[================================================================================>] 1,174,037    133K/s   in 10s

2013-01-19 19:15:24 (112 KB/s) - `/opt/library/pcre-8.21.tar.bz2' saved [1174037]

eric@ubuntu:~$ ls /opt/library/
nginx-1.3.11.tar.gz  pcre-8.21.tar.bz2

 

1.3. Download nginx-http-concat

eric@ubuntu:~$ sudo wget https://github.com/taobao/nginx-http-concat/archive/master.zip  -P /opt/library/
--2013-01-19 19:21:41--  https://github.com/taobao/nginx-http-concat/archive/master.zip
Resolving github.com (github.com)... 207.97.227.239
Connecting to github.com (github.com)|207.97.227.239|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://nodeload.github.com/taobao/nginx-http-concat/zip/master [following]
--2013-01-19 19:21:42--  https://nodeload.github.com/taobao/nginx-http-concat/zip/master
Resolving nodeload.github.com (nodeload.github.com)... 207.97.227.252
Connecting to nodeload.github.com (nodeload.github.com)|207.97.227.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7457 (7.3K) [application/zip]
Saving to: `/opt/library/master.zip'

100%[================================================================================>] 7,457       28.2K/s   in 0.3s

2013-01-19 19:21:44 (28.2 KB/s) - `/opt/library/master.zip' saved [7457/7457]

 

1.4. Download zlib

eric@ubuntu:~$ sudo wget https://github.com/feuyeux/meridians/raw/master/3rd-library/zlib-1.2.7.tar.bz2 -P /opt/library/
--2013-01-19 22:08:15--  https://github.com/feuyeux/meridians/raw/master/3rd-library/zlib-1.2.7.tar.bz2
Resolving github.com (github.com)... 207.97.227.239
Connecting to github.com (github.com)|207.97.227.239|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.github.com/feuyeux/meridians/master/3rd-library/zlib-1.2.7.tar.bz2 [following]
--2013-01-19 22:08:17--  https://raw.github.com/feuyeux/meridians/master/3rd-library/zlib-1.2.7.tar.bz2
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 505085 (493K) [application/x-bzip2]
Saving to: `/opt/library/zlib-1.2.7.tar.bz2'

100%[============================================================>] 505,085      146K/s   in 3.4s

2013-01-19 22:08:22 (146 KB/s) - `/opt/library/zlib-1.2.7.tar.bz2' saved [505085/505085]

 

2.Install

2.1 Unzip concat module

eric@ubuntu:~$ sudo apt-get install zip
eric@ubuntu:~$ sudo unzip -lv /opt/library/master.zip
Archive:  /opt/library/master.zip
f784090d4e6bb880bc1dc7fd37cbf908d3911efa
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 2012-12-03 00:13 00000000  nginx-http-concat-master/
    7660  Defl:N     3298  57% 2012-12-03 00:13 6e88a84b  nginx-http-concat-master/README.md
     185  Defl:N      105  43% 2012-12-03 00:13 284abf20  nginx-http-concat-master/config
   15318  Defl:N     3410  78% 2012-12-03 00:13 61358738  nginx-http-concat-master/ngx_http_concat_module.c
--------          -------  ---                            -------
   23163             6813  71%                            4 files
eric@ubuntu:~$ sudo unzip /opt/library/master.zip -d /opt/
Archive:  /opt/library/master.zip
f784090d4e6bb880bc1dc7fd37cbf908d3911efa
   creating: /opt/nginx-http-concat-master/
  inflating: /opt/nginx-http-concat-master/README.md
  inflating: /opt/nginx-http-concat-master/config
  inflating: /opt/nginx-http-concat-master/ngx_http_concat_module.c
eric@ubuntu:~$ ls /opt/nginx-http-concat-master/
config  ngx_http_concat_module.c  README.md

 

2.2. Install pcre

eric@ubuntu:~$ sudo tar xjpf /opt/library/pcre-8.21.tar.bz2 -C /opt
eric@ubuntu:~$ sudo chown eric:eric /opt/pcre-8.21/
eric@ubuntu:~$ sudo chown eric:eric /opt/pcre-8.21/*
eric@ubuntu:/opt/pcre-8.21$ sudo apt-get install build-essential
eric@ubuntu:/opt/pcre-8.21$ sudo ./configure --prefix=/usr/local/pcre-8.21 --libdir=/usr/local/lib/pcre --includedir=/usr/local/include/pcre
pcre-8.21 configuration summary:

    Install prefix .................. : /usr/local/pcre-8.21
    C preprocessor .................. : gcc -E
    C compiler ...................... : gcc
    C++ preprocessor ................ : g++ -E
    C++ compiler .................... : g++
    Linker .......................... : /usr/bin/ld -m elf_x86_64
    C preprocessor flags ............ :
    C compiler flags ................ : -O2
    C++ compiler flags .............. : -O2
    Linker flags .................... :
    Extra libraries ................. :

    Build C++ library ............... : yes
    Enable JIT compiling support .... : no
    Enable UTF-8 support ............ : no
    Unicode properties .............. : no
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Use JIT in pcregrep ............. : no
    Buffer size for pcregrep ........ : 20480
    Link pcregrep with libz ......... : no
    Link pcregrep with libbz2 ....... : no
    Link pcretest with libreadline .. : no
eric@ubuntu:/opt/pcre-8.21$ sudo make
eric@ubuntu:/opt/pcre-8.21$ sudo make install

 

2.3. Install zlib

eric@ubuntu:~$ sudo tar xjpf /opt/library/zlib-1.2.7.tar.bz2 -C /opt
eric@ubuntu:/opt/zlib-1.2.7$ sudo ./configure && sudo make && sudo make install

 

2.4. Install nginx with concat module

eric@ubuntu:/~$ sudo tar xvzf /opt/library/nginx-1.3.11.tar.gz -C /opt
eric@ubuntu:~$ sudo chown eric:eric /opt/nginx-1.3.11/
eric@ubuntu:~$ sudo chown eric:eric /opt/nginx-1.3.11/*
eric@ubuntu:/opt/nginx-1.3.11$ ./configure --prefix=/usr/local/nginx --user=eric --group=eric --with-pcre=/opt/pcre-8.21 --with-zlib=/opt/zlib-1.2.7 --add-module=/opt/nginx-http-concat-master
Configuration summary
  + using PCRE library: /opt/pcre-8.21
  + OpenSSL library is not used
  + using builtin md5 code
  + sha1 library is not found
  + using zlib library: /opt/zlib-1.2.7

  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"
eric@ubuntu:/opt/nginx-1.3.11$ sudo make
eric@ubuntu:/opt/nginx-1.3.11$ sudo make install

 

3. Test and Configure

eric@ubuntu:/opt/nginx-1.3.11$ /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.3.11
built by gcc 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configure arguments: --prefix=/usr/local/nginx --user=eric --group=eric --with-pcre=/opt/pcre-8.21 --with-zlib=/opt/zlib-1.2.7 --add-module=/opt/nginx-http-concat-master

eric@ubuntu:/opt/nginx-1.3.11$ sudo /usr/local/nginx/sbin/nginx
eric@ubuntu:/opt/nginx-1.3.11$ curl http://localhost
http://192.168.0.160/
eric@ubuntu:/opt/nginx-1.3.11$ sudo nano /usr/local/nginx/conf/nginx.conf

 

 

分享到:
评论

相关推荐

    Enterprise Architect 7.5.845.139 key

    ### 关于 Enterprise Architect 7.5.845.139 版本及密钥的知识点 #### 1. Enterprise Architect 软件简介 Enterprise Architect (EA) 是一款强大的建模工具,由 Sparx Systems 开发。该软件主要用于系统架构设计、...

    Enterprise Architect 8.0.858 汉化补丁包

    1. **兼容性**:确保你的Enterprise Architect版本与汉化补丁包相匹配,否则可能会出现不兼容问题。 2. **备份**:在安装补丁前,最好备份原有的配置和项目,以防万一出现问题可以恢复。 3. **安装过程**:按照补丁...

    Embarcadero RAD Studio XE Architect 15.0.3953.35171 (Update1) with RadPHP XE 3.0.0.1319 Crack

    总之,Embarcadero RAD Studio XE Architect 15.0.3953.35171 (Update1) with RadPHP XE 3.0.0.1319 提供了一个强大的开发环境,旨在帮助开发者快速、高效地构建高质量的多平台应用程序,无论是桌面应用还是Web应用...

    Enterprise Architect 8.0.858 汉化破解版

    Enterprise Architect是一款计算机辅助软件工程(CASE)工具,用于设计和构建软件系统、业务流程建模及更多通用的建模。  Enterprise ArchitectEA并不仅仅是一个UML画图工具那么简单,它对整个项目开发过程有着非常...

    Sencha Architect 4.0.part02.rar22

    Sencha Architect 4.0.part02.rar

    Enterprise Architect 8.0.858

    1. **统一建模语言(UML)支持**:Enterprise Architect全面支持UML2.5标准,允许用户创建各种类型的UML图,包括用例图、类图、序列图、状态机图、组件图和部署图等。这使得软件开发人员能够清晰地表达系统的需求、...

    EnterpriseArchitect 8.0.858 序列号生成器 KeyGen

    Enterprise Architect是一款由Sparx Systems公司开发的企业级统一建模工具,主要用于系统分析、设计和实现。该软件广泛应用于软件工程、企业架构、业务流程建模等多个领域。在这个场景中,"EnterpriseArchitect 8.0....

    Sencha Architect 2.x无限次使用教程

    Sencha Architect 2.x无限次使用教程 Sencha Architect 2是ExtJS和Sencha Touch的官方可视化IDE工具。最新版本是2.2,说是破解,其实是修改License来实现无限试用而已

    IBM Rational Software Architect建模.pdf

    IBM Rational Software Architect建模扫描版。

    Advanced Installer Architect 15.9.0汉化+破解.rar

    1、双击Advanced Installer Setup 安装主程序。2、把 Advanced Installer ZH-CN 汉化补丁文件夹内的文件复制到安装目录,替换源文件。3、把Crack里面的破解补丁 Advanced Installer Patch 复制到软件安装目录一键...

    Enterprise Architect 8.0.858的正式板的工具

    Enterprise Architect是一款强大的统一建模语言(UML)工具,由Sparx Systems公司开发,用于软件工程、系统工程、业务过程建模等多个领域。版本8.0.858是该工具的一个正式版本,提供了稳定的功能和改进。在这个版本...

    EnterpriseArchitect.12.0.1210 破解版 带注册 包2

    EnterpriseArchitect.12.0.1210 破解版 带注册码 包2,下载好包1后才能解压出来

    Software Architect1.rar

    "Software Architect1.rar"这个压缩包文件,很可能包含了关于软件架构师的详细资料,包括其职责、技能需求以及在实际项目中的应用。下面我们将深入探讨软件架构师的角色及其相关知识点。 首先,软件架构师是软件...

    EnterpriseArchitect.12.0.1210.CE+注册码

    EnterpriseArchitect.12.0.1210.CE 注册码 用户手册

    enterprise architect 8.0.864

    enterprise architect 8.0.864 非试用版

    Enterprise Architect 7.1.831 序列号 注册码

    Enterprise Architect 7.1.831 序列号 注册码 原版下载地址 http://www.enterprisearchitect.cn/download.php

    Enterprise_Architect教程.pdf

    《Enterprise_Architect教程》是一份详尽的指南,旨在帮助用户深入了解并熟练掌握Enterprise Architect这一强大的企业级建模工具。Enterprise Architect(简称EA)是由Sparx Systems开发的一款广泛应用于软件开发、...

    Sparx.Systems.Enterprise.Architect.Corporate.v7.1.831

    Sparx.Systems.Enterprise.Architect.Corporate.v7.1.831

    Sencha Architect 4.0.part01.ra

    Sencha Architect 4.0.part01.ra

    Enterprise Architect 8.0.858.zip

    Enterprise Architect 8.0.858 文件太大,分割成5个文件上传,每个资源2分,还是比较厚道了,望见谅。 合并软件,在这里有,可以免分下载,或者到其他地方找,名字叫hjsplit 生命周期软件设计方案——Enterprise ...

Global site tag (gtag.js) - Google Analytics