How to check if PHP7 is installed using yum command

PHPz
Release: 2023-03-27 18:36:35
Original
940 people have browsed it

As PHP continues to be updated, many users may encounter such problems: how to check whether PHP7 has been installed in the system.

This article will introduce how to use the yum command to check whether PHP7 is installed.

First, we need to open a terminal window. If you are a Linux user, you can use the following command to open a terminal window:

Press Ctrl Alt T to open a terminal window.

Once you open the terminal, you can confirm whether PHP7 is installed by running the following command:

yum list installed | grep php
Copy after login

In this command, yum list installed is used to list List all installed software packages on the current system. The pipe character (|) is used to pass the output of this command as the input of the next command.

grep phpThe command looks for lines containing the keyword "php" in the output.

The output of this command will display all installed PHP related software. If you have PHP7 installed, the PHP7 version information should be displayed in the output.

Also, if you want to know the currently available PHP packages, you can use the following command to search for available PHP packages:

yum search php
Copy after login

This command will display all available PHP packages as well Their description information. You can browse this list to find the package you need and install it.

If you have not installed PHP7, you can install it through the following command:

yum -y install php
Copy after login

This command will download and install the latest PHP7 package available on the system.

In summary, by using the above command, you can easily check whether PHP7 is installed on your system. If you haven't installed it yet, you can install the latest PHP7 package through the yum command.

The above is the detailed content of How to check if PHP7 is installed using yum command. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!