mirror of
https://github.com/minoplhy/nginx-noroot.git
synced 2024-11-22 17:26:51 +00:00
nginx-noroot : support self-compile OpenSSL and bump various software version
This commit is contained in:
parent
dcee91d7bc
commit
982f0775ed
10
README.md
10
README.md
@ -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
|
||||||
@ -12,11 +14,3 @@ curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/build.sh | bas
|
|||||||
```
|
```
|
||||||
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
|
|
||||||
```
|
|
23
build.sh
23
build.sh
@ -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
|
||||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user