Rocky Linux 9にphp-pecl-memcacheモジュールをインストールする

環境
Rocky Linux release 9.0 (Blue Onyx)
PHP 8.1.11

操作方法
1.リポジトリを追加します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf install epel-release -y
# sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm -y
# sudo dnf install epel-release -y # sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm -y
# sudo dnf install epel-release -y
# sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm -y

2.モジュールをリセットして有効にします。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf module reset php
# sudo dnf module enable php:remi-8.1 -y
# sudo dnf module reset php # sudo dnf module enable php:remi-8.1 -y
# sudo dnf module reset php
# sudo dnf module enable php:remi-8.1 -y

3.以下のコマンドでモジュールを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf module list php
メタデータの期限切れの最終確認: 0:20:41 時間前の 20221018070045秒 に 実施しました。
Remi's Modular repository for Enterprise Linux 9 - x86_64
Name Stream Profiles Summary
php remi-7.4 common [d], devel, minimal PHP scripting language
php remi-8.0 common [d], devel, minimal PHP scripting language
php remi-8.1 [e] common [d], devel, minimal PHP scripting language
php remi-8.2 common [d], devel, minimal PHP scripting language
ヒント: [d]efault, [e]nabled, [x]disabled, [i]nstalled
# sudo dnf module list php メタデータの期限切れの最終確認: 0:20:41 時間前の 2022年10月18日 07時00分45秒 に 実施しました。 Remi's Modular repository for Enterprise Linux 9 - x86_64 Name Stream Profiles Summary php remi-7.4 common [d], devel, minimal PHP scripting language php remi-8.0 common [d], devel, minimal PHP scripting language php remi-8.1 [e] common [d], devel, minimal PHP scripting language php remi-8.2 common [d], devel, minimal PHP scripting language ヒント: [d]efault, [e]nabled, [x]disabled, [i]nstalled
# sudo dnf module list php
メタデータの期限切れの最終確認: 0:20:41 時間前の 2022年10月18日 07時00分45秒 に 実施しました。
Remi's Modular repository for Enterprise Linux 9 - x86_64
Name     Stream          Profiles                      Summary
php      remi-7.4        common [d], devel, minimal    PHP scripting language
php      remi-8.0        common [d], devel, minimal    PHP scripting language
php      remi-8.1 [e]    common [d], devel, minimal    PHP scripting language
php      remi-8.2        common [d], devel, minimal    PHP scripting language

ヒント: [d]efault, [e]nabled, [x]disabled, [i]nstalled

4.「php-pecl-memcache」モジュールをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf install php-pecl-memcache
# sudo dnf install php-pecl-memcache
# sudo dnf install php-pecl-memcache

5.インストールルの確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cat /etc/php.d/40-memcache.ini | grep -v ";" | grep -v ^$
extension=memcache.so
# cat /etc/php.d/40-memcache.ini | grep -v ";" | grep -v ^$ extension=memcache.so
# cat /etc/php.d/40-memcache.ini | grep -v ";" | grep -v ^$
extension=memcache.so

 

Rocky Linux 9

Posted by arkgame