PhyrePanel/compilators/debian/nginx-compile.sh
Bozhidar Slaveykov 7f80b23fa9 update
2023-11-25 02:49:27 +02:00

38 lines
844 B
Bash

#!/bin/bash
MAIN_DIR=$(pwd)
# Install dependencies
apt install build-essential dpkg-dev debhelper autotools-dev libgeoip-dev libssl-dev libpcre3-dev zlib1g-dev
#Download nginx source
wget http://nginx.org/download/nginx-1.20.0.tar.gz
tar -zxvf nginx-1.20.0.tar.gz
cd nginx-1.20.0
# Configure nginx
sudo ./configure --prefix=/usr/local/alphax/nginx
sudo make
sudo make install
sudo mkdir alphax-nginx
cd alphax-nginx
sudo mkdir DEBIAN
sudo mkdir usr
sudo mkdir usr/local
sudo mkdir usr/local/alphax
sudo mv /usr/local/alphax/nginx/sbin/nginx /usr/local/alphax/nginx/sbin/alpha-nginx
sudo mv /usr/local/alphax/nginx usr/local/alphax
sudo cp $MAIN_DIR/control DEBIAN
cd ../
sudo dpkg-deb --build alphax-nginx
sudo dpkg --info alphax-nginx.deb
sudo dpkg --contents alphax-nginx.deb
sudo mv alphax-nginx.deb $MAIN_DIR/dist
cd $MAIN_DIR
ls