CentOS 8 PHP 7.4 FPM 설치 (remirepo)

(Last Updated On: September 13, 2020)

CentOS 7 PHP-FPM : https://blog.kerus.net/1645/install-php-7-4-fpm-remirepo-on-centos

1 Enable Remirepo

sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

2 Enable PHP 7.4

dnf module reset php
dnf module enable php:remi-7.4

3 Install PHP FPM

dnf install php-fpm

remirepo를 사용해 설치하고 있는지 확인한다.

4 Install Additional Libraries

dnf -y install \
php-cli \
php-redis \
php-brotli \
php-intl \
php-gd \
php-gmp \
php-imap \
php-bcmath \
php-json \
php-mbstring \
php-mysqlnd \
php-odbc \
php-opcache \
php-memcached \
php-tidy \
php-pdo \
php-pdo-dblib \
php-pear \
php-pgsql \
php-process \
php-pecl-apcu \
php-pecl-geoip \
php-pecl-imagick \
php-pecl-hrtime \
php-pecl-json \
php-pecl-memcache \
php-pecl-mongodb \
php-pecl-rar \
php-pecl-pq \
php-pecl-redis4 \
php-pecl-yaml \
php-pecl-zip

5 Add Autostart

systemctl enable php-fpm
systemctl start php-fpm

(Optional) Memcached / Redis

dnf -y install memcached redis
systemctl enable memcached redis
systemctl start memcached redis

CentOS 8 기본 repo의 memcached는 127.0.0.1 로 소켓 LISTEN 하는 것을 확인하였다.