init
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
prefix="$1"
|
||||
|
||||
if [ -z "$prefix" ]; then
|
||||
prefix="$(pwd)/nginx"
|
||||
fi
|
||||
|
||||
mkdir -p "$prefix"
|
||||
|
||||
echo "Downloading nginx to $tmpdir"
|
||||
wget -qO- http://nginx.org/download/nginx-1.21.6.tar.gz | tar -xzv -C "$tmpdir"
|
||||
|
||||
pushd "$tmpdir/nginx-1.21.6"
|
||||
|
||||
echo "Configuring nginx"
|
||||
./configure \
|
||||
--prefix="$prefix" \
|
||||
--with-http_ssl_module --with-threads --with-http_realip_module
|
||||
|
||||
echo "Compiling nginx"
|
||||
make -j "$(nproc)"
|
||||
|
||||
echo "Installing nginx"
|
||||
make install
|
||||
|
||||
popd # "$tmpdir/nginx-1.21.6"
|
||||
|
||||
echo "Cleaning up"
|
||||
rm -rf "$tmpdir"
|
||||
Reference in New Issue
Block a user