nginx-noroot/build.sh

69 lines
2.0 KiB
Bash
Raw Normal View History

2022-06-11 13:32:47 +00:00
Build_directory=~/nginx_build
User_home=~
rm -rf ~/nginx_build
mkdir ~/nginx_build && cd ~/nginx_build
# Get zlib
cd ~/nginx_build
if [[ -f "/usr/bin/curl" ]]; then
curl -L https://zlib.net/zlib-1.2.13.tar.gz --output zlib-1.2.13.tar.gz
2022-06-11 13:32:47 +00:00
elif [[ -f "/usr/bin/wget" ]]; then
wget https://zlib.net/zlib-1.2.13.tar.gz -O zlib-1.2.13.tar.gz
2022-06-11 13:32:47 +00:00
else
echo "Required Dependencies for download zlib doesn't exist"
fi
tar xzf zlib-1.2.13.tar.gz
2022-06-11 13:32:47 +00:00
# Get pcre
cd ~/nginx_build
if [[ -f "/usr/bin/curl" ]]; then
curl -L https://downloads.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz --output pcre-8.45.tar.gz
elif [[ -f "/usr/bin/wget" ]]; then
wget https://downloads.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz -O pcre-8.45.tar.gz
else
echo "Required Dependencies for download pcre doesn't exist"
fi
tar xzf pcre-8.45.tar.gz
2022-11-30 09:32:03 +00:00
# Get 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
2022-11-30 09:32:03 +00:00
echo "Required Dependencies for download OpenSSL doesn't exist"
fi
tar xzf openssl-3.0.7.tar.gz
2022-06-11 13:32:47 +00:00
# Build Nginx
cd ~/nginx_build
if [[ -f "/usr/bin/curl" ]]; then
curl -L https://nginx.org/download/nginx-1.23.2.tar.gz --output nginx-1.23.2.tar.gz
2022-06-11 13:32:47 +00:00
elif [[ -f "/usr/bin/wget" ]]; then
wget https://nginx.org/download/nginx-1.23.2.tar.gz -O nginx-1.23.2.tar.gz
2022-06-11 13:32:47 +00:00
else
echo "Required Dependencies for download Nginx doesn't exist"
fi
tar xzf nginx-1.23.2.tar.gz && cd nginx-1.23.2
2022-06-11 13:32:47 +00:00
if [[ -f "/usr/bin/curl" ]]; then
curl https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/configure.sh | bash
elif [[ -f "/usr/bin/wget" ]]; then
2022-11-30 09:00:21 +00:00
wget https://raw.githubusercontent.com/minoplhy/nginx-noroot/main/configure.sh
chmod +x configure.sh && ./configure.sh
2022-06-11 13:32:47 +00:00
else
echo "Required Dependencies for download configure script doesn't exist"
fi
make && make install
##
##
## Additional Part.
##
##
mkdir -p ~/nginx-settings/temp