Skip to content

Instantly share code, notes, and snippets.

@hgc81538
Created July 9, 2024 07:37
Show Gist options
  • Save hgc81538/fe7bb8b987adc3e4b013867f1ed2da77 to your computer and use it in GitHub Desktop.
Save hgc81538/fe7bb8b987adc3e4b013867f1ed2da77 to your computer and use it in GitHub Desktop.
debian 12 installation
- set "umask 027", alias e.g. ll, l in ~/.bashrc
- check timezone and ntp (timedatectl)
- enable swap
- apt update && apt upgrade
- apt install logrotate
- apt install apache2
- check mpm, a2query -M
- check vhost, apache2ctl -S
- set html to /var/www/<domain name>/html
- set log to /var/www/<domain name>/log/apache2
- disable index listing
- enable .htaccess
- hide version
- a2enmod rewrite headers http2 ssl expires
- a2enmod brotli
- apt install php8.2-fpm php8.2-mysql php8.2-curl php8.2-gd php8.2-xml php8.2-mbstring php8.2-intl php8.2-zip php8.2-mcrypt php8.2-bcmath
- apt install php8.2-imagick
- adduser <username>
- usermod -g www-data <username>
ref: https://unix.stackexchange.com/a/325576
- disable /etc/php/8.2/fpm/pool.d/www.conf
- pool group www-data
- change pm.max_children
- set error log to /var/www/<domain name>/log/php8.2-fpm
- set umask for php-fpm
Add `/etc/systemd/system/<php-fpm service name>.d/umask.conf` with content like:
```
[Service]
UMask=0027
```
ref: https://serverfault.com/questions/694396/proper-way-of-setting-umask-for-php-fpm-on-debian-ubuntu
- process_control_timeout = 10
- increase max post size
- apt install mariadb-server
- mysql_secure_installation
- logrotate
- apt install unattended-upgrades
- dpkg-reconfigure -plow unattended-upgrades
- needrestart
- https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/
- https://www.mysqltutorial.org/mysql-administration/innodb_buffer_pool_size/
- https://sqlconjuror.com/mariadb-mysql-table-open-cache-table-definition-cache/
- https://releem.com/docs/mysql-performance-tuning/table_definition_cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment