Skip to content

Commit ec4110d

Browse files
committed
Update README and minor code update
1 parent 28a3fdc commit ec4110d

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Compile Nginx from Source with Brotli Support
22

3-
This little script compiles Nginx from source with [Brotli](https://opensource.googleblog.com/2015/09/introducing-brotli-new-compression.html) support.
3+
This little script compiles Nginx from source with [Brotli](https://opensource.googleblog.com/2015/09/introducing-brotli-new-compression.html) support. In particular, it uses [https://github.com/eustas/ngx_brotli/](https://github.com/eustas/ngx_brotli/) to compile Nginx.
44

55
## Supported Platforms
66

77
- Debian 9
88
- Ubuntu 16.04 and Ubuntu 18.04
99

10+
## Tested Nginx versions
11+
12+
- Stable versions: 1.16
13+
- Mainline versions: 1.17
14+
1015
## What does it do?
1116

1217
It compiles Nginx from source and creates two `.deb` files...
@@ -18,8 +23,15 @@ Both files depend on each other. So, one can not work, if other is not installle
1823

1924
## How to install?
2025

21-
Once you have the `.deb` files, install them using `sudo dpkg -i nginx*.deb`.
26+
Run the script as `root` and the script tries to install the `.deb` files automatically, replacing the existing Nginx installation.
27+
28+
Or you can install manually using `sudo dpkg -i nginx*.deb`, once you have the `.deb` files at the end of the execution of the script.
2229

2330
## How to compile?
2431

25-
Download the script, go through what it does and execute it under the user with sudo privilege. It may take a while to compile depending on the memory and CPU in your server.
32+
Download the script, go through what it does (note: never trust any script on the internet) and execute it as root user. It may take a while to compile depending on the memory and CPU in your server.
33+
34+
## Contributors and Sources
35+
36+
* [Rafał Michalski](https://github.com/PLumowina) - provided patch for gcc-8 and brought a number of best practices to this script (yet to merge his changes, though).
37+
* [Eugene Kliuchnikov](https://github.com/eustas) - this script is based on his work at [https://github.com/eustas/ngx_brotli](https://github.com/eustas/ngx_brotli).

brotli.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
# version 1.1
4+
35
# use it while developing / testing.
46
# you may use it in production as well.
57
# set -o errexit -o pipefail -o noclobber -o nounset
@@ -113,7 +115,7 @@ dpkg -i nginx*.deb
113115

114116
# take a backup
115117
[ ! -d ~/backups/ ] && mkdir ~/backups
116-
mv nginx*.deb ~/backups/
118+
cp nginx*.deb ~/backups/nginx-$(date +%F)/
117119

118120
# remove all the sources and apt sources file
119121
cd ~/

0 commit comments

Comments
 (0)