본문 바로가기
Linux/서버구축 1.2.3...

(11) 워드프레스를 위한 리눅스 서버 구축 - PHP 최신버전 설치

by aegypius 2021. 4. 20.
728x90
반응형

PHP 7.4 설치


MariaDB와 마찬가지로 PHP의 버전도 워드프레스의 요구조건에 맞춰서 최소 7.4 이상을 설치하자. 물론 얼마전 작성한 [CentOS] PHP 7.4 설치와 완벽하게(?) 중복되는 글이지만 조금 추가되는 내용과 삭제되는 내용이 있기에 다시 정리한다.

전에 작성했던 글에서 PHP 5.2 와 MySQL 5.1을 설치할 때에는 직접 소스를 컴파일했지만 커스터마이징이 필요한 상황이거나 yum, rpm 등의 패키지관리 방식으로 설치가 불가능 경우가 아니라면 불편하게 소스를 컴파일하여 설치할 필요는 없다. 이번에 설치하는 PHP 7.4 역시 YUM을 통해서 설치할 것이다.

[root@webpress /]# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cat.net
 * elrepo: ftp.ne.jp
 * extras: mirrors.cat.net
 * updates: mirrors.cat.net
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-48.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-48.el7 for package: php-5.4.16-48.el7.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.16-48.el7 for package: php-5.4.16-48.el7.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.4.16-48.el7 will be installed
---> Package php-common.x86_64 0:5.4.16-48.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-48.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                  Arch                 Version                        Repository          Size
=======================================================================================================
Installing:
 php                      x86_64               5.4.16-48.el7                  base               1.4 M
Installing for dependencies:
 libzip                   x86_64               0.10.1-8.el7                   base                48 k
 php-cli                  x86_64               5.4.16-48.el7                  base               2.7 M
 php-common               x86_64               5.4.16-48.el7                  base               565 k

Transaction Summary
=======================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 4.7 M
Installed size: 17 M
Is this ok [y/d/N]:

 

CentOS 7의 기본 환경에서는 위와 같이 php를 설치하면 5.4.16버전이 설치된다. yum의 저장소(repository)를 업데이트 해야하는데 간단하게 EPEL Repository와 Remi's RPM Repository를 설치하여 해결하자.


  • CentOS 7에서의 EPEL 설치

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[root@webpress /]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: fastestmirror
epel-release-latest-7.noarch.rpm                                                |  15 kB  00:00:00
Examining /var/tmp/yum-root-KkOEVZ/epel-release-latest-7.noarch.rpm: epel-release-7-13.noarch
Marking /var/tmp/yum-root-KkOEVZ/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-13 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                Arch             Version         Repository                               Size
=======================================================================================================
Installing:
 epel-release           noarch           7-13            /epel-release-latest-7.noarch            25 k

Transaction Summary
=======================================================================================================
Install  1 Package

Total size: 25 k
Installed size: 25 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-13.noarch                                                            1/1
  Verifying  : epel-release-7-13.noarch                                                            1/1

Installed:
  epel-release.noarch 0:7-13

Complete!
[root@webpress /]#

EPEL(Extra Packages for Enterprise Linux)에 대한 자세한 내용은 페도라 프로젝트 를 참고하자.


  • CentOS 7에서의 Remi's RPM repository의 설치

yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm 

[root@webpress /]# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Loaded plugins: fastestmirror
remi-release-7.rpm                                                              |  23 kB  00:00:00
Examining /var/tmp/yum-root-KkOEVZ/remi-release-7.rpm: remi-release-7.9-1.el7.remi.noarch
Marking /var/tmp/yum-root-KkOEVZ/remi-release-7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package remi-release.noarch 0:7.9-1.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                 Arch              Version                    Repository                  Size
=======================================================================================================
Installing:
 remi-release            noarch            7.9-1.el7.remi             /remi-release-7             31 k

Transaction Summary
=======================================================================================================
Install  1 Package

Total size: 31 k
Installed size: 31 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : remi-release-7.9-1.el7.remi.noarch                                                  1/1
  Verifying  : remi-release-7.9-1.el7.remi.noarch                                                  1/1

Installed:
  remi-release.noarch 0:7.9-1.el7.remi

