Giter Site home page Giter Site logo

mog54 / nginx-autoinstall Goto Github PK

View Code? Open in Web Editor NEW

This project forked from angristan/nginx-autoinstall

0.0 0.0 0.0 369 KB

Compile NGINX from source with custom modules and patches on Debian and Ubuntu

License: GNU General Public License v3.0

Shell 99.31% Dockerfile 0.69%

nginx-autoinstall's Introduction

nginx-autoinstall

Compile and install NGINX from source with optional features, modules and patches.

Compatibility

  • Debian 9 and later
  • Ubuntu 16.04 and later

The script might work on ARM-based architectures, but it's only being regularly tested against x86_64 with GitHub Actions.

Features

  • Latest mainline or stable version, from source
  • Optional modules and patches
  • Custom nginx.conf (default does not work)
  • Init script for systemd (not provided by default)
  • Logrotate conf (not provided by default)
  • Block Nginx installation from APT using pinning, to prevent conflicts

Optional modules/features

Cache Modules

Usage

Just download and execute the script :

wget https://raw.githubusercontent.com/angristan/nginx-autoinstall/master/nginx-autoinstall.sh
chmod +x nginx-autoinstall.sh
./nginx-autoinstall.sh

You will be able to:

  • Install NGINX
  • Update NGINX (It will install it again and overwrite current files and/or modules.)
  • Uninstall NGINX with optional cleanup
  • Self-update the script

Just follow the question!

You can check configuration examples for the custom modules.

Headless use

You can run the script without the prompts with the option HEADLESS set to y. This allows for automated install and scripting. This is what is used to test the script with GitHub Actions.

HEADLESS=y ./nginx-autoinstall.sh

To install Nginx mainline with Brotli:

HEADLESS=y \
NGINX_VER=MAINLINE \
BROTLI=y \
./nginx-autoinstall.sh

To install with Geoip:

HEADLESS=y \
GEOIP=y \
GEOIP2_ACCOUNT_ID=YOUR_ACCOUNT_ID_HERE \
GEOIP2_LICENSE_KEY=YOUR_LICENSE_KEY_HERE \
./nginx-autoinstall.sh

To uninstall Nginx and remove the logs and configuration files:

HEADLESS=y \
OPTION=2 \
RM_CONF=y \
RM_LOGS=y \
./nginx-autoinstall.sh

All the default variables are set at the beginning of the script.

LICENSE

GPL v3.0

nginx-autoinstall's People

Contributors

angristan avatar dependabot[bot] avatar dnohr avatar droplinxuser avatar ewaldbenes avatar jomo avatar karelbasta avatar maximemichaud avatar novakin avatar pgrimaud avatar punkeel avatar r33int avatar randshell avatar reagn0x avatar shirt-dev avatar siamnews avatar softcreatr avatar theo546 avatar tmiland avatar treyssatvincent avatar xopez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.