> ## Content Index
> Fetch the complete content index at: https://suitmyself.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Centos8에 PHP 설치하기
- URL: https://suitmyself.com/centos8-php-seolcihagi/
- Published: 2023-05-29T13:24:09.000Z
- Updated: 2026-09-16T03:08:04.000Z
- Author: Benjamin Kim
- Tags: Server, #Import 2026-09-15 05:58

# Centos8에 PHP 설치하기

## PHP 7.4 설치

### EPEL 저장소 추가

```bash
$ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

```

### remi 저장소 추가

WebTatic 은 아직 CentOS 8 을 지원하지 않으므로 remi 저장소를 추가합니다

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

```

### module 활성화

dnf module 명령어로 현재 사용 가능한 php 의 버전을 확인할 수 있습니다.

dnf module

```bash
$ sudo dnf module list php 

Last metadata expiration check: 0:01:22 ago on Tue 05 May 2020 08:44:37 AM EDT.
CentOS-8 - AppStream
Name                            Stream                              Profiles                                             Summary                                         
php                             7.2 [d]                             common [d], devel, minimal                           PHP scripting language                          
php                             7.3 [e]                             common, devel, minimal                               PHP scripting language                          

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                            Stream                              Profiles                                             Summary                                         
php                             remi-7.2                            common [d], devel, minimal                           PHP scripting language                          
php                             remi-7.3                            common [d], devel, minimal                           PHP scripting language                          
php                             remi-7.4                            common [d], devel, minimal                           PHP scripting language  

```

새로 추가된 저장소인 remi 에서 제공하는 remi-7.4 를 설치하면 PHP 7.4 를 사용할 수 있습니다.

### remi-7.4 활성화

먼저 module enable 명령어로 remi 저장소를 활성화해 줍니다.

```bash
$ sudo  dnf module enable php:remi-7.4

```

이제 dnf install 명령으로 php 를 설치하면 활성화된 remi-7.4 의 버전이 설치됩니다.

```bash
$ sudo  dnf install php php-fpm php-intl php-mbstring php-pdo php-xml php-gd php-mysqlnd php-zip

```