30 lines
531 B
Bash
Executable File
30 lines
531 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
tmpdir="$(mktemp -d -p .)"
|
|
prefix="$(pwd)/nginx"
|
|
|
|
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"
|