Last active
August 31, 2024 09:16
-
-
Save blikenoother/7785364 to your computer and use it in GitHub Desktop.
Install 3rd party module and build NGINX debian (.deb) package.
Following is guide for nginx_upstream_check_module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install dpkg-dev and package dependencies | |
sudo apt-get install dpkg-dev | |
sudo apt-get install software-properties-common | |
sudo apt-get install python-software-properties | |
sudo apt-get install init-system-helpers | |
#Add repository: | |
sudo add-apt-repository ppa:nginx/stable | |
#Edit /etc/apt/sources.list.d/nginx-stable-lucid.list, add dpkg-src (no need if ubuntu verson >= 12.04): | |
deb http://ppa.launchpad.net/nginx/stable/ubuntu lucid main | |
deb-src http://ppa.launchpad.net/nginx/stable/ubuntu lucid main | |
#Resynchronize the package index files: | |
sudo apt-get update | |
#Get sources: | |
apt-get source nginx | |
#Build dependencies (https://launchpad.net/ubuntu/precise/+source/nginx): | |
sudo apt-get build-dep nginx | |
sudo apt-get install libgd2-noxpm-dev | |
#Compile module: | |
#download module from here https://github.com/yaoweibin/nginx_upstream_check_module | |
cd /path/to/NGINX | |
patch -p1 < /root/nginx_upstream_check_module/check_1.2.6+.patch | |
./configure --add-module=/root/nginx_upstream_check_module | |
make | |
make install | |
#add following line to rules file (/path/to/NGINX/debian/rules) | |
config.status.full: config.env.full | |
... | |
--add-module=path/to/nginx_uploadprogress_module #copy space from other module path and add \ at end like other module path | |
#Build package: | |
cd /path/to/NGINX | |
dpkg-buildpackage -b | |
#Packages(.deb) files will be created at / location (not in the NGINX source directory) | |
#Install packages: | |
dpkg --install nginx-common_*.deb | |
dpkg --install nginx-full_*.deb | |
#Check list of installed module | |
nginx -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why there's
make install
here in the middle? If we're building and installing deb, shouldn't we skip this manual install step?