Complete!
[root@webpress /]#

Remi's RPM repository에 대한 자세한 내용은 Remi's RPM repository - Blog를 참고하자.


이제 yum repolist all 명령으로 모든 저장소를 확인해보자. 대략 아래와 같이 출력될 것이다.

[root@webpress /]# yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cat.net
 * elrepo: ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: mirrors.cat.net
 * remi-safe: ftp.riken.jp
 * updates: mirrors.cat.net
repo id                             repo name                                           status
C7.0.1406-base/x86_64               CentOS-7.0.1406 - Base                              disabled
C7.0.1406-centosplus/x86_64         CentOS-7.0.1406 - CentOSPlus                        disabled
C7.0.1406-extras/x86_64             CentOS-7.0.1406 - Extras                            disabled
C7.0.1406-fasttrack/x86_64          CentOS-7.0.1406 - Fasttrack                         disabled
C7.0.1406-updates/x86_64            CentOS-7.0.1406 - Updates                           disabled
C7.1.1503-base/x86_64               CentOS-7.1.1503 - Base                              disabled
C7.1.1503-centosplus/x86_64         CentOS-7.1.1503 - CentOSPlus                        disabled
C7.1.1503-extras/x86_64             CentOS-7.1.1503 - Extras                            disabled
C7.1.1503-fasttrack/x86_64          CentOS-7.1.1503 - Fasttrack                         disabled
C7.1.1503-updates/x86_64            CentOS-7.1.1503 - Updates                           disabled
C7.2.1511-base/x86_64               CentOS-7.2.1511 - Base                              disabled
C7.2.1511-centosplus/x86_64         CentOS-7.2.1511 - CentOSPlus                        disabled
C7.2.1511-extras/x86_64             CentOS-7.2.1511 - Extras                            disabled
C7.2.1511-fasttrack/x86_64          CentOS-7.2.1511 - Fasttrack                         disabled
C7.2.1511-updates/x86_64            CentOS-7.2.1511 - Updates                           disabled
C7.3.1611-base/x86_64               CentOS-7.3.1611 - Base                              disabled
C7.3.1611-centosplus/x86_64         CentOS-7.3.1611 - CentOSPlus                        disabled
C7.3.1611-extras/x86_64             CentOS-7.3.1611 - Extras                            disabled
C7.3.1611-fasttrack/x86_64          CentOS-7.3.1611 - Fasttrack                         disabled
C7.3.1611-updates/x86_64            CentOS-7.3.1611 - Updates                           disabled
C7.4.1708-base/x86_64               CentOS-7.4.1708 - Base                              disabled
C7.4.1708-centosplus/x86_64         CentOS-7.4.1708 - CentOSPlus                        disabled
C7.4.1708-extras/x86_64             CentOS-7.4.1708 - Extras                            disabled
C7.4.1708-fasttrack/x86_64          CentOS-7.4.1708 - Fasttrack                         disabled
C7.4.1708-updates/x86_64            CentOS-7.4.1708 - Updates                           disabled
C7.5.1804-base/x86_64               CentOS-7.5.1804 - Base                              disabled
C7.5.1804-centosplus/x86_64         CentOS-7.5.1804 - CentOSPlus                        disabled
C7.5.1804-extras/x86_64             CentOS-7.5.1804 - Extras                            disabled
C7.5.1804-fasttrack/x86_64          CentOS-7.5.1804 - Fasttrack                         disabled
C7.5.1804-updates/x86_64            CentOS-7.5.1804 - Updates                           disabled
C7.6.1810-base/x86_64               CentOS-7.6.1810 - Base                              disabled
C7.6.1810-centosplus/x86_64         CentOS-7.6.1810 - CentOSPlus                        disabled
C7.6.1810-extras/x86_64             CentOS-7.6.1810 - Extras                            disabled
C7.6.1810-fasttrack/x86_64          CentOS-7.6.1810 - Fasttrack                         disabled
C7.6.1810-updates/x86_64            CentOS-7.6.1810 - Updates                           disabled
C7.7.1908-base/x86_64               CentOS-7.7.1908 - Base                              disabled
C7.7.1908-centosplus/x86_64         CentOS-7.7.1908 - CentOSPlus                        disabled
C7.7.1908-extras/x86_64             CentOS-7.7.1908 - Extras                            disabled
C7.7.1908-fasttrack/x86_64          CentOS-7.7.1908 - Fasttrack                         disabled
C7.7.1908-updates/x86_64            CentOS-7.7.1908 - Updates                           disabled
C7.8.2003-base/x86_64               CentOS-7.8.2003 - Base                              disabled
C7.8.2003-centosplus/x86_64         CentOS-7.8.2003 - CentOSPlus                        disabled
C7.8.2003-extras/x86_64             CentOS-7.8.2003 - Extras                            disabled
C7.8.2003-fasttrack/x86_64          CentOS-7.8.2003 - Fasttrack                         disabled
C7.8.2003-updates/x86_64            CentOS-7.8.2003 - Updates                           disabled
base/7/x86_64                       CentOS-7 - Base                                     enabled: 10,072
base-debuginfo/x86_64               CentOS-7 - Debuginfo                                disabled
base-source/7                       CentOS-7 - Base Sources                             disabled
c7-media                            CentOS-7 - Media                                    disabled
centos-kernel/7/x86_64              CentOS LTS Kernels for x86_64                       disabled
centos-kernel-experimental/7/x86_64 CentOS Experimental Kernels for x86_64              disabled
centosplus/7/x86_64                 CentOS-7 - Plus                                     disabled
centosplus-source/7                 CentOS-7 - Plus Sources                             disabled
cr/7/x86_64                         CentOS-7 - cr                                       disabled
elrepo                              ELRepo.org Community Enterprise Linux Repository -  enabled:    117
elrepo-extras                       ELRepo.org Community Enterprise Linux Extras Reposi disabled
elrepo-kernel                       ELRepo.org Community Enterprise Linux Kernel Reposi disabled
elrepo-testing                      ELRepo.org Community Enterprise Linux Testing Repos disabled
epel/x86_64                         Extra Packages for Enterprise Linux 7 - x86_64      enabled: 13,580
epel-debuginfo/x86_64               Extra Packages for Enterprise Linux 7 - x86_64 - De disabled
epel-source/x86_64                  Extra Packages for Enterprise Linux 7 - x86_64 - So disabled
epel-testing/x86_64                 Extra Packages for Enterprise Linux 7 - Testing - x disabled
epel-testing-debuginfo/x86_64       Extra Packages for Enterprise Linux 7 - Testing - x disabled
epel-testing-source/x86_64          Extra Packages for Enterprise Linux 7 - Testing - x disabled
extras/7/x86_64                     CentOS-7 - Extras                                   enabled:    468
extras-source/7                     CentOS-7 - Extras Sources                           disabled
fasttrack/7/x86_64                  CentOS-7 - fasttrack                                disabled
mariadb                             MariaDB                                             enabled:     98
remi                                Remi's RPM repository for Enterprise Linux 7 - x86_ disabled
remi-debuginfo/x86_64               Remi's RPM repository for Enterprise Linux 7 - x86_ disabled
remi-glpi91                         Remi's GLPI 9.1 RPM repository for Enterprise Linux disabled
remi-glpi92                         Remi's GLPI 9.2 RPM repository for Enterprise Linux disabled
remi-glpi93                         Remi's GLPI 9.3 RPM repository for Enterprise Linux disabled
remi-glpi94                         Remi's GLPI 9.4 RPM repository for Enterprise Linux disabled
remi-modular                        Remi's Modular repository for Enterprise Linux 7 -  disabled
remi-modular-test                   Remi's Modular testing repository for Enterprise Li disabled
remi-php54                          Remi's PHP 5.4 RPM repository for Enterprise Linux  disabled
remi-php55                          Remi's PHP 5.5 RPM repository for Enterprise Linux  disabled
remi-php55-debuginfo/x86_64         Remi's PHP 5.5 RPM repository for Enterprise Linux  disabled
remi-php56                          Remi's PHP 5.6 RPM repository for Enterprise Linux  disabled
remi-php56-debuginfo/x86_64         Remi's PHP 5.6 RPM repository for Enterprise Linux  disabled
remi-php70                          Remi's PHP 7.0 RPM repository for Enterprise Linux  disabled
remi-php70-debuginfo/x86_64         Remi's PHP 7.0 RPM repository for Enterprise Linux  disabled
remi-php70-test                     Remi's PHP 7.0 test RPM repository for Enterprise L disabled
remi-php70-test-debuginfo/x86_64    Remi's PHP 7.0 test RPM repository for Enterprise L disabled
remi-php71                          Remi's PHP 7.1 RPM repository for Enterprise Linux  disabled
remi-php71-debuginfo/x86_64         Remi's PHP 7.1 RPM repository for Enterprise Linux  disabled
remi-php71-test                     Remi's PHP 7.1 test RPM repository for Enterprise L disabled
remi-php71-test-debuginfo/x86_64    Remi's PHP 7.1 test RPM repository for Enterprise L disabled
remi-php72                          Remi's PHP 7.2 RPM repository for Enterprise Linux  disabled
remi-php72-debuginfo/x86_64         Remi's PHP 7.2 RPM repository for Enterprise Linux  disabled
remi-php72-test                     Remi's PHP 7.2 test RPM repository for Enterprise L disabled
remi-php72-test-debuginfo/x86_64    Remi's PHP 7.2 test RPM repository for Enterprise L disabled
remi-php73                          Remi's PHP 7.3 RPM repository for Enterprise Linux  disabled
remi-php73-debuginfo/x86_64         Remi's PHP 7.3 RPM repository for Enterprise Linux  disabled
remi-php73-test                     Remi's PHP 7.3 test RPM repository for Enterprise L disabled
remi-php73-test-debuginfo/x86_64    Remi's PHP 7.3 test RPM repository for Enterprise L disabled
remi-php74                          Remi's PHP 7.4 RPM repository for Enterprise Linux  disabled
remi-php74-debuginfo/x86_64         Remi's PHP 7.4 RPM repository for Enterprise Linux  disabled
remi-php74-test                     Remi's PHP 7.4 test RPM repository for Enterprise L disabled
remi-php74-test-debuginfo/x86_64    Remi's PHP 7.4 test RPM repository for Enterprise L disabled
remi-php80                          Remi's PHP 8.0 RPM repository for Enterprise Linux  disabled
remi-php80-debuginfo/x86_64         Remi's PHP 8.0 RPM repository for Enterprise Linux  disabled
remi-php80-test                     Remi's PHP 8.0 test RPM repository for Enterprise L disabled
remi-php80-test-debuginfo/x86_64    Remi's PHP 8.0 test RPM repository for Enterprise L disabled
remi-safe                           Safe Remi's RPM repository for Enterprise Linux 7 - enabled:  4,157
remi-safe-debuginfo/x86_64          Remi's RPM repository for Enterprise Linux 7 - x86_ disabled
remi-test                           Remi's test RPM repository for Enterprise Linux 7 - disabled
remi-test-debuginfo/x86_64          Remi's test RPM repository for Enterprise Linux 7 - disabled
updates/7/x86_64                    CentOS-7 - Updates                                  enabled:  1,932
updates-source/7                    CentOS-7 - Updates Sources                          disabled
repolist: 30,424
[root@webpress /]#

 

