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