51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

linux php 安装

https://www.php.net/releases/

Centos安装php php-fpm 以及 配置nginx - 大数据从业者FelixZh - 博客园 (cnblogs.com)

1- 安装PHP

tar -xvf php-5.5.13.tar.bz2  
  
cd php-5.5.13  

2-

 ./configure --prefix=/usr/local/php --with-config-file-path=/etc --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gettext --enable-mbstring --with-iconv --with-mcrypt --with-mhash --with-openssl --enable-bcmath --enable-soap --with-libxml-dir --enable-pcntl --enable-shmop --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sockets --with-curl --with-zlib --enable-zip --with-bz2 --with-readline --without-sqlite3 --without-pdo-sqlite --with-pear  

然后

可能出现的错误
出现错误: congigure error: xml2-config not found

解决办法:

1.执行命令:

yum install libxml2-devel

2.查看是否成功:

find / -name "xml2-config"
出现错误: congigure error: Cannot find OpenSSL's <evp.h>

解决办法:

yum install openssl openssl-devel
ln -s /usr/lib64/libssl.so /usr/lib/

出现错误: configure: error: Please reinstall the BZip2 distribution

解决办法:

yum install bzip2 bzip2-devel

出现错误: configure: error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/

解决办法:

yum -y install curl-devel

出现错误:configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决办法:

sudo yum install libmcrypt libmcrypt-devel mcrypt mhash

出现错误:configure: error: Please reinstall readline - I cannot find readline.h

解决办法:

sudo yum install readline-devel

编译
make
make install

赞(6)
未经允许不得转载:工具盒子 » linux php 安装