php 7.4를 설치하기 위해서는 remi-php74가 활성화(enabled)되어 있어야 한다. 

  • yum-utils의 설치
[root@webpress /]# yum install yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cat.net
 * elrepo: ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: mirrors.cat.net
 * remi-safe: ftp.riken.jp
 * updates: mirrors.cat.net
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-54.el7_8 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-54.el7_8.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-54.el7_8.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7.5 will be installed
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                     Arch                Version                       Repository         Size
=======================================================================================================
Installing:
 yum-utils                   noarch              1.1.31-54.el7_8               base              122 k
Installing for dependencies:
 libxml2-python              x86_64              2.9.1-6.el7.5                 base              247 k
 python-chardet              noarch              2.2.1-3.el7                   base              227 k
 python-kitchen              noarch              1.1.1-5.el7                   base              267 k

Transaction Summary
=======================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 863 k
Installed size: 4.3 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): libxml2-python-2.9.1-6.el7.5.x86_64.rpm                                  | 247 kB  00:00:00
(2/4): python-chardet-2.2.1-3.el7.noarch.rpm                                    | 227 kB  00:00:00
(3/4): yum-utils-1.1.31-54.el7_8.noarch.rpm                                     | 122 kB  00:00:00
(4/4): python-kitchen-1.1.1-5.el7.noarch.rpm                                    | 267 kB  00:00:00
-------------------------------------------------------------------------------------------------------
Total                                                                  2.1 MB/s | 863 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-chardet-2.2.1-3.el7.noarch                                                   1/4
  Installing : python-kitchen-1.1.1-5.el7.noarch                                                   2/4
  Installing : libxml2-python-2.9.1-6.el7.5.x86_64                                                 3/4
  Installing : yum-utils-1.1.31-54.el7_8.noarch                                                    4/4
  Verifying  : libxml2-python-2.9.1-6.el7.5.x86_64                                                 1/4
  Verifying  : python-kitchen-1.1.1-5.el7.noarch                                                   2/4
  Verifying  : yum-utils-1.1.31-54.el7_8.noarch                                                    3/4
  Verifying  : python-chardet-2.2.1-3.el7.noarch                                                   4/4

