nginx_build_script : specify directory, it was very confused to me :c

This commit is contained in:
minoplhy 2023-10-31 02:28:36 +07:00
parent 25f21bea0c
commit 293e3f1a2b
Signed by: minoplhy
GPG Key ID: 41D406044E2434BF

View File

@ -3,7 +3,7 @@
cd ~/ cd ~/
rm -rf nginx_scriptbox rm -rf nginx_scriptbox
curl -sSL https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/packages.sh | bash curl -sSL https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/packages.sh | bash
mkdir nginx_scriptbox && cd nginx_scriptbox mkdir ~/nginx_scriptbox && cd ~/nginx_scriptbox
# Install Golang # Install Golang
GO_VERSION=1.20.5 GO_VERSION=1.20.5
@ -15,25 +15,25 @@ export PATH=$PATH:/usr/local/go/bin
ln -s /usr/local/go/bin /usr/bin/go ln -s /usr/local/go/bin /usr/bin/go
hg clone -b default https://hg.nginx.org/nginx hg clone -b default https://hg.nginx.org/nginx
git clone --depth=1 https://github.com/google/boringssl git clone --depth=1 https://github.com/google/boringssl ~/nginx_scriptbox/boringssl
cd boringssl cd ~/nginx_scriptbox/boringssl
mkdir build && cd build && cmake .. && make mkdir ~/nginx_scriptbox/boringssl/build && cd ~/nginx_scriptbox/boringssl/build && cmake .. && make
cd ../..
# ModSecurity Part # ModSecurity Part
git clone --depth=1 https://github.com/SpiderLabs/ModSecurity cd ~/nginx_scriptbox
cd ModSecurity git clone --depth=1 https://github.com/SpiderLabs/ModSecurity ~/nginx_scriptbox/ModSecurity
cd ~/nginx_scriptbox/ModSecurity
git submodule init git submodule init
git submodule update git submodule update
./build.sh ./build.sh
./configure ./configure
make make
sudo make install sudo make install
cd .. # Directory should be -> ~/nginx_scriptbox
# lua-nginx-module buildup part (Big Part) # lua-nginx-module buildup part (Big Part)
# #
mkdir nginx-lua && cd nginx-lua cd ~/nginx_scriptbox
mkdir ~/nginx_scriptbox/nginx-lua && cd ~/nginx_scriptbox/nginx-lua
mkdir -p /opt/nginx-lua-module/ mkdir -p /opt/nginx-lua-module/
git clone https://github.com/openresty/lua-resty-core git clone https://github.com/openresty/lua-resty-core
git clone https://github.com/openresty/lua-resty-lrucache git clone https://github.com/openresty/lua-resty-lrucache
@ -41,15 +41,15 @@ git clone https://github.com/openresty/luajit2
cd luajit2 && make install PREFIX=/opt/nginx-lua-module/luajit2 && cd .. cd luajit2 && make install PREFIX=/opt/nginx-lua-module/luajit2 && cd ..
cd lua-resty-core && make install PREFIX=/opt/nginx-lua-module/ && cd .. cd lua-resty-core && make install PREFIX=/opt/nginx-lua-module/ && cd ..
cd lua-resty-lrucache && make install PREFIX=/opt/nginx-lua-module/ && cd .. # Directory should be -> ~/nginx_scriptbox cd lua-resty-lrucache && make install PREFIX=/opt/nginx-lua-module/ && cd ..
export LUAJIT_LIB=/opt/nginx-lua-module/luajit2/lib export LUAJIT_LIB=/opt/nginx-lua-module/luajit2/lib
export LUAJIT_INC=/opt/nginx-lua-module/luajit2/include/luajit-2.1 export LUAJIT_INC=/opt/nginx-lua-module/luajit2/include/luajit-2.1
# Build Nginx # Build Nginx
cd nginx cd ~/nginx_scriptbox/nginx
mkdir mosc && cd mosc && curl -sSL https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/modules.sh | bash && cd .. mkdir ~/nginx_scriptbox/nginx/mosc && cd ~/nginx_scriptbox/nginx/mosc && curl -sSL https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/modules.sh | bash && cd ..
curl -sSL https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/configure.sh | bash && make curl -sSL https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/configure.sh | bash && make
if [[ $Nginx_Install == "yes" ]]; then if [[ $Nginx_Install == "yes" ]]; then