Linux下安装PHP

从php官网下载好需要php的压缩包,我下的是5.5.37版,

解压:# tar -xvf php-5.5.37.tar.gz

移至解压出的文件夹:# cd php-5.5.37

检查安装环境:# ./configure

如果报以下错:

configure: error: xml2-config not found. Please check your libxml2 installation.

解决办法:

安装xml包:

# yum install libxml2

# yum install libxml2-devel -y

./configure通过后,

# make

#make install

原文地址:https://www.cnblogs.com/red-code/p/5618126.html