Apache+PHP5.0+GD+Zend+Mysql的配置(2)

来源:asp之家 时间:2010-05-07 18:27:00 

 

安装:

##### zlib #####


cd zlib-1.2.2

./configure

make

make install

cd ..


##### OpenSSL #####


cd openssl-0.9.7g

./config --prefix=/usr/local/ssl \

--openssldir=/usr/local/ssl \

shared \

zlib


make

make install

ln -s /usr/local/ssl /usr/lib/ssl

cd .. ##### MySQL #####


cd mysql-4.0.24


编辑 sql/mysqld.cc :

搜索:&max_connections, 0, GET_ULONG, REQUIRED_ARG, 100, 1, 16384, 0, 1,

修改:&max_connections, 0, GET_ULONG, REQUIRED_ARG, 1000, 1, 16384, 0, 1,


groupadd mysql

useradd -g mysql mysql


./configure \

--prefix=/server/mysql \

--sysconfdir=/server/mysql \

--without-isam \

--without-debug \

--enable-assembler \

--with-unix-socket-path=/tmp/mysql.sock \

--with-mysqld-user=mysql \

--with-extra-charset=all \

--with-client-ldflags=-all-static \

--with-mysqld-ldflags=-all-static \

--localstatedir=/data/mysql/data


如果出现了以下错误:

checking for tgetent in -ltermcap... no

checking for termcap functions library... configure: error: No curses/termcap library found

说明 curses/termcap 库没有安装

apt-cache search curses | grep lib

安装 libncurses5-dev ,然后重新运行配置


mkdir /data

mkdir /data/mysql

mkdir /data/mysql/data


make

make install


/server/mysql/bin/mysql_install_db --user=mysql


chown -R mysql /data/mysql

chgrp -R mysql /data/mysql

chown -R root /server/mysql

chgrp -R mysql /server/mysql

cp /server/mysql/share/mysql/my-medium.cnf /server/mysql/my.cnf


/server/mysql/share/mysql/mysql.server start

/server/mysql/bin/mysqladmin -u root password 123456789

cd ..

##### 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信息,说明你的配置就正确了。

标签:apache,php,zend,mysql
0
投稿

猜你喜欢

  • 深度分析 谷歌搜索引擎蜘蛛等级那些事儿

    2008-12-12 14:08:00
  • 游戏团队月薪3500雇人玩魔兽 欲搞测评挣钱

    2009-11-27 08:49:00
  • 网络美女YUMMY教你做美图:闪图DIY篇

    2009-11-23 08:57:00
  • RHCE桥接,免密登录和修改端口号介绍

    2023-08-31 05:18:46
  • SEO入手统筹优化步骤

    2009-08-23 09:55:00
  • Windows7 64位 旗舰版下VirtualBox 4.3.12安装教程

    2022-06-23 13:46:06
  • 个人网站快速发展就那么几大绝招

    2008-08-29 12:54:00
  • Vmware vSphere 5.0安装配置方法图文教程

    2022-05-11 11:53:52
  • 关于WordPress需要知道的100件事:主题篇

    2011-04-18 12:31:00
  • 在线拍照---网页flash启动不了摄像头的解决方法

    2011-06-25 19:44:41
  • 如何与国外主机商有效沟通

    2010-03-30 10:59:00
  • PHP网站服务器管理软件LuManager1.1.9发布

    2011-06-16 20:30:39
  • 关键字广告 事半功倍做营销提高你的转化率

    2009-03-16 11:02:00
  • Google帐户已允许绑定多个关联邮箱

    2008-01-21 17:10:00
  • Discuz称将推独立插件满足phpwind用户QQ接入需求

    2011-07-13 18:29:28
  • 谷歌退出中国是一场没有胜利者的战争

    2010-03-24 12:24:00
  • 网站降权的急救方法

    2007-11-19 12:51:00
  • DEDE:footer调用新方法,解决整站调用footer

    2009-05-12 10:49:00
  • Opera发布网络信息交互技术Opera Unite测试版

    2009-10-14 18:00:00
  • 十大WordPress博客的SEO优化方案

    2008-11-06 13:20:00
  • asp之家 网站运营 m.aspxhome.com