Discover Centmin Mod today
Register Now

Sysadmin How to use brotli.sh ?

Discussion in 'System Administration' started by Dnyan, May 6, 2018.

  1. Dnyan

    Dnyan Member

    106
    24
    18
    Sep 16, 2017
    Ratings:
    +36
    Local Time:
    6:46 PM
    1.17.8
    10.3.22

    On writing first command
    /root/tools/brotli.sh /home/nginx/domains/yesitsmydomain.com/public/styles/uix/

    i get following error message.
    -bash: /root/tools/brotli.sh: No such file or directory

     
  2. eva2000

    eva2000 Administrator Staff Member

    51,696
    11,941
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,432
    Local Time:
    11:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    ;)
     
  3. Dnyan

    Dnyan Member

    106
    24
    18
    Sep 16, 2017
    Ratings:
    +36
    Local Time:
    6:46 PM
    1.17.8
    10.3.22
    how to make *.br or *.gz compressed files or those static file are present in directory?
     
  4. eva2000

    eva2000 Administrator Staff Member

    51,696
    11,941
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,432
    Local Time:
    11:16 PM
    Nginx 1.25.x
    MariaDB 10.x
  5. Dnyan

    Dnyan Member

    106
    24
    18
    Sep 16, 2017
    Ratings:
    +36
    Local Time:
    6:46 PM
    1.17.8
    10.3.22
    i tried that but i get following error on command

    -bash: /root/tools/brotli.sh: No such file or directory
     
  6. eva2000

    eva2000 Administrator Staff Member

    51,696
    11,941
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,432
    Local Time:
    11:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    need to download brotli.sh script file to /root/tools directory

    Code (Text):
    mkdir -p /root/tools
    cd /root/tools
    wget -O brotli.sh https://github.com/centminmod/brotli.sh/raw/master/brotli.sh
    chmod +x brotli.sh
    


    see instructions and config at centminmod/brotli.sh

    i.e.

    With GZIP=y and TIMEDSTATS=y and DEBUG=y running brotli.sh from within /root/tools
    Code (Text):
    ./brotli.sh /usr/local/nginx/html/brotlitest2
    [br compress css 121200 bytes]: bro --quality 11 --force --input /usr/local/nginx/html/brotlitest2/bootstrap min.css --output /usr/local/nginx/html/brotlitest2/bootstrap min.css.br
    [br compress stats]: real: 0.14s user: 0.14s sys: 0.00s cpu: 99% maxmem: 7540 KB cswaits: 1
    [br compression ratio]: 7.50
    [gz compress css 121200 bytes]: pigz -11k -f /usr/local/nginx/html/brotlitest2/bootstrap min.css
    [gz compress stats]: real: 0.41s user: 0.39s sys: 0.02s cpu: 100% maxmem: 5124 KB cswaits: 8
    [gz compression ratio]: 6.61
    [br compress css 121200 bytes]: bro --quality 11 --force --input /usr/local/nginx/html/brotlitest2/bootstrap.min.css --output /usr/local/nginx/html/brotlitest2/bootstrap.min.css.br
    [br compress stats]: real: 0.14s user: 0.14s sys: 0.00s cpu: 99% maxmem: 7536 KB cswaits: 1
    [br compression ratio]: 7.50
    [gz compress css 121200 bytes]: pigz -11k -f /usr/local/nginx/html/brotlitest2/bootstrap.min.css
    [gz compress stats]: real: 0.41s user: 0.38s sys: 0.02s cpu: 99% maxmem: 5124 KB cswaits: 8
    [gz compression ratio]: 6.61
    [br compress js 37045 bytes]: bro --quality 11 --force --input /usr/local/nginx/html/brotlitest2/bootstrap.min.js --output /usr/local/nginx/html/brotlitest2/bootstrap.min.js.br
    [br compress stats]: real: 0.04s user: 0.03s sys: 0.00s cpu: 97% maxmem: 3316 KB cswaits: 0
    [br compression ratio]: 4.24
    [gz compress js 37045 bytes]: pigz -11k -f /usr/local/nginx/html/brotlitest2/bootstrap.min.js
    [gz compress stats]: real: 0.09s user: 0.08s sys: 0.00s cpu: 100% maxmem: 3084 KB cswaits: 7
    [gz compression ratio]: 3.90


    i would test on test directory of images until you get familiar with brotli.sh
     
  7. Dnyan

    Dnyan Member

    106
    24
    18
    Sep 16, 2017
    Ratings:
    +36
    Local Time:
    6:46 PM
    1.17.8
    10.3.22

    i created brotli-config.ini located in same directory as brotli.sh

    added GZIP=y and TIMEDSTATS=y and DEBUG=y saved it there.

    after that i run command

    ./brotli.sh /usr/local/nginx/html/brotlitest2

    after this i get following error

    /usr/bin/find: `/usr/local/nginx/html/brotlitest2': No such file or directory
    /usr/bin/find: `/usr/local/nginx/html/brotlitest2': No such file or directory

    do i need to make directory before running command.

    i am sorry for lot of questions but i am no technical so dont understand much on my own.

    Thank You
     
  8. eva2000

    eva2000 Administrator Staff Member

    51,696
    11,941
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,432
    Local Time:
    11:16 PM
    Nginx 1.25.x
    MariaDB 10.x