- 浏览: 2539271 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Install PHP 5.6 on EC2
Start with this version
> wget http://ar2.php.net/distributions/php-5.6.16.tar.bz2
Unzip the file
> tar -xvf php-5.6.16.tar.bz2
Configure that
> ./configure --prefix=/home/ec2-user/tool/php-5.6.16 --with-openssl --with-iconv-dir=/usr/lib --with-curl=/opt/local/include/curl --with-mysql --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
1 Error Message:
configure: error: xml2-config not found. Please check your libxml2 installation.
Solution:
sudo yum install libxml2-devel
2 Error Message:
configure: error: Cannot find OpenSSL's <evp.h>
Solution:
sudo yum install openssl-devel
3 Error Message:
configure: error: Please reinstall the BZip2 distribution
Solution:
sudo yum install bzip2-devel
4 Error Message:
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
Solution:
sudo yum install curl-devel
5 Error Message:
If configure fails try --with-vpx-dir=<DIR>
configure: error: jpeglib.h not found.
Solution:
sudo yum install libjpeg-devel
6 Error Message:
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
configure: error: png.h not found.
Solution:
sudo yum install libpng-devel
7 Error Message:
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
Solution:
sudo yum install freetype-devel.x86_64 freetype.x86_64
8 Error Message:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
Solution:
sudo yum install libc-client-devel
9 Error Message:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
Solution:
http://php.net/manual/en/imap.requirements.php
I do not think I am using IMAP, so I just get rid of that.
>./configure --prefix=/home/ec2-user/tool/php-5.6.16 --with-openssl --with-iconv-dir=/usr/lib --with-curl=/opt/local/include/curl --with-mysql --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
10 Error Message:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Solution:
sudo yum install libmcrypt-devel
11 Error Message:
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
Solution:
Do I use PostgreSQL, no, so I remove that.
./configure --prefix=/home/ec2-user/tool/php-5.6.16 --with-openssl --with-iconv-dir=/usr/lib --with-curl=/opt/local/include/curl --with-mysql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
12 Error Message:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
Solution:
sudo yum install libxslt-devel
Yeah, it works.
> make
> make install
Wrote PEAR system config file at: /home/ec2-user/tool/php-5.6.16/etc/pear.conf
You may want to add: /home/ec2-user/tool/php-5.6.16/lib/php to your php.ini include_path
/home/ec2-user/install/php-5.6.16/build/shtool install -c ext/phar/phar.phar /home/ec2-user/tool/php-5.6.16/bin
ln -s -f phar.phar /home/ec2-user/tool/php-5.6.16/bin/phar
Installing PDO headers: /home/ec2-user/tool/php-5.6.16/include/php/ext/pdo/
Add that to the path
> sudo ln -s /home/ec2-user/tool/php-5.6.16 /opt/php-5.6.16
> sudo ln -s /opt/php-5.6.16 /opt/php
> vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/opt/maven/bin
PATH=$PATH:/opt/sbt/bin
PATH=$PATH:/opt/jdk/bin:/opt/jdk/jre/bin
PATH=$PATH:/opt/node/bin
PATH=$PATH:/opt/php/bin
export PATH
JAVA_HOME=/opt/jdk
export JAVA_HOME
JRE_HOME=/opt/jdk/jre
export JRE_HOME
> sudo ln -s /opt/php/bin/php /usr/bin/php
References:
http://sillycat.iteye.com/blog/2223621
http://sillycat.iteye.com/blog/2149513
http://supportlobby.com/library-errors-when-compile-php-5-on-centos/
http://www.creativ-tech.com/kb/common-php-compile-errors-and-the-corresponding-missing-lib/
Start with this version
> wget http://ar2.php.net/distributions/php-5.6.16.tar.bz2
Unzip the file
> tar -xvf php-5.6.16.tar.bz2
Configure that
> ./configure --prefix=/home/ec2-user/tool/php-5.6.16 --with-openssl --with-iconv-dir=/usr/lib --with-curl=/opt/local/include/curl --with-mysql --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
1 Error Message:
configure: error: xml2-config not found. Please check your libxml2 installation.
Solution:
sudo yum install libxml2-devel
2 Error Message:
configure: error: Cannot find OpenSSL's <evp.h>
Solution:
sudo yum install openssl-devel
3 Error Message:
configure: error: Please reinstall the BZip2 distribution
Solution:
sudo yum install bzip2-devel
4 Error Message:
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
Solution:
sudo yum install curl-devel
5 Error Message:
If configure fails try --with-vpx-dir=<DIR>
configure: error: jpeglib.h not found.
Solution:
sudo yum install libjpeg-devel
6 Error Message:
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
configure: error: png.h not found.
Solution:
sudo yum install libpng-devel
7 Error Message:
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
Solution:
sudo yum install freetype-devel.x86_64 freetype.x86_64
8 Error Message:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
Solution:
sudo yum install libc-client-devel
9 Error Message:
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
Solution:
http://php.net/manual/en/imap.requirements.php
I do not think I am using IMAP, so I just get rid of that.
>./configure --prefix=/home/ec2-user/tool/php-5.6.16 --with-openssl --with-iconv-dir=/usr/lib --with-curl=/opt/local/include/curl --with-mysql --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
10 Error Message:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Solution:
sudo yum install libmcrypt-devel
11 Error Message:
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
Solution:
Do I use PostgreSQL, no, so I remove that.
./configure --prefix=/home/ec2-user/tool/php-5.6.16 --with-openssl --with-iconv-dir=/usr/lib --with-curl=/opt/local/include/curl --with-mysql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
12 Error Message:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
Solution:
sudo yum install libxslt-devel
Yeah, it works.
> make
> make install
Wrote PEAR system config file at: /home/ec2-user/tool/php-5.6.16/etc/pear.conf
You may want to add: /home/ec2-user/tool/php-5.6.16/lib/php to your php.ini include_path
/home/ec2-user/install/php-5.6.16/build/shtool install -c ext/phar/phar.phar /home/ec2-user/tool/php-5.6.16/bin
ln -s -f phar.phar /home/ec2-user/tool/php-5.6.16/bin/phar
Installing PDO headers: /home/ec2-user/tool/php-5.6.16/include/php/ext/pdo/
Add that to the path
> sudo ln -s /home/ec2-user/tool/php-5.6.16 /opt/php-5.6.16
> sudo ln -s /opt/php-5.6.16 /opt/php
> vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/opt/maven/bin
PATH=$PATH:/opt/sbt/bin
PATH=$PATH:/opt/jdk/bin:/opt/jdk/jre/bin
PATH=$PATH:/opt/node/bin
PATH=$PATH:/opt/php/bin
export PATH
JAVA_HOME=/opt/jdk
export JAVA_HOME
JRE_HOME=/opt/jdk/jre
export JRE_HOME
> sudo ln -s /opt/php/bin/php /usr/bin/php
References:
http://sillycat.iteye.com/blog/2223621
http://sillycat.iteye.com/blog/2149513
http://supportlobby.com/library-errors-when-compile-php-5-on-centos/
http://www.creativ-tech.com/kb/common-php-compile-errors-and-the-corresponding-missing-lib/
发表评论
-
Stop Update Here
2020-04-28 09:00 310I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 465NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 361Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 363Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 328Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 419Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 364Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 444VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 376Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 463NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 413Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 330Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 242GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 443GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 320GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 284Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 302Serverless with NodeJS and Tenc ...
相关推荐
linux上安装php
RUN yum install -y gcc gcc-c++ make gd-devel libxml2-devel libcurl-devel libjpeg-devel libpng-devel openssl-devel ADD php-5.6.31.tar.gz /tmp/ RUN cd /tmp/php-5.6.31 && \ ./configure --prefix=/usr/...
yum install -y libxml2-devel openssl-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel openldap-devel ./configure --prefix=/usr/local/php \ --with-config-file-path=/usr/local/php/etc \ --...
在PHP5.6版本中,为了充分利用Redis的功能,我们需要安装并配置PHP的Redis扩展。以下是一个详细的步骤指南,帮助您完成这个过程。 首先,了解Redis扩展的作用。Redis扩展为PHP提供了一个接口,允许开发者直接在PHP...
### CentOS 通过 YUM 升级 PHP 至 PHP5.6 的详细步骤及知识点 在 CentOS 系统中,有时我们需要对系统中的 PHP 版本进行升级,以便满足某些应用程序的需求或者利用新版本中提供的功能与性能改进。本文将详细介绍如何...
2. **下载源码**:从官方仓库或镜像站点获取PHP5.6的源码包,例如`php-5.6.34.tar.gz`。 3. **解压源码**:使用`tar -zxvf php-5.6.34.tar.gz`命令解压缩源码。 4. **配置**:进入解压后的目录,运行`./configure ...
《PHP 5.6在CentOS系统中的应用与配置详解》 PHP(Hypertext Preprocessor)是一种广泛使用的开源脚本语言,尤其适用于Web开发,可嵌入到HTML中使用。PHP 5.6作为其重要的一个版本,在很多现有的项目中仍然被广泛...
本教程将详细介绍如何在Windows环境下安装Apache2.4和PHP5.6,这两个组件是搭建LAMP(Linux, Apache, MySQL, PHP)或WAMP(Windows, Apache, MySQL, PHP)服务器的关键部分。 首先,让我们开始Apache2.4的安装步骤...
下载根目录,执行#sh install_php5.6.sh , 例如有iconv方面错误,执行#sh iconv_ins.sh ,注意安装后路径, 看是否修改php脚本配置的路径./configure --with-iconv==/usr/local/libiconv 。
标题中的“php5.4、5.5、5.6的php_mongo-1.6.6扩展”指的是适用于PHP 5.4、5.5和5.6版本的一个名为php_mongo的扩展,版本号为1.6.6。这个扩展是针对MongoDB数据库的一种接口,它允许PHP程序员使用PHP语言与MongoDB...
标题 "zend-loader-php5.6-windows-x86.zip" 暗示了这是一个专为运行在Windows x86架构上的PHP 5.6版本设计的Zend Loader组件的压缩包。Zend Loader是 Zend Technologies 提供的一款重要的PHP扩展,主要用于增强PHP...
2. **下载源码**:从PECL(PHP Extension Community Library)官网或者GitHub上下载PHP-mongo的源码包。由于这里提供了未编译的文件,可以直接使用解压后的源码。 3. **编译与安装**:进入源码目录,执行以下命令...
**PHP Xdebug 5.6:深度解析与配置指南** Xdebug是一款强大的PHP扩展,专为开发者设计,用于提升PHP的开发效率和调试体验。它提供了丰富的功能,如代码调试、性能分析、变量查看以及错误日志记录等,极大地简化了...
在本文中,我们将深入探讨如何在CentOS 7操作系统上通过源代码编译来安装Apache 2.4、MySQL 5.6和PHP 7.1。这个过程对于那些希望自定义软件配置或在没有预装包的环境中部署这些服务的系统管理员来说非常有用。 首先...
README FOR INTERBASE 5.6 Online documentation and Release Notes For a description of new features and changes in InterBase 5.6, use Acrobat Reader to view the ReleaseNotes.pdf file. In addition, the...
Linux5.6_x64 Install Oracle 11g R2详细过程-Sam.docx
"install_mysql"这个压缩包文件包含了MySQL 5.6的安装源代码或二进制文件。首先,解压这个压缩包: ``` tar -zxvf install_mysql ``` 然后,根据解压后的文件结构,找到MySQL的安装文件,可能是`mysql-community-...
2. **错误处理**:PHP5.6改进了错误报告机制,引入了异常处理,允许开发者使用try-catch语句来捕获和处理运行时错误,提高了程序的健壮性。 3. **数组操作**:PHP5.6提供了更多的数组处理函数,如array_column()...
centos系统php 5.6对应的mongo.so下载及源码 $ php -v 版本是5.6安装 不是的话 找到对应的版本再装 命令都相同只是版本号不同 在centos 64 7.2 测试通过 $ wget http://pecl.php.net/get/mongo-1.6.12.tgz $ tar -...