Skip to content

Automate NGINX Compilation from Source with Custom Modules and Patches on Debian & Ubuntu

Notifications You must be signed in to change notification settings

AnonVM/Nginx-Installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NGINX Auto Install Script

Easily compile and install NGINX from source with custom features, modules, and patches.

Supported Systems

  • Debian 9 and later
  • Ubuntu 16.04 and later

Key Features

  • Compile the latest mainline or stable NGINX from source.
  • Integrate optional modules and patches.
  • Use a custom nginx.conf for enhanced performance.
  • Include a systemd init script (not provided by default).
  • Configure logrotate for efficient log management.
  • Block APT-based NGINX installations to avoid conflicts.

Optional Modules and Enhancements

How to Use

Download and execute the script to:

  • Install or update NGINX
  • Uninstall with optional cleanup
  • Self-update the script
wget https://raw.githubusercontent.com/AnonVM/Nginx-Installer/main/setup.sh
chmod +x setup.sh
./setup.sh

Check out configuration examples for custom modules.

Headless Mode

For automated installations, run the script in headless mode by setting HEADLESS=y.

HEADLESS=y ./setup.sh

Example commands:

  • Install NGINX with Brotli:
    HEADLESS=y NGINX_VER=MAINLINE BROTLI=y ./setup.sh
  • Install with GeoIP:
    HEADLESS=y GEOIP=y GEOIP2_ACCOUNT_ID=YOUR_ACCOUNT_ID_HERE GEOIP2_LICENSE_KEY=YOUR_LICENSE_KEY_HERE ./setup.sh
  • Uninstall with Cleanup:
    HEADLESS=y OPTION=2 RM_CONF=y RM_LOGS=y ./setup.sh