免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1013 | 回复: 0
打印 上一主题 下一主题

Linux(X86_64)+Apache2.2.4+PHP5.2.3+Mysql5.0.45+GD2 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-27 15:46 |只看该作者 |倒序浏览
Linux(X86_64)+Apache2.2.4+PHP5.2.3+Mysql5.0.45+GD2+Zend配置方案
我的系统环境为:CentOS  64位操作系统
服务器为Dell 1950服务器
由于我全是用源代码安装,大多适用于其它的操作系统
由于CentOS与redhat的关系,基本是适用于redhat linux as 5
下载相关软件
wget
http://www.zlib.net/zlib-1.2.3.tar.gz
wget
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
wget
http://download.savannah.gnu.org ... eetype-2.3.5.tar.gz
wget
ftp://ftp.simplesystems.org/pub/ ... ibpng-1.2.18.tar.gz
wget
http://www.libgd.org/releases/gd-2.0.35.tar.gz
我全部是下载源代码编译方式进行安装的
一、先安装Mysql
groupadd mysql
useradd -g mysql mysql
tar zxvf  mysql-5.0.45.tar.gz
cd mysql-5.0.45
./configure --prefix=/usr/local/mysql
make
make install clean
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .    //后面有个点号,要注意了!
chgrp -R mysql .     //后面有个点号,要注意了!
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
bin/mysqld_safe --user=mysql &
如果没有出错的话,这里Mysql应该可以正常启动了。
如果编译时出现了以下错误:
checking for tgetent in -ltermcap... no
checking for termcap functions library... configure: error: No curses/termcap library found
说明 curses/termcap 库没有安装
去下载一个ncurses-5.6.tar.gz,
wget
http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf  ncurses-5.6.tar.gz
cd ncurses-5.6
./configure --prefix=/usr --with-shared --without-debug
make
make install clean
然后再重新编译Mysql进行安装。
二、安装GD库和GD库所需的环境
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install clean
如果编译的时候出现
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
错误,解决办法请点击查看
tar zxvf libpng-1.2.18.tar.gz
cd libpng-1.2.18
./configure
make
make install clean
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure
make
make install clean
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
make install-lib
如果在编译的时候出现
/usr/bin/ld: /usr/local/lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
错误,解决办法请点击查看
如果以上软件都安装成功了,就可以开始安装GD了
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --with-png --with-freetype --with-jpeg
编译的时候,最后结果那里可以看到
** Configuration summary for gd 2.0.35:
   Support for PNG library:          yes
   Support for JPEG library:         yes
   Support for Freetype 2.x library: yes
   Support for Fontconfig library:   no
   Support for Xpm library:          no
   Support for pthreads:             yes
   可以看到png 、 jpeg 、 freetype都已经安装上了
三、安装Apache2.2.4
tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache22 --enable-rewrite=shared --enable-speling=shared --enable-track-vars --enable-cgi --enable-so --enable-mods-shared=all
make
make install clean
安装完后使用/usr/local/apache22/bin/apachectl -k start可以启动
四、安装PHP5.2.3
tar zxvf php-5.2.3.tar.gz
cd php-5.2.3
./configure --prefix=/usr/local/php5 --with-mysql-dir=/usr/local/mysql  --with-apxs2=/usr/local/apache22/bin/apxs --with-jpeg  --with-freetype --enable-trace-vars --with-zlib --with-gd --enable-ftp --enable-sockets
make
make install
make clean
cp php.ini-dist /usr/local/php5/lib/php.ini
配置 httpd.conf 让apache支持PHP
vi /usr/local/apache/conf/httpd.conf
找到 AddType application/x-gzip .gz .tgz 在其下添加如下内容
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
重启Apache
/usr/local/apache22/bin/apachectl -k restart
编辑一个PHP页面进行测试一下phpinfo.php
五、安装Zend
去官方网站下载ZendOptimizer-3.3.0a-linux-glibc23-x86_64.tar.gz
tar zxvf ZendOptimizer-3.3.0a-linux-glibc23-x86_64.tar.gz
cd ZendOptimizer-3.3.0a-linux-glibc23-x86_64
./install.sh
根据提示安装
注意配置好PHP.ini文件的路径和Apache的Apachectl文件的路径
完成安装!

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32940/showart_368830.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP