fedora16停PHP5.4编译安装笔记
fedora16下PHP5.4编译安装笔记
今天重装了下PHP,顺便尝鲜一下5.4,期间涉及到的多数软件我都是选择的最新稳定版。这里要注意的就是PHP的一个编译参数:--with-gd=shared ,这里切不可把shared替换为gd2的安装目录/usr/local/gd2,不然会无法编译通过,网上查了下好像是PHP5.3-5.4的一个bug。
yum install -y gcc g-c++ gcc-c++ libtool openssl-devel pam-devel python-devel libxml2-devel
sourcepath="/opt/source/"
cd {$sourcepath}
wget http://fossies.org/unix/misc/zlib-1.2.6.tar.gz
mkdir /usr/local/zlib
tar zxvf zlib-1.2.6.tar.gz
cd zlib-1.2.6
./configure --prefix=/usr/local/zlib
make && make install
echo "/usr/local/zlib/lib" >> /etc/ld.so.conf
ldconfig
chcon -t textrel_shlib_t /usr/local/zlib/lib/libz.so*
cd {$sourcepath}
wget http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz
tar zxvf libxml2-2.7.8.tar.gz
cd libxml2-2.7.8
./configure --prefix=/usr/local/libxml2 --with-python
make
make install
LD_LIBRARY_PATH=/usr/local/lib
LD_LIBRARY_PATH=/usr/local/libxml2/lib
LD_LIBRARY_PATH=/usr/lib/python2.7/site-packages
echo "/usr/local/libxml2/lib" >> /etc/ld.so.conf
echo "/usr/lib/python2.7/site-packages" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://xmlsoft.org/sources/libxslt-1.1.26.tar.gz
mkdir /usr/local/libxslt
tar zxvf libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2
make
make install
echo "/usr/local/libxslt/lib" >> /etc/ld.so.conf
echo "/usr/local/libxslt/lib/python2.7/site-packages" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://vps.googlecode.com/files/libiconv-1.13.1.tar.gz
mkdir /usr/local/libiconv
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --prefix=/usr/local/libiconv
make
make install
echo "/usr/local/libiconv/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://vps.googlecode.com/files/mhash-0.9.9.9.tar.gz
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make
make install
echo "/usr/local/lib" >> /etc/ld.so.conf
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ldconfig
cd {$sourcepath}
wget http://vps.googlecode.com/files/libmcrypt-2.5.8.tar.gz
mkdir /usr/local/libmcrypt
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/libltdl
./configure --enable-ltdl-install
make
make install
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
cd libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcrypt
make && make install
ln -s /usr/local/libmcrypt/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/libmcrypt/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/libmcrypt/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/libmcrypt/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
cp /usr/local/libmcrypt/bin/libmcrypt-config /usr/bin/libmcrypt-config
cp /usr/local/libmcrypt/lib/libmcrypt.* /usr/lib
echo "/usr/local/libmcrypt/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://vps.googlecode.com/files/mcrypt-2.6.8.tar.gz
mkdir /usr/local/mcrypt
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
LD_LIBRARY_PATH=/usr/local/lib
./configure --prefix=/usr/local/mcrypt --with-libmcrypt-prefix=/usr/local/libmcrypt --with-libiconv-prefix=/usr/local/libiconv
make && make install
cd {$sourcepath}
wget http://curl.cs.pu.edu.tw/download/curl-7.25.0.tar.gz
tar zxvf curl-7.25.0.tar.gz
cd curl-7.25.0
./configure
make && make install
ldconfig
cd {$sourcepath}
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.gz
mkdir /usr/local/freetype2
tar zxvf freetype-2.4.9.tar.gz
cd freetype-2.4.9
./configure --prefix=/usr/local/freetype2
make && make install
echo "/usr/local/freetype2/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz
mkdir /usr/local/fontconfig
tar zxvf fontconfig-2.9.0.tar.gz
cd fontconfig-2.9.0
export PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH
cp -r /usr/local/libxml2/include/libxml2/libxml/ /usr/include/
./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype2/bin/freetype-config
make && make install
echo "/usr/local/fontconfig/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.9.tar.gz
mkdir /usr/local/libpng2
tar zxvf libpng-1.5.9.tar.gz
cd libpng-1.5.9/
export LDFLAGS=-L/usr/local/zlib/lib
export CFLAGS=-I/usr/local/zlib/include
./configure --prefix=/usr/local/libpng2
make && make install
echo "/usr/local/libpng2/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz
mkdir /usr/local/jpeg8
mkdir /usr/local/jpeg8/include
mkdir /usr/local/jpeg8/lib
mkdir /usr/local/jpeg8/bin
mkdir /usr/local/jpeg8/man/man1/ -p
tar zxvf jpegsrc.v8d.tar.gz
cd jpeg-8d
./configure --prefix=/usr/local/jpeg8 --enable-shared --enable-static
make && make install
echo "/usr/local/jpeg8/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://google-desktop-for-linux-mirror.googlecode.com/files/gd-2.0.35.tar.gz
mkdir /usr/local/gd2
tar zxvf gd-2.0.35.tar.gz
cd gd/2.0.35
cp /usr/local/libpng2/include/pngconf.h {$sourcepath}gd/2.0.35/
./configure --prefix=/usr/local/gd2 --with-zlib=/usr/local/zlib --with-jpeg=/usr/local/jpeg8 --with-freetype=/usr/local/freetype2 --with-xml=/usr/local/libxml2 --with-png=/usr/local/libpng2 --with-fontconfig=/usr/local/fontconfig --with-slt=/usr/local/libxslt
make && make install
echo "/usr/local/gd2/lib" >> /etc/ld.so.conf
ldconfig
cd {$sourcepath}
wget http://fossies.org/linux/misc/giflib-4.1.6.tar.gz
tar zxvf giflib-4.1.6.tar.gz
cd giflib-4.1.6
./configure
make && make install
cd {$sourcepath}
wget http://www.php.net/get/php-5.4.0.tar.gz/from/cn2.php.net/mirror
tar zxf php-5.4.0.tar.gz
cd php-5.4.0
./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=shared --with-jpeg-dir=/usr/local/jpeg8 --with-png-dir=/usr/local/libpng2 --enable-gd-native-ttf --with-zlib-dir=/usr/local/zlib --with-freetype-dir=/usr/local/freetype2 --enable-zip --with-libxml-dir=/usr/local/libxml2 --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-pdo-pgsql=/usr/local/pgsql --with-curl --with-mcrypt=/usr/local/libmcrypt --enable-mbstring=all --with-mhash --enable-soap --enable-sockets --with-pear --enable-gd-native-ttf --enable-ftp --disable-ipv6 --with-iconv
make
make test
make install
修改/usr/local/apache2/conf/httpd.conf
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
下面添加
PHPIniDir "/etc"
AddType application/x-httpd-php .php
重启apache,搞定!

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

