Home  >  Article  >  Backend Development  >  How to install php package in liunx

How to install php package in liunx

藏色散人
藏色散人Original
2021-11-25 09:04:001860browse

How to install php package in liunx: 1. Download the php installation source package; 2. Use tar to decompress it; 3. Execute the command "cd php-5.5.11"; 4. Configure the installation environment; 5. Execute the compilation command in the decompression directory; 6. Execute the installation command.

How to install php package in liunx

The operating environment of this article: linux5.9.8 system, PHP5.5.11, Dell G3.

liunx How to install php package?

[Download php source code]: Download the php installation source code package from the official website of php.

How to install php package in liunx

[Decompress the installation package]: The downloaded installation package is in compressed gz format. In Linux, you can use the built-in tool tar to decompress it and execute it in the directory where the installation package is located. Command: tar -zxvf php-5.5.11.tar.gz

How to install php package in liunx

[Configure installation variables]: Open the decompressed directory - execute the command: cd php-5.5.11 ;Configure the installation environment - execute the command: ./configure --prefix=/usr/local/servers/php, "/usr/local/servers/php" is the installation path, you can change it to your favorite installation path.

How to install php package in liunx

[Compile source code]: Execute the compilation command in the decompression directory: make

How to install php package in liunx

[Install php]: Switch to Root user - execute command: sudo su root; installation - execute command: make install

Create soft link: execute command: ln -s /usr/local/servers/php/bin/php /usr/local/ bin/php

How to install php package in liunx

Recommended study: "PHP Video Tutorial"

The above is the detailed content of How to install php package in liunx. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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