Installed:
  yum-utils.noarch 0:1.1.31-54.el7_8

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.el7.5               python-chardet.noarch 0:2.2.1-3.el7
  python-kitchen.noarch 0:1.1.1-5.el7

Complete!
[root@webpress /]#

 

  • remi-php74의 활성화 

php 7.4를 설치하기 위하여 (yum repolist all 명령의 결과 리스트에서 확인한) remi-php74를 활성화하자.

yum-config-manager를 이용해서 아래와 같이 remi-php74를 활성화(enabled)할 수 있다.

- 물론 remi-php80을 활성화하여 php 8.0을 설치할 수 있다. 추가된 저장소는 /etc/yum.repos.d에서 확인 가능하다.

[root@webpress /]# yum-config-manager --enable remi-php74
Loaded plugins: fastestmirror
========================================== repo: remi-php74 ===========================================
[remi-php74]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php74
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = 1
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php74/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php74/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php74/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist = http://cdn.remirepo.net/enterprise/7/php74/mirror
mirrorlist_expire = 86400
name = Remi's PHP 7.4 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php74
pkgdir = /var/cache/yum/x86_64/7/remi-php74/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = remi-php74
ui_repoid_vars = releasever,
   basearch
username =


yum repolist all을 통해서 remi-php74가 활성화 되었음을 확인했다면, 다음과 같이 php 7.4를 설치하자.

[root@webpress yum.repos.d]# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cat.net
 * elrepo: ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: mirrors.cat.net
 * remi-php74: ftp.riken.jp
 * remi-safe: ftp.riken.jp
 * updates: mirrors.cat.net
remi-php74                                                                      | 3.0 kB  00:00:00
remi-php74/primary_db                                                           | 234 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:7.4.16-1.el7.remi will be installed
--> Processing Dependency: php-cli(x86-64) = 7.4.16-1.el7.remi for package: php-7.4.16-1.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.16-1.el7.remi for package: php-7.4.16-1.el7.remi.x86_64
--> Processing Dependency: php-sodium(x86-64) = 7.4.16-1.el7.remi for package: php-7.4.16-1.el7.remi.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:7.4.16-1.el7.remi will be installed
---> Package php-common.x86_64 0:7.4.16-1.el7.remi will be installed
--> Processing Dependency: php-json(x86-64) = 7.4.16-1.el7.remi for package: php-common-7.4.16-1.el7.remi.x86_64
---> Package php-sodium.x86_64 0:7.4.16-1.el7.remi will be installed
--> Processing Dependency: libsodium.so.23()(64bit) for package: php-sodium-7.4.16-1.el7.remi.x86_64
--> Running transaction check
---> Package libsodium.x86_64 0:1.0.18-1.el7 will be installed
---> Package php-json.x86_64 0:7.4.16-1.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
 Package                Arch               Version                        Repository              Size
=======================================================================================================
Installing:
 php                    x86_64             7.4.16-1.el7.remi              remi-php74             3.4 M
