Home >Backend Development >PHP Problem >PHP compilation and installation steps

PHP compilation and installation steps

Guanhui
GuanhuiOriginal
2020-06-06 10:25:394509browse

PHP compilation and installation steps

PHP compilation and installation steps

PHP compilation and installation steps:

First enter the PHP official website and download the PHP source code locally ;

PHP compilation and installation steps

Then upload the PHP source code to the server and decompress the PHP source code;

Decompression command

 tar -xjvf

Decompression directory The content inside

PHP compilation and installation steps

#Then install the decompressed PHP source code;

If it prompts that there is any missing software, just directly (centos) yum install or (ubuntu ) apt-get install to install these compilation software. (Generally, if there is something missing, it is gcc, autoconfig and other compilation software)

./configure --prefux=/home/soft/php/  --with-config-file-path=/home/soft/php/etc

Finally, just add PHP to the environment variable.

vim ~/.bash_profile

Add alias = php=/home/soft/php/bin/php

php -v Test whether it works

Recommended tutorial: "PHP"

The above is the detailed content of PHP compilation and installation steps. 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