Install PHP in Linux environment

php001

summary

Install PHP on Rocky Linux.See below for Rocky Linux environment construction.

Linux environment construction
Environment01_

PHP installation

Check software package

The dnf command is a command to use the “RPM package”.

It is the successor to the “yum” command of CentOS.It is used for installation, update, and deletion.

Check the PHP package list with the following command.

sudo dnf module list php

Software package installation

Since the latest package is v7.4, set that package.

sudo dnf module enable php:7.4 -y

Install the package.

sudo dnf install php

Check PHP version

Check the version.

php --version

I was able to confirm that PHP 7.4.6 was installed successfully.

タイトルとURLをコピーしました