“你的组织要求你更改PIN消息”将显示在登录屏幕上。当在使用基于组织的帐户设置的电脑上达到PIN过期限制时,就会发生这种情况,在该电脑上,他们可以控制个人设备。但是,如果您使用个人帐户设置了Windows,则理想情况下不应显示错误消息。虽然情况并非总是如此。大多数遇到错误的用户使用个人帐户报告。为什么我的组织要求我在Windows11上更改我的PIN?可能是您的帐户与组织相关联,您的主要方法应该是验证这一点。联系域管理员会有所帮助!此外,配置错误的本地策略设置或不正确的注册表项也可能导致错误。即

Windows11将清新优雅的设计带到了最前沿;现代界面允许您个性化和更改最精细的细节,例如窗口边框。在本指南中,我们将讨论分步说明,以帮助您在Windows操作系统中创建反映您的风格的环境。如何更改窗口边框设置?按+打开“设置”应用。WindowsI转到个性化,然后单击颜色设置。颜色更改窗口边框设置窗口11“宽度=”643“高度=”500“>找到在标题栏和窗口边框上显示强调色选项,然后切换它旁边的开关。若要在“开始”菜单和任务栏上显示主题色,请打开“在开始”菜单和任务栏上显示主题

默认情况下,Windows11上的标题栏颜色取决于您选择的深色/浅色主题。但是,您可以将其更改为所需的任何颜色。在本指南中,我们将讨论三种方法的分步说明,以更改它并个性化您的桌面体验,使其具有视觉吸引力。是否可以更改活动和非活动窗口的标题栏颜色?是的,您可以使用“设置”应用更改活动窗口的标题栏颜色,也可以使用注册表编辑器更改非活动窗口的标题栏颜色。若要了解这些步骤,请转到下一部分。如何在Windows11中更改标题栏的颜色?1.使用“设置”应用按+打开设置窗口。WindowsI前往“个性化”,然

您是否在Windows安装程序页面上看到“出现问题”以及“OOBELANGUAGE”语句?Windows的安装有时会因此类错误而停止。OOBE表示开箱即用的体验。正如错误提示所表示的那样,这是与OOBE语言选择相关的问题。没有什么可担心的,你可以通过OOBE屏幕本身的漂亮注册表编辑来解决这个问题。快速修复–1.单击OOBE应用底部的“重试”按钮。这将继续进行该过程,而不会再打嗝。2.使用电源按钮强制关闭系统。系统重新启动后,OOBE应继续。3.断开系统与互联网的连接。在脱机模式下完成OOBE的所

任务栏缩略图可能很有趣,但它们也可能分散注意力或烦人。考虑到您将鼠标悬停在该区域的频率,您可能无意中关闭了重要窗口几次。另一个缺点是它使用更多的系统资源,因此,如果您一直在寻找一种提高资源效率的方法,我们将向您展示如何禁用它。不过,如果您的硬件规格可以处理它并且您喜欢预览版,则可以启用它。如何在Windows11中启用任务栏缩略图预览?1.使用“设置”应用点击键并单击设置。Windows单击系统,然后选择关于。点击高级系统设置。导航到“高级”选项卡,然后选择“性能”下的“设置”。在“视觉效果”选

在Windows11上的显示缩放方面,我们都有不同的偏好。有些人喜欢大图标,有些人喜欢小图标。但是,我们都同意拥有正确的缩放比例很重要。字体缩放不良或图像过度缩放可能是工作时真正的生产力杀手,因此您需要知道如何对其进行自定义以充分利用系统功能。自定义缩放的优点:对于难以阅读屏幕上的文本的人来说,这是一个有用的功能。它可以帮助您一次在屏幕上查看更多内容。您可以创建仅适用于某些监视器和应用程序的自定义扩展配置文件。可以帮助提高低端硬件的性能。它使您可以更好地控制屏幕上的内容。如何在Windows11

屏幕亮度是使用现代计算设备不可或缺的一部分,尤其是当您长时间注视屏幕时。它可以帮助您减轻眼睛疲劳,提高易读性,并轻松有效地查看内容。但是,根据您的设置,有时很难管理亮度,尤其是在具有新UI更改的Windows11上。如果您在调整亮度时遇到问题,以下是在Windows11上管理亮度的所有方法。如何在Windows11上更改亮度[10种方式解释]单显示器用户可以使用以下方法在Windows11上调整亮度。这包括使用单个显示器的台式机系统以及笔记本电脑。让我们开始吧。方法1:使用操作中心操作中心是访问

Windows上的激活过程有时会突然转向显示包含此错误代码0xc004f069的错误消息。虽然激活过程已经联机,但一些运行WindowsServer的旧系统可能会遇到此问题。通过这些初步检查,如果这些检查不能帮助您激活系统,请跳转到主要解决方案以解决问题。解决方法–关闭错误消息和激活窗口。然后,重新启动计算机。再次从头开始重试Windows激活过程。修复1–从终端激活从cmd终端激活WindowsServerEdition系统。阶段–1检查Windows服务器版本您必须检查您使用的是哪种类型的W
