nginx-noroot : support self-compile OpenSSL and bump various software version

This commit is contained in:
unknown 2022-11-30 15:51:33 +07:00
parent dcee91d7bc
commit 982f0775ed
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC
3 changed files with 21 additions and 15 deletions

View File

@ -1,6 +1,8 @@
# NGINX without Root # NGINX without Root
This is a mini project that I'll find any workaround for building NGINX without relies on Root Required Dependencies as much as possible This is a mini project that I'll find any workaround for building NGINX without relies on Root Required Dependencies as much as possible
The main point of the project is to configure Nginx to just work without root. So many modules are missing, but you can add them yourself.
# Setup Script # Setup Script
### using Curl ### using Curl
@ -11,12 +13,4 @@ curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/build.sh | bas
### using Wget ### using Wget
``` ```
wget https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/build.sh | ./build.sh wget https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/build.sh | ./build.sh
```
# Root Required
I can't figure workaround for these dependencies
```
Openssl (unsuccessful build when using self compiled openssl)
- libssl-dev
``` ```

View File

@ -7,13 +7,13 @@ mkdir ~/nginx_build && cd ~/nginx_build
# Get zlib # Get zlib
cd ~/nginx_build cd ~/nginx_build
if [[ -f "/usr/bin/curl" ]]; then if [[ -f "/usr/bin/curl" ]]; then
curl -L https://zlib.net/zlib-1.2.12.tar.gz --output zlib-1.2.12.tar.gz curl -L https://zlib.net/zlib-1.2.13.tar.gz --output zlib-1.2.13.tar.gz
elif [[ -f "/usr/bin/wget" ]]; then elif [[ -f "/usr/bin/wget" ]]; then
wget https://zlib.net/zlib-1.2.12.tar.gz -O zlib-1.2.12.tar.gz wget https://zlib.net/zlib-1.2.13.tar.gz -O zlib-1.2.13.tar.gz
else else
echo "Required Dependencies for download zlib doesn't exist" echo "Required Dependencies for download zlib doesn't exist"
fi fi
tar xzf zlib-1.2.12.tar.gz tar xzf zlib-1.2.13.tar.gz
# Get pcre # Get pcre
cd ~/nginx_build cd ~/nginx_build
@ -26,17 +26,28 @@ else
fi fi
tar xzf pcre-8.45.tar.gz tar xzf pcre-8.45.tar.gz
# Build Openssl
cd ~/nginx_build
if [[ -f "/usr/bin/curl" ]]; then
curl -L https://www.openssl.org/source/openssl-3.0.7.tar.gz --output openssl-3.0.7.tar.gz
elif [[ -f "/usr/bin/wget" ]]; then
wget https://www.openssl.org/source/openssl-3.0.7.tar.gz -O openssl-3.0.7.tar.gz
else
echo "Required Dependencies for download Nginx doesn't exist"
fi
tar xzf openssl-3.0.7.tar.gz
# Build Nginx # Build Nginx
cd ~/nginx_build cd ~/nginx_build
if [[ -f "/usr/bin/curl" ]]; then if [[ -f "/usr/bin/curl" ]]; then
curl -L https://nginx.org/download/nginx-1.23.1.tar.gz --output nginx-1.23.1.tar.gz curl -L https://nginx.org/download/nginx-1.23.2.tar.gz --output nginx-1.23.2.tar.gz
elif [[ -f "/usr/bin/wget" ]]; then elif [[ -f "/usr/bin/wget" ]]; then
wget https://nginx.org/download/nginx-1.23.1.tar.gz -O nginx-1.23.1.tar.gz wget https://nginx.org/download/nginx-1.23.2.tar.gz -O nginx-1.23.2.tar.gz
else else
echo "Required Dependencies for download Nginx doesn't exist" echo "Required Dependencies for download Nginx doesn't exist"
fi fi
tar xzf nginx-1.23.1.tar.gz && cd nginx-1.23.1 tar xzf nginx-1.23.2.tar.gz && cd nginx-1.23.2
if [[ -f "/usr/bin/curl" ]]; then if [[ -f "/usr/bin/curl" ]]; then
curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/configure.sh | bash curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/configure.sh | bash

View File

@ -13,6 +13,7 @@ User_home=~
--http-proxy-temp-path=$User_home/nginx-settings/temp/proxy \ --http-proxy-temp-path=$User_home/nginx-settings/temp/proxy \
--http-scgi-temp-path=$User_home/nginx-settings/temp/scgi \ --http-scgi-temp-path=$User_home/nginx-settings/temp/scgi \
--http-uwsgi-temp-path=$User_home/nginx-settings/temp/uwsgi \ --http-uwsgi-temp-path=$User_home/nginx-settings/temp/uwsgi \
--with-openssl=$Build_directory/openssl-3.0.7 \
--with-compat \ --with-compat \
--with-debug \ --with-debug \
--with-http_ssl_module \ --with-http_ssl_module \
@ -38,4 +39,4 @@ User_home=~
--with-stream_ssl_module \ --with-stream_ssl_module \
--with-stream_ssl_preread_module \ --with-stream_ssl_preread_module \
--with-pcre=$Build_directory/pcre-8.45 \ --with-pcre=$Build_directory/pcre-8.45 \
--with-zlib=$Build_directory/zlib-1.2.12 --with-zlib=$Build_directory/zlib-1.2.13