Added manual build in script
This commit is contained in:
@@ -172,6 +172,36 @@ EOF
|
||||
download)
|
||||
download_nginx "$2" "$3"
|
||||
;;
|
||||
installdeps)
|
||||
# Determine package manager and install nginx
|
||||
if command -v dnf >/dev/null 2>&1; then
|
||||
PKG_MGR="dnf"
|
||||
$PKG_MGR install -y nginx openssl-devel pcre-devel zlib-devel rpm-build gcc gcc-c++ make wget
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
PKG_MGR="yum"
|
||||
$PKG_MGR install -y nginx openssl-devel pcre-devel zlib-devel rpm-build gcc gcc-c++ make wget
|
||||
elif command -v apt-get >/dev/null 2>&1; then
|
||||
PKG_MGR="apt-get"
|
||||
apt-get update
|
||||
$PKG_MGR install -y nginx debhelper-compat dh-autoreconf libssl-dev libpcre2-dev zlib1g-dev make gcc build-essential wget
|
||||
else
|
||||
echo "Unsupported package manager."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
installmod)
|
||||
if command -v dnf >/dev/null 2>&1 || command -v yum >/dev/null 2>&1; then
|
||||
mkdir -p /usr/share/nginx/modules /etc/nginx/modules
|
||||
cp *.so /usr/lib64/nginx/modules/
|
||||
echo 'load_module "/usr/lib64/nginx/modules/ngx_http_apache_rewrite_module.so";' \
|
||||
> /usr/share/nginx/modules/ngx_http_apache_rewrite_module.conf
|
||||
else
|
||||
mkdir -p /usr/share/nginx/modules/ /etc/nginx/modules
|
||||
cp *.so /usr/share/nginx/modules/
|
||||
echo 'load_module "/usr/share/nginx/modules/ngx_http_apache_rewrite_module.so";' \
|
||||
> /etc/nginx/modules/ngx_http_apache_rewrite_module.conf
|
||||
fi
|
||||
;;
|
||||
packageprep)
|
||||
PKG_MGR=""
|
||||
NGINX_CUSTOM_VER="$2"
|
||||
|
||||
Reference in New Issue
Block a user