sudo apt-get -y install nginx curl libcurl3 libcurl3-dev git redis-server
# add php-7.x source list by [Ondřej Surý](https://github.com/oerdnj)
sudo add-apt-repository ppa:ondrej/php
sudo apt install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
# Update index
sudo apt-get update
# Install php7.2-fpm with needed extensions
sudo apt-get install php7.2-fpm php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-mysql php7.2-recode php7.2-tidy php7.2-dev php7.2-intl php7.2-snmp php7.2-curl php7.2-phpdbg php7.2-mbstring php7.2-zip php7.2-soap php7.2-xml
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
sudo apt-get install libmagickwand-dev imagemagick
sudo pecl install imagick
You should add extension=imagick.so
to php.ini (/etc/php/7.2/fpm/php.ini
)
sudo pecl install xdebug
You should add "zend_extension=/usr/lib/php/XXXXXXXX/xdebug.so" to php.ini
Add to php.ini (/etc/php/7.2/fpm/php.ini
):
[xdebug]
zend_extensions={$PATH_ABOVE}
xdebug.default_enable=1
xdebug.idekey=PHPSTORM
xdebug.remote_enable=1
xdebug.remote_port=18000
xdebug.remote_connect_back=1
Restart services
If there are problems with the locale
Set the correct language locale