centos apache2 php mysql_CentOS5 下安装Apache2+PHP5+MySQL

安装apache

# tar -zvxf httpd-2.2.14.tar.gz

# cd httpd-2.2.14

# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite

# make

# make install

安装MySQL

#yum -y install mysql-server

#yum -y install mysql-devel

安装 jpeg7

建立目录:

# mkdir -p /usr/local/jpeg7

# mkdir -p /usr/local/jpeg7/bin

# mkdir -p /usr/local/jpeg7/lib

# mkdir -p /usr/local/jpeg7/include

# mkdir -p /usr/local/jpeg7/man

# mkdir -p /usr/local/jpeg7/man1

# mkdir -p /usr/local/jpeg7/man/man1

# tar -zvxf jpegsrc.v7.tar.gz

# cd jpeg-7

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

# make; make install

安装libpng

# tar -zvxf libpng-1.2.40.tar.gz

# cd  libpng-1.2.40

# cp scripts/makefile.linux makefile

# make

# make install

安装 freetype

# tar -zvxf freetype-2.1.10.tar.gz

# cd freetype-2.1.10

# mkdir -p /usr/local/freetype

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

# make

# make install

安装zlib

#tar -zxvf zlib-1.2.3.tar.gz

#cd zlib.1.2.3

# ./configure

# make

# make install

安装GD库

# tar -zvxf  gd-2.0.35.tar.gz

# cd  gd-2.0.35

# ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg7/ --with-png=/usr/local/lib/ --with-zlib=/usr/local/lib/  --with-freetype=/usr/local/freetype/

# make

# make install

安装PHP

# rpm -ivh libxml2-2.6.26-2.1.2.8.i386.rpm

# rpm -ivh libxml2-devel-2.6.26-2.1.2.8.i386.rpm

# rpm -ivh pkgconfig-0.21-2.el5.i386.rpm

# yum -y install curl

# tar -zxvf php-5.2.10.tar.gz

# cd  php-5.2.10

# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql=/usr/local/mysql --with-gd=/usr/local/gd2/ --with-curl --with-jpeg-dir=/usr/local/jpeg7 --with-freetype-dir=/usr/local/freetype/

#如果上面的登录发生 mysql configure failed 错误 则先执行下面的配置,再执行上面配置就行(好像是第一次执行不能包括GD库)

# ./configure --prefix=/usr/local/php  --with-mysql=/usr/local/mysql

# make

# make install

# cp php.ini-recommended /usr/local/lib

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值