3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

RockyLinux 8にPHP 8.1, PHP-FPM 8.1をインストール(Remi's RPM repository)

Posted at

はじめに

Remi's RPM repositoryを利用してRockyLinux8にPHP8.1をインストール
親記事:PHP, PHP-FPMの各種インストール方法とEOLまとめ
参考:Remi's RPM repository

サポート

本手法で導入した場合、[PHP: Supported Versions] (https://www.php.net/supported-versions.php) / PHP: Unsupported Branchesより、2024-11-25がEOLになると思われる。
それ以降に報告された脆弱性や不具合への対応は実施されない可能性がある。

note

  • 他のPHPモジュールを入れていた場合、下記コマンドでモジュールのリセットが必要
# dnf module reset php

LOG

インストール

# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)

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

# dnf install -y which
# dnf module install php:remi-8.1
... 略
Installing module profiles:
 php/common
Enabling module streams:
 httpd                   2.4
 nginx                   1.14
 php                     remi-8.1
... 略

各種確認

# which php
/usr/bin/php

# php -v
PHP 8.1.6 (cli) (built: May 11 2022 01:14:18) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies

# php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini

# which php-fpm
/usr/sbin/php-fpm

# /usr/sbin/php-fpm -v
PHP 8.1.6 (fpm-fcgi) (built: May 11 2022 01:14:18)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?