How to install php7 on lunx

尊渡假赌尊渡假赌尊渡假赌
Release: 2023-06-16 15:42:27
Original
1257 people have browsed it

The method for lunx to install php7 is: 1. Use the "Ctrl alt t" key combination to open the terminal; 2. Add the PHP7 repository; 3. Update the Repository. After adding the PPA repository, update the system package list to Make the repository available; 4. Install PHP7.0 and other required components; 5. After completing the installation, verify whether "PHP -v" is successfully installed and the version number will appear.

How to install php7 on lunx

The operating system of this tutorial: Linux5.18.14 system, php7 version, Dell G3 computer.

The following are the specific steps to install php7 on Ubuntu:

1. Start the terminal:

On Ubuntu, you can press the "Ctrl Alt T" key combination to Open a terminal.

2. Add PHP7 repository:

Add Ondřej Surý’s PHP PPA repository to the system using the following command:

```
sudo add-apt-repository ppa:ondrej/php
```
Copy after login

3. Update Repository:

After adding the PPA repository, update the system package list to make the repository available. Please use the following command:

```
sudo apt-get update
```
Copy after login

4. Install PHP7.0 and its related components:

Use the following command to install PHP7.0 and other required components:

```
sudo apt-get install php7.0 php7.0-cli php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-mcrypt php7.0-json php7.0-sqlite3 php7.0-mbstring php7.0-xml php7.0-zip
```
Copy after login

5 . Verify installation:

After completing the installation, please verify whether PHP7.0 has been successfully installed. Type the following command to check the version number of PHP:

```
php -v
```
Copy after login

If the installation is successful, the version number of PHP 7.x will be output (where "x" is the next number). Now, you have successfully installed PHP7.0!

Hope these steps are helpful to you.

The above is the detailed content of How to install php7 on lunx. 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