Under RHEL6.4, Nginx1.6.0 plugin development record 1. nginx compilation and deployment #. /configure -- with-poll_module -- with-http_ssl_module -- with-file-aio -- with-ipv6 # makeinstall # cd/usr/local/nginx/sbin #. /nginx # ps-ef | grepnginxr
Nginx 1.6.0 plug-in development record in RHEL 6.4
1. nginx compilation and deployment
#./Configure -- with-poll_module -- with-http_ssl_module -- with-file-aio -- with-ipv6
# Make install
# Cd/usr/local/nginx/sbin
#./Nginx
# Ps-ef | grep nginx
Root 7330 1 0? 00:00:00 nginx: master process./nginx
Nobody 7331 7330 0? 00:00:00 nginx: worker process
#./Nginx-h
Nginx version: nginx/1.4.2
Usage: nginx [-? HvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?, -H: this help
-V: show version and exit
-V: show version and configure options then exit
-T: test configuration and exit
-Q: suppress non-error messages during configuration testing
-S signal: send signal to a master process: stop, quit, reopen, reload
-P prefix: set prefix path (default:/usr/local/nginx /)
-C filename: set configuration file (default: conf/nginx. conf)
-G directives: set global directives out of configuration file
// Stop the service
#./Nginx-s stop
2. Plug-in development
Reference:
From entry-level to entry-level Nginx DevelopmentHttp://www.linuxidc.com/Linux/2015-07/120463.htm
Code directory structure:
/Projects
Nginx-1.6.0
-Nginx-http-myplugin
-- Config
-- Ngx_http_myplugin_module.c
-- Ngx_http_myplugin_module.c
Nginx-1.6.0 is the nginx source code directory
Nginx-http-myplugin is the directory of our plug-in code
Config File Content:
#-*-Mode: sh ;-*-
Ngx_addon_name = ngx_http_myplugin_module
HTTP_MODULES = "$ HTTP_MODULES ngx_http_myplugin_module"
NGX_ADDON_SRCS = "$ NGX_ADDON_SRCS $ ngx_addon_dir/ngx_http_myplugin_module.c"
In the/projects/nginx-1.6.0 directory, run the following command to compile:
./Configure -- with-poll_module -- with-http_ssl_module -- with-file-aio -- with-ipv6 -- add-module = ../nginx-http-filerepair -- with-debug
CentOS 6.2 Deployment Nginx + MySQL + PHP http://www.linuxidc.com/Linux/2013-09/90020.htm
Build a WEB server http://www.linuxidc.com/Linux/2013-09/89768.htm with Nginx
Build a Web server http://www.linuxidc.com/Linux/2013-09/89692.htm Based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5
Nginx Performance Tuning http://www.linuxidc.com/Linux/2013-09/89656.htm in CentOS 6.3
Configure Nginx to load ngx_pagespeed module http://www.linuxidc.com/Linux/2013-09/89657.htm under CentOS 6.3
CentOS 6.4 install and configure Nginx + Pcre + php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
Nginx installation configuration use notes http://www.linuxidc.com/Linux/2014-07/104499.htm
Nginx log filtering using ngx_log_if does not record specific log http://www.linuxidc.com/Linux/2014-07/104686.htm
Nginx details: Click here
Nginx: Click here
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-07/12046.htm