Skip to content

lopatar/LEMP-Optimizations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimized LEMP stack build stack

** CURRENTLY NOT PRODUCTION READY **

This script is intended to ease building optimized LEMP stack and more using the newest software and libraries.

The script mostly consists of me experimenting with more advanced scripting concepts, please be kind :)

Architecture/CPU specific optimizations are tuned for Raspberry Pi 4B

The script is written in zsh

Usage

git clone https://github.com/lopatar/LEMP-Optimizations.git
cd LEMP-Optimizations

chmod +x install.sh
./install.sh

Configuration

All configuration options are located in config.sh

Software installed

  • NGINX
    • Removing unnecessary modules and focusing strictly on the HTTP part
    • Enabling thread pools
    • Enabling file-aio
    • Prioritizing HTTP3/QUIC
    • Brotli compression
    • Supporting PCRE2 versions higher than officially supported
    • Including hardened TLS configuration
  • MariaDB
    • Newer release than default package
    • Architecture specific optimizations
    • Optimized server configuration
  • PHP-FPM (Installed from deb.sury.org)

Other optimizations

  • OpenSSL/BoringSSL (BoringSSL is not currently supported)
  • Jemalloc (optimized memory allocator preventing heap fragmentation typically observed on long-running software)
  • Cloudflare's optimized fork of zlib
  • Libatomic
  • Leveraging GCC optimization features
  • Creating new tmpfs file-system mounted at /lemp-tmp TODO

Optional software

  • Redis

About

Take advantage of every NGINX optimization capability

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages