remi저장소 활용 바이너리 설치 php 7.4 -> 8.1 업그레이드
remi 저장소를 이용한것으로 아마존리눅스2 이거나 centos 이거나 관계는 없습니다. 아래는 el7 이라고 나와 있네요.
모든 모듈을 설치하는 방법도 있겠지만 사용하는것만 설치하는것이 더 바람직합니다.
예를 들면 저 같은 경우는 아래 보니 imap,snmp,redis5,odbc 이런것들은 사용을 안하는것인데... CMS 때문에 설치했나?
특정 모듈의 경우는 의존성 때문에 같이 설치 되는것도 있기는 합니다.
1) 현재 설치된것을 확인한다.
php74-php-common-7.4.30-1.el7.remi.x86_64
php74-php-pgsql-7.4.30-1.el7.remi.x86_64
php74-php-intl-7.4.30-1.el7.remi.x86_64
php74-php-gd-7.4.30-1.el7.remi.x86_64
php74-php-pecl-crypto-0.3.2-1.el7.remi.x86_64
php74-php-xml-7.4.30-1.el7.remi.x86_64
php74-php-opcache-7.4.30-1.el7.remi.x86_64
php74-php-snmp-7.4.30-1.el7.remi.x86_64
php74-php-soap-7.4.30-1.el7.remi.x86_64
php74-php-pecl-msgpack-2.1.2-1.el7.remi.x86_64
php74-php-pecl-recode-1.0.0~DEV.20190723-4.el7.remi.x86_64
php74-php-pdo-7.4.30-1.el7.remi.x86_64
php74-php-xmlrpc-7.4.30-1.el7.remi.x86_64
php74-php-pecl-mcrypt-1.0.5-1.el7.remi.x86_64
php74-php-dba-7.4.30-1.el7.remi.x86_64
php74-php-cli-7.4.30-1.el7.remi.x86_64
php74-php-ldap-7.4.30-1.el7.remi.x86_64
php74-php-mbstring-7.4.30-1.el7.remi.x86_64
php74-php-devel-7.4.30-1.el7.remi.x86_64
php74-php-pecl-mysql-1.0.0-0.23.20190415.d7643af.el7.remi.x86_64
php74-php-brotli-0.13.1-1.el7.remi.x86_64
php74-runtime-1.0-3.el7.remi.x86_64
php74-php-json-7.4.30-1.el7.remi.x86_64
php74-php-pecl-redis5-5.3.7-1.el7.remi.x86_64
php74-php-odbc-7.4.30-1.el7.remi.x86_64
php74-php-process-7.4.30-1.el7.remi.x86_64
php74-php-enchant-7.4.30-1.el7.remi.x86_64
php74-php-pspell-7.4.30-1.el7.remi.x86_64
php74-php-bcmath-7.4.30-1.el7.remi.x86_64
php74-php-pecl-igbinary-3.2.7-1.el7.remi.x86_64
php74-php-tidy-7.4.30-1.el7.remi.x86_64
php74-php-gmp-7.4.30-1.el7.remi.x86_64
php74-php-pear-1.10.13-1.el7.remi.noarch
php74-php-mysqlnd-7.4.30-1.el7.remi.x86_64
php74-php-fpm-7.4.30-1.el7.remi.x86_64
php74-php-imap-7.4.30-1.el7.remi.x86_64
2) mysql 고전적인 방식의 커넥션이 필요하면 추가 확인
[root@pabburi /etc/httpd/conf.d] rpm -qa | grep php74 | grep mysql
php74-php-pecl-mysql-1.0.0-0.23.20190415.d7643af.el7.remi.x86_64
php74-php-mysqlnd-7.4.30-1.el7.remi.x86_64
[root@pabburi /etc/httpd/conf.d]
[root@pabburi /etc/httpd/conf.d] yum search php81 | grep mysql
php81-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL
php81-php-pecl-mysql.x86_64 : MySQL database access functions
3) php81로 변경한다.
php81-php-common
php81-php-pgsql
php81-php-intl
php81-php-gd
php81-php-xml
php81-php-opcache
php81-php-snmp
php81-php-soap
php81-php-pdo
php81-php-xmlrpc
php81-php-dba
php81-php-cli
php81-php-ldap
php81-php-mbstring
php81-php-devel
php81-php-json
php81-php-odbc
php81-php-process
php81-php-enchant
php81-php-pspell
php81-php-bcmath
php81-php-tidy
php81-php-gmp
php81-php-pear
php81-php-mysqlnd
php81-php-fpm
php81-php-pecl-igbinary
php81-php-pecl-redis5
php81-php-brotli
php81-runtime
php81-php-pecl-mcrypt
php81-php-pecl-msgpack
php81-php-pecl-crypto
php81-php-imap
php81-php-pecl-recode
php81-php-pecl-mysql
위를 한줄 명령을 위해서 아래 처럼 만듭니다.
yum -y install php81-php-common php81-php-pgsql php81-php-intl php81-php-gd php81-php-xml php81-php-opcache php81-php-snmp php81-php-soap php81-php-pdo php81-php-xmlrpc php81-php-dba php81-php-cli php81-php-ldap php81-php-mbstring php81-php-devel php81-php-json php81-php-odbc php81-php-process php81-php-enchant php81-php-pspell php81-php-bcmath php81-php-tidy php81-php-gmp php81-php-pear php81-php-mysqlnd php81-php-fpm php81-php-pecl-igbinary php81-php-pecl-redis5 php81-php-brotli php81-runtime php81-php-pecl-mcrypt php81-php-pecl-msgpack php81-php-pecl-crypto php81-php-imap php81-php-pecl-recode php81-php-pecl-mysql
# 설치를 확인 합니다.
rpm -qa | grep php81
ls -al /etc/opt/remi/php*
# 쉘에서 동일한 호출을 위해서 심볼릭 링크를 걸어 두고 사용하고 있다면 삭제 하고 다시 만들어 줍니다.
예를 들면 /usr/local/php/bin/php 를 실행하기 위한 것이라면
/usr/local 로 이동한 다음
rm -f php
ln -s /opt/remi/php81/root php