Skip to content

Instantly share code, notes, and snippets.

@daymien
Last active August 31, 2020 21:37
Show Gist options
  • Save daymien/3ebb7beba5e4cdf063dad1a233bbe84b to your computer and use it in GitHub Desktop.
Save daymien/3ebb7beba5e4cdf063dad1a233bbe84b to your computer and use it in GitHub Desktop.
# install deps
apt update && apt install libxpm-dev
phpbrew update
phpbrew install -j $((nproc + 1)) 7.4 +default +json +gd +ctype +dom +openssl +iconv +zip +xml +hash +mbstring +fpm +mysql +intl
phpbrew ext install redis stable
phpbrew ext install opcache stable
phpbrew ext install gd -- \
--enable-gd-native-ttf \
--with-gd=shared \
--with-freetype-dir=/usr/include/freetype2/freetype \
--with-jpeg-dir=/usr \
--with-libdir=lib/x86_64-linux-gnu \
--with-png-dir=/usr \
--with-vpx-dir=/usr \
--with-xpm-dir=/usr
# /opt/phpbrew/php/php-7.4.x/etc/php.ini
zlib.output_compression = On
max_execution_time = 900
max_input_time = 120
memory_limit = 2048M
post_max_size = 512M
upload_max_filesize = 64M
opcache.memory_consumption=512
#/opt/phpbrew/php/php-7.4.x/etc/php-fpm.d/www.conf
user = www-data
group = www-data
listen.owner = www-data
listen.group = www-data
pm.max_children = 128
pm.start_servers = 32
pm.min_spare_servers = 32
pm.max_spare_servers = 64
pm.max_requests = 2048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment