Last active
August 1, 2024 10:45
-
-
Save FFY00/909d5823ed7cf794ab62e32561b2826f to your computer and use it in GitHub Desktop.
Out-of-tree NGINX modules build and installation scripts
This file contains 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
#!/bin/sh | |
NGINX_SRC=/usr/src/nginx-1.26.1-1.fc40 | |
ln -sf $NGINX_SRC/auto | |
ln -sf $NGINX_SRC/src | |
$NGINX_SRC/configure \ | |
--with-compat \ | |
--add-dynamic-module=../nginx-module-FOO \ | |
--add-dynamic-module=../nginx-module-BAR | |
make modules |
This file contains 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
#!/bin/sh | |
moddir=/usr/lib64/nginx/modules | |
confdir=/usr/share/nginx/modules | |
for obj in objs/ngx_*.so; do | |
name=$(basename $obj .so) | |
install -Dm755 $obj $moddir/$name.so | |
echo "load_module $moddir/$name.so;" >$confdir/$name.conf | |
done | |
# Check configuration to see if anything failed | |
nginx -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment