扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
##### Apache2 #####
cd httpd-2.0.54
./configure --prefix=/usr/local/apache --enabe-so --enable-ssl(如果不修改默认参数就直接安装就可以了)
make
make install
cd ..
修改 Apache 配置文件 /server/httpd/conf/httpd.conf :
DirectoryIndex index.html index.php
找到AddType application/x-gzip .gz .tgz
加入:AddType application/x-httpd-php .php
保存就可以了。
cd freetype-2.1.10
./configure --prefix=/usr/local/freetype
make
make install
cd ..
##### LibPNG #####
cd libpng-1.2.8
cp scripts/makefile.linux makefile
make test
make install
cd ..
##### Jpeg #####
cd jpeg-6b
mkdir /usr/local/jpeg
mkdir /usr/local/jpeg/bin
mkdir /usr/local/jpeg/lib
mkdir /usr/local/jpeg/include
mkdir /usr/local/jpeg/man
mkdir /usr/local/jpeg/man/man1
./configure --prefix=/usr/local/jpeg --enable-shared
注意:这里configure一定要带--enable-shared参数,不然,不会生成共享库
make
make install
cd ..
##### GD Library #####
cd gd-2.0.33
./configure --prefix=/usr/local/gd \
--with-jpeg=/usr/local/jpeg \
--with-freetype=/usr/local/freetype \
--with-png \
--with-zlib
make
make install
cd ..
##### ClibPDF #####
cd ClibPDF/source
cp Makefile.Linux makefile
make
make install
cd ..
##### PHP #####
cd php-5.0.4
./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--enable-force-cgi-redirect \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-gd --enable-gd-native-ttf \
--with-ttf \
--with-gdbm \
--with-gettext \
--with-iconv \
--with-jpeg-dir=/usr \
--with-png \
--with-zlib \
--with-xml \
--enable-calendar \
--with-apxs=/usr/local/apache/bin/apxs
如果出现如下证明快成功了。
+--------------------------------------------------------------------+
│ License: │
│ This software is subject to the PHP License, available in this │
│ distribution in the file LICENSE. By continuing this installation │
│ process, you are bound by the terms of this license agreement. │
│ If you do not agree with the terms of this license, you must abort │
│ the installation process at this point. │
+--------------------------------------------------------------------+
make
make install
make clean
cp php.ini-dist /usr/local/lib/php.ini我的是放在/usr/local/php/lib/php.ini
##### Zend Optimizer #####
cd ZendOptimizer-2.5.10-linux-glibc21-i386
./install
Cd data
Cp ZendOptimizer.so /usr/local/lib
配置相应的php.ini目录,修改你所需的项。
测试
编辑文件index.php
Phpinfo();
>
放入/usr/local/apache/htdocs就可以看到php信息,说明你的配置就正确了
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者