< in-depth analysis nginx> compiling and installing nginx and using Eclipse compiler to develop nginx

Source: Internet
Author: User
Tags nginx server

Next year will look for a job, look at the classic Open source project-nginx, the Library borrowed a < in-depth analysis of NGINX>, began to study, read and take notes.

The first is the Nginx environment configuration related

Reference post: Nginx Module development---Linux using Eclipse compilation, debugging Nginx article 5:linux using Eclipse for Nginx module development

In particular, refer to the above post and book, the following is about the next step:

1. The classic three steps to compile the installation Nginx:

Download the source code First: Download link

./configure--with-debug--prefix=/home/zy/code/nginx/
Make
Make install
An error will be reported here:

./configure:error:the HTTP Rewrite module requires the PCRE library
Use the following command line to install the appropriate dependent library:

sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 Libssl-dev Zlib1g-dev


2. This installs successfully, under the corresponding installation directory, runs the executable file (with root permission), the Nginx server runs, in the browser enters the localhost, can see the corresponding welcome interface.


3. Configure Eclipse to the appropriate environment, the specific interface is not, the previous mentioned post written in very detailed.

is to create a new makefile project, the compiler chooses GCC, this project specifies the path of the source code. After new, specify the parameters to run (-C profile path), select the appropriate executable file, and so on.


4. Modify the listening port to 8080, because the 80 port requires root permission, and Eclipse is not open with root, it is convenient, and just can see the corresponding configuration file. Run with Eclipse and enter in the browser: localhost:8080 can also see the Welcome screen.

At this point, the basic environment can be quickly set up well. I can't wait to appreciate the source.

< in-depth analysis nginx> compiling and installing nginx and using Eclipse compiler to develop nginx

Related Article

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.