nginx-noroot : Moved to Dedicated Repository
This commit is contained in:
parent
d8a172c331
commit
cadc794f4d
@ -1,22 +0,0 @@
|
||||
# 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
|
||||
|
||||
# Setup Script
|
||||
|
||||
### using Curl
|
||||
```
|
||||
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx-noroot/build.sh | bash
|
||||
```
|
||||
|
||||
### using Wget
|
||||
```
|
||||
wget https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx-noroot/build.sh | ./build.sh
|
||||
```
|
||||
|
||||
# Root Required
|
||||
I can't figure workaround for these dependencies
|
||||
|
||||
```
|
||||
Openssl (unsuccessful build when using self compiled openssl)
|
||||
- libssl-dev
|
||||
```
|
@ -1,57 +0,0 @@
|
||||
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.12.tar.gz --output zlib-1.2.12.tar.gz
|
||||
elif [[ -f "/usr/bin/wget" ]]; then
|
||||
wget https://zlib.net/zlib-1.2.12.tar.gz -O zlib-1.2.12.tar.gz
|
||||
else
|
||||
echo "Required Dependencies for download zlib doesn't exist"
|
||||
fi
|
||||
tar xzf zlib-1.2.12.tar.gz
|
||||
|
||||
# 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
|
||||
|
||||
# Build Nginx
|
||||
cd ~/nginx_build
|
||||
if [[ -f "/usr/bin/curl" ]]; then
|
||||
curl -L https://nginx.org/download/nginx-1.21.6.tar.gz --output nginx-1.21.6.tar.gz
|
||||
elif [[ -f "/usr/bin/wget" ]]; then
|
||||
wget https://nginx.org/download/nginx-1.21.6.tar.gz -O nginx-1.21.6.tar.gz
|
||||
else
|
||||
echo "Required Dependencies for download Nginx doesn't exist"
|
||||
fi
|
||||
|
||||
tar xzf nginx-1.21.6.tar.gz && cd nginx-1.21.6
|
||||
|
||||
if [[ -f "/usr/bin/curl" ]]; then
|
||||
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx-noroot/configure.sh | bash
|
||||
elif [[ -f "/usr/bin/wget" ]]; then
|
||||
wget https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx-noroot/configure.sh | ./configure.sh
|
||||
else
|
||||
echo "Required Dependencies for download configure script doesn't exist"
|
||||
fi
|
||||
|
||||
make && make install
|
||||
|
||||
##
|
||||
##
|
||||
## Additional Part.
|
||||
##
|
||||
##
|
||||
|
||||
mkdir -p ~/nginx-settings/temp
|
@ -1,41 +0,0 @@
|
||||
Build_directory=~/nginx_build
|
||||
User_home=~
|
||||
|
||||
./configure \
|
||||
--prefix=$User_home/nginx-settings \
|
||||
--pid-path=run/nginx.pid \
|
||||
--conf-path=nginx.conf \
|
||||
--http-log-path=logs/access.log \
|
||||
--error-log-path=logs/error.log \
|
||||
--modules-path=modules \
|
||||
--http-client-body-temp-path=$User_home/nginx-settings/temp/body \
|
||||
--http-fastcgi-temp-path=$User_home/nginx-settings/temp/fastcgi \
|
||||
--http-proxy-temp-path=$User_home/nginx-settings/temp/proxy \
|
||||
--http-scgi-temp-path=$User_home/nginx-settings/temp/scgi \
|
||||
--http-uwsgi-temp-path=$User_home/nginx-settings/temp/uwsgi \
|
||||
--with-compat \
|
||||
--with-debug \
|
||||
--with-http_ssl_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_dav_module \
|
||||
--with-http_slice_module \
|
||||
--with-threads \
|
||||
--with-http_addition_module \
|
||||
--with-http_flv_module \
|
||||
--with-http_gunzip_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_mp4_module \
|
||||
--with-http_random_index_module \
|
||||
--with-http_secure_link_module \
|
||||
--with-http_sub_module \
|
||||
--with-mail=dynamic \
|
||||
--with-mail_ssl_module \
|
||||
--with-stream \
|
||||
--with-stream_realip_module \
|
||||
--with-stream_ssl_module \
|
||||
--with-stream_ssl_preread_module \
|
||||
--with-pcre=$Build_directory/pcre-8.45 \
|
||||
--with-zlib=$Build_directory/zlib-1.2.12
|
@ -1 +0,0 @@
|
||||
~/nginx-settings/sbin/nginx -g 'daemon on; master_process on;' -s reload
|
@ -1,2 +0,0 @@
|
||||
~/nginx-settings/sbin/nginx -t -q -g 'daemon on; master_process on;'
|
||||
~/nginx-settings/sbin/nginx -g 'daemon on; master_process on;'
|
@ -1,24 +0,0 @@
|
||||
STOPDAEMON=`which start-stop-daemon`
|
||||
|
||||
if [ "$STOPDAEMON" == "" ]; then
|
||||
if [[ "$STARTSTOPLOCATE" != "" ]]; then
|
||||
STOPDAEMON=$STARTSTOPLOCATE
|
||||
elif [[ -f "/usr/sbin/start-stop-daemon" ]]; then
|
||||
STOPDAEMON=/usr/sbin/start-stop-daemon
|
||||
elif [[ -f "/usr/bin/start-stop-daemon" ]]; then
|
||||
STOPDAEMON=/usr/bin/start-stop-daemon
|
||||
elif [[ -f "/sbin/start-stop-daemon" ]]; then
|
||||
STOPDAEMON=/sbin/start-stop-daemon
|
||||
elif [[ -f "/usr/local/sbin/start-stop-daemon" ]]; then
|
||||
STOPDAEMON=/usr/local/sbin/start-stop-daemon
|
||||
elif [[ -f "/usr/local/bin/start-stop-daemon" ]]; then
|
||||
STOPDAEMON=/usr/local/bin/start-stop-daemon
|
||||
else
|
||||
echo "Script Can't find the location of start-stop-daemon"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
$STOPDAEMON --quiet --stop --retry QUIT/5 --pidfile ~/nginx-settings/run/nginx.pid
|
Loading…
Reference in New Issue
Block a user