Home  >  Article  >  Backend Development  >  How to install php using linux commands

How to install php using linux commands

藏色散人
藏色散人Original
2020-07-22 10:53:282404browse

How to install php using linux command: First download the php installation source package from the official website of php; then execute the command "./configure --prefix=/usr/local/servers/php" to configure the installation environment; Then execute the compilation command in the decompression directory; finally execute the installation command.

How to install php using linux commands

linux system installation php

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

Recommended: "PHP Tutorial"

How to install php using linux commands

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

How to install php using linux commands

[Configuration 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 using linux commands

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

How to install php using linux commands

[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 using linux commands

The above is the detailed content of How to install php using linux commands. 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