ubuntu 编译安装php5.4以上版本
先安装必须的依赖库: sudo?apt-get?-y?install?autoconf??\ sudo?apt-get?-y?install?libxml2-dev??\ sudo?apt-get?-y?install?bzip2??\ sudo?apt-get?-y?install?libcurl3-openssl-dev??\ sudo?apt-get?-y?install?libcurl4-gnutls-dev??\ sudo?apt-get?-y
先安装必须的依赖库:
sudo?apt-get?-y?install?autoconf?&&?\
sudo?apt-get?-y?install?libxml2-dev?&&?\
sudo?apt-get?-y?install?bzip2?&&?\
sudo?apt-get?-y?install?libcurl3-openssl-dev?&&?\
sudo?apt-get?-y?install?libcurl4-gnutls-dev?&&?\
sudo?apt-get?-y?install?libjpeg-dev?&&?\
sudo?apt-get?-y?install?libpng-dev?&&?\
sudo?apt-get?-y?install?libxpm-dev?&&?\
sudo?apt-get?-y?install?libfreetype6-dev?&&?\
sudo?apt-get?-y?install?libt1-dev?&&?\
sudo?apt-get?-y?install?libmcrypt-dev?&&?\
sudo?apt-get?-y?install?libmysql++-dev?&&?\
sudo?apt-get?-y?install?libxslt1-dev?&&?\
sudo?apt-get?-y?install?libbz2-dev
软链接库文件:
cd?/usr/lib?&&?\
ln?-s?/usr/lib/x86_64-linux-gnu/libXpm.so?.?&&?\
ln?-s?/usr/lib/x86_64-linux-gnu/libXpm.a?.?&&?\
ln?-s?/usr/lib/x86_64-linux-gnu/libXpm.so.4?.?&&?\
ln?-s?/usr/lib/x86_64-linux-gnu/libXpm.so.4.11.0?.?&&?\
echo?’successful!’
下载最新php源码,编译安装:
cd?/opt?&&?\
sudo?mkdir?src?&&?\
cd?src?&&?\
sudo?wget?http://us1.php.net/distributions/php-5.4.14.tar.gz?&&?\
sudo?tar?zxvf?php-5.4.14.tar.gz?&&?\
cd?php-5.4.14?&&?\
sudo?./configure?\
–prefix=/opt/php?\
–with-mysql=mysqlnd?\
–with-mysqli=mysqlnd?\
–with-pdo-mysql=mysqlnd?\
–with-config-file-path=/opt/php/etc?\
–with-zlib?\
–with-curl?\
–with-curlwrappers?\
–with-mcrypt?\
–with-gd?\
–with-openssl?\
–with-mhash?\
–with-xmlrpc?\
–with-jpeg-dir?\
–with-png-dir?\
–with-xpm-dir?\
–with-freetype-dir?\
–with-zlib-dir?\
–enable-shared?\
–enable-fpm?\
–enable-xml?\
–disable-rpath?\
–enable-safe-mode?\
–enable-bcmath?\
–enable-shmop?\
–enable-sysvsem?\
–enable-inline-optimization?\
–enable-mbregex?\
–enable-mbstring?\
–enable-gd-native-ttf?\
–enable-pcntl?\
–enable-sockets?\
–enable-zip?\
–enable-soap
不出问题的话就执行最后一步编译安装:
sudo?make?&&?sudo?make?install
原文地址:ubuntu 编译安装php5.4以上版本, 感谢原作者分享。
下一篇: PHP命名空间和自动加载类
推荐阅读
-
ubuntu 编译安装php5.4以上版本
-
Ubuntu12下编译安装PHP5.3开发环境,ubuntu12php5.3
-
CentOS 5 编译安装 MySQL 5.5.x 新版本
-
PHP5.3以上版本安装ZendOptimizer扩展,php5.3安装zend
-
CentOS 7.2 下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1的方法详解(mini版本)
-
MySQL 5.5/5.6/5.7及以上版本安装包安装时如何选择安装路径
-
Ubuntu 安装多版本JDK --使用update-alternatives 管理多个版本
-
西厢记之 Ubuntu Linux下编译安装西_厢_计_划 博客分类: 其他 LinuxUbuntu防火墙SVNC#
-
在ubuntu中安装及使用rvm管理ruby版本(转载) rubyubuntu
-
在ubuntu中安装及使用rvm管理ruby版本(转载) rubyubuntu