Home >Backend Development >PHP Problem >How to install php package in liunx
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.
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.
[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
[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.
[Compile source code]: Execute the compilation command in the decompression directory: make
[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
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!