Installing for dependencies:
 libsodium              x86_64             1.0.18-1.el7                   epel                   147 k
 php-cli                x86_64             7.4.16-1.el7.remi              remi-php74             5.2 M
 php-common             x86_64             7.4.16-1.el7.remi              remi-php74             1.2 M
 php-json               x86_64             7.4.16-1.el7.remi              remi-php74              71 k
 php-sodium             x86_64             7.4.16-1.el7.remi              remi-php74              83 k

Transaction Summary
=======================================================================================================
Install  1 Package (+5 Dependent packages)

Total download size: 10 M
Installed size: 42 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/remi-php74/packages/php-7.4.16-1.el7.remi.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Public key for php-7.4.16-1.el7.remi.x86_64.rpm is not installed
(1/6): php-7.4.16-1.el7.remi.x86_64.rpm                                         | 3.4 MB  00:00:00
warning: /var/cache/yum/x86_64/7/epel/packages/libsodium-1.0.18-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for libsodium-1.0.18-1.el7.x86_64.rpm is not installed
(2/6): libsodium-1.0.18-1.el7.x86_64.rpm                                        | 147 kB  00:00:00
(3/6): php-cli-7.4.16-1.el7.remi.x86_64.rpm                                     | 5.2 MB  00:00:00
(4/6): php-common-7.4.16-1.el7.remi.x86_64.rpm                                  | 1.2 MB  00:00:00
(5/6): php-sodium-7.4.16-1.el7.remi.x86_64.rpm                                  |  83 kB  00:00:00
(6/6): php-json-7.4.16-1.el7.remi.x86_64.rpm                                    |  71 kB  00:00:00
-------------------------------------------------------------------------------------------------------
Total                                                                   17 MB/s |  10 MB  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
 Userid     : "Remi Collet <RPMS@FamilleCollet.com>"
 Fingerprint: 1ee0 4cce 88a4 ae4a a29a 5df5 004e 6f47 00f9 7f56
 Package    : remi-release-7.9-1.el7.remi.noarch (@/remi-release-7)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-13.noarch (@/epel-release-latest-7.noarch)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php-json-7.4.16-1.el7.remi.x86_64                                                   1/6
  Installing : php-common-7.4.16-1.el7.remi.x86_64                                                 2/6
  Installing : php-cli-7.4.16-1.el7.remi.x86_64                                                    3/6
  Installing : libsodium-1.0.18-1.el7.x86_64                                                       4/6
  Installing : php-sodium-7.4.16-1.el7.remi.x86_64                                                 5/6
  Installing : php-7.4.16-1.el7.remi.x86_64                                                        6/6
  Verifying  : php-7.4.16-1.el7.remi.x86_64                                                        1/6
  Verifying  : php-common-7.4.16-1.el7.remi.x86_64                                                 2/6
  Verifying  : php-sodium-7.4.16-1.el7.remi.x86_64                                                 3/6
  Verifying  : libsodium-1.0.18-1.el7.x86_64                                                       4/6
  Verifying  : php-json-7.4.16-1.el7.remi.x86_64                                                   5/6
  Verifying  : php-cli-7.4.16-1.el7.remi.x86_64                                                    6/6

Installed:
  php.x86_64 0:7.4.16-1.el7.remi

Dependency Installed:
  libsodium.x86_64 0:1.0.18-1.el7                     php-cli.x86_64 0:7.4.16-1.el7.remi
  php-common.x86_64 0:7.4.16-1.el7.remi               php-json.x86_64 0:7.4.16-1.el7.remi
  php-sodium.x86_64 0:7.4.16-1.el7.remi

Complete!
[root@webpress yum.repos.d]#

 

콘솔에서 php -v 로 설치된 php의 버전을 확인할 수 있다.

[root@webpress yum.repos.d]# php -v
PHP 7.4.16 (cli) (built: Mar  2 2021 10:35:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
[root@webpress yum.repos.d]#

 

추가로 설치해야 기본적인 패키지의 목록은 다음과 같다.

  • php-mysqlnd
  • php-gd
  • php-ldap
  • php-imap
  • php-mbstring

모두 yum install 명령으로 설치하자.


그 유명(?)한 phpinfo() 함수를 통해서 설치된 php를 웹페이지에서 확인해보자.

<?php
     phpinfo();
?>

 

728x90
반응형

댓글