5 Steps for you to learn Windows compiler Nginx

Source: Internet
Author: User
Tags mercurial



Windows under the Nginx battle, people do not do will not die! It's like getting a McDonald's coupon to buy KFC.



  Nginx is a lightweight Web server, reverse proxy server, mail server and so on set a string of honors in one of the big characters! He is a Russian rich son, but for the old beauty of the neighbor's children Windows is not so kind, character, different appearance! After all, not a mother born child, ╮ ( ̄▽ ̄ ") ╭, not a mother born ... Fate is such a trick, the more you don't want to happen, the more you don't want to see, the more you avoid, he will jump in front of you, the teeth! One day, Nginx to the old Mei Home affairs, finished, no media, 2 people communication is not smooth, stumbling, not comfortable ...






Cut back to the point, nagging for a long time, we come to see how to compile Nginx module on Windows, this is not my original, I am the knowledge of the Porter (Nginx official website method)



Preparatory work:



1, download VS2010 + VS2010 SP1 (c + + compilation Environment), installation completed



2. Download MSYS1.0 (GNU environment) installation complete



3, download ActivePerl (SSL environment, self-download 64-bit or 32-bit), installation completed



4, download Mercurial (nginx source download, self-download 64-bit or 32-bit), installation completed



5. Download PCRE 8.39:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/(SSL-related, library functions)



6. Download Zlib 1.2.8 (SSL-related, library functions)



7. Download OpenSSL 1.0.1e






Operation Steps:



1, get nginx source : Open the cmd command, switch to the mercurial installation directory, execute the following command:

hg clone http://hg.nginx.org/nginx

 2. Placement of resource packs: In the Nginx root directory, create objs and lib level subdirectories, such as levels, and put them into the decompressed: PREC, zlib, OpenSSl


  
3. Create a compilation command set: In the Nginx root directory, create a build.bat with the following text:
auto / configure --with-cc = cl --builddir = objs --prefix = --conf-path = conf / nginx.conf --pid-path = logs / nginx.pid --http-log-path = logs /access.log --error-log-path = logs / error.log --sbin-path = nginx.exe --http-client-body-temp-path = temp / client_body_temp --http-proxy-temp-path = temp / proxy_temp --http-fastcgi-temp-path = temp / fastcgi_temp --with-cc-opt = -DFD_SETSIZE = 1024 --with-pcre = objs / lib / pcre-8.39 --with-zlib = objs / lib / zlib-1.2.8 --with-openssl = objs / lib / openssl-1.0.1e --with-select_module --with-http_ssl_module
   
 4. Produce MakeFile resources: Run MSYS (there is a shortcut on the desktop automatically after the installation is complete), switch to the Nginx root directory, and execute the following command:
build.bat
   Operations such as:
   
  
5. Compile the Nginx source code (1 and a half minutes): Run the VS2010 command line, switch to the Nginx root directory, and execute the following command:
nmake -f objs / Makefile
 

   
6. Finish! @@ # @ # @ ¥ @ # ¥ # ……% & …… * &!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.