Chinaunix首页 | 论坛 | 博客
  • 博客访问: 308388
  • 博文数量: 63
  • 博客积分: 1997
  • 博客等级: 上尉
  • 技术积分: 690
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-29 11:17
文章分类

全部博文(63)

文章存档

2010年(26)

2009年(37)

我的朋友

分类: LINUX

2009-04-20 14:00:07

 

一、首先apache安装

安装apache-2.2.6.tar.gz

#Cd /backup/soft

#tar –zvxf httpd-2.2.6.tar.gz

#cd httpd-2.2.6

#./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --disable-userdir

# make

# make install

设置开机启动

# echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local

 

二、安装GD(让php支持GIF,PNG,JPEG

 

a、安装jpeg6

#mkdir –p /usr/local/jpeg6

# mkdir –p /usr/local/jpeg6/bin

# mkdir –p /usr/local/jpeg6/lib

# mkdir –p /usr/local/jpeg6/include

# mkdir –p /usr/local/jpeg6/man

# mkdir –p /usr/local/jpeg6/man1

# mkdir –p /usr/local/jpeg6/man/man1

#cd /backup/soft

#tar –zvxf jpegsrc.v6b.tar.gz

#cd jpeg-6b

#./configure –prefix=/usr/local/jpeg6 –enable-shared –enable-static

如果是centOS5版本,需要copy两个安装文件

Cp /usr/share/libtool/config.guess .

Cp /usr/share/libool/config.sub .

然后如下操作

#vi Makefile

找到CFLAGS= -g –O2 后面加上 –fPIC 然后安装

#make && make install

注意:如果是centos564位)会出现如下问题:checking host system type… Invalid configuration `x86_64-unknown-linux-gnu ‘: machine `x86_64-unknown ‘ not recognized
checking build system type… Invalid configuration `x86_64-unknown-linux-gnu ‘: machine `x86_64-unknown ‘ not recognized
configure: error: libtool configure failed

解决方法如下:上面的错误是说libtool的版本太低或者没有安装上

可以先检查一下rpm –qa | grep libtool 如果没有就直接yum安装。

 

b、安装zlib

#cd /backup/soft

#tar –zvxf zlib-1.2.3.tar.gz

#cd zlib-1.2.3

#./configure

#vi Makefile

找到CFLAGS=-03 –DUSE_MMAP 在后面加上 –fPIC

#make && make install

 

c、安装libpng

#cd /backup/soft

#tar –zvxf libpng-1.2.24.tar.gz

#cd libpng-1.2.24

#cp scripts/makefile.gcmmx makefile

#./configure –prefix=/usr/local/libpng2

#vi Makefile

找到CFLAGS= -g –O2后面加上 –fPIC

#make && make install

 

d、安装freetype

#cd /backup/soft

#tar –zvxf freetype-2.2.1.tar.gz

#cd freetype-2.2.1

#./configure –prefix=/usr/local/freetype

#make && make install

 

e、安装gd

#cd /backup/soft

#tar –zvxf gd-2.0.34.tar.gz

#cd gd-2.0.34

# ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6 --with-p

ng=/usr/local/libpng2 --with-zlib-dir --with-freetype=/usr/local/freetype

#vi Makefile

找到CFLAGS= -O2 –l$(srcdir) 后面加上 –fPIC

注意:这里要注意的是,在gd-2.0.35  gd-2.0.33  gd-2.0.36RC1里面只能找到CFLAGS= -O2并没有后面的–l$(srcdir)故此就算把-fPIC加上,也毫无作用。

 

f、安装curl

#cd /backup/soft

#tar –zvxf curl-7.15.0.tar.gz

#./configure –prefix=/usr/local/curl

#make && make install

 

三、安装 mysql

 

注:如果服务端是32位的,客户端是64位的,这样如果都是二进制版本的是可以连通的。

添加mysql用户及用户组
# groupadd mysql
# useradd -g mysql mysql

#cd /backup/soft

#tar –zvxf mysql-5.0.77-linux-x86_64-glibc23.tar.gz

#mv mysql-5.0.77-linux-x86_64-glibc23.tar.gz /usr/local/mysql

#cd /usr/local/mysql

#chown –R root /usr/local/mysql

#chgrp –R mysql /usr/local/mysql

#chown –R mysql /usr/local/mysql/data

# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

# /usr/local/mysql/scripts/mysql_install_db –user=mysql

# /usr/local/mysql/bin/mysqld_safe –user=mysql &

#ps –ef |grep mysql 看看mysql是否启动

 

 

四、安装php

a、安装libxml2

#cd /backup/soft

#tar –zvxf libxml2-2.6.30.tar.gz

#cd libxml2-2.6.30

#./configure –prefix=/usr/local/libxml2

#make && make install

#echo ‘/usr/local/libml2/lib’ >>/etc/ld.so.conf

#ldconfig –v 至此安装正常

 

b、安装libxslt

#cd /backup/soft

#tar –zvxf libxslt-1.1.24.tar.gz

#cd libxslt-1.1.24

#mkdir /usr/local/libxslt 这里一定要创建,不然不能自动安装这个路径

#./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2

#make && make install

 

c、安装php

#cd /backup/soft

#tar –zvxf php-5.2.4.tar.gz

#cd php-5.2.4

#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2 --with-gd=/usr/local/gd2 --with-xsl=/usr/local/libxslt --with-jpeg-dir=/usr/local/jpeg6 --with-zlib-dir=/usr/local/lib --with-png-dir --with-freetype-dir=/usr/local/freetype --with-curl=/usr/local/curl --enable-soap --enable-gd-native-ttf --enable-ftp #make && make install

#cp php.ini-dist /usr/local/php/etc/php.ini

 

五、配置apache2让他支持php

配置 httpd.conf apache支持PHP
# vi /export1/server/apache/conf/httpd.conf
找到 AddType application/x-gzip .gz .tgz 在其下添加如下内容
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

重启apache
# /export1/server/apache/bin/apachectl restart

 

阅读(2362) | 评论(1) | 转发(0) |
0

上一篇:没有了

下一篇:apache+jboss+jdk配置动静分离(64位操作系统)

给主人留下些什么吧!~~

chinaunix网友2009-04-21 10:24:15

正在研究64位的安装呢,好文,收藏先,谢谢啊