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


猜你喜欢
- 更新!一个没有采用最新的安全补丁进行更新的系统会很快称为攻击者的目标。已经完成配置安全系统所需的所有工作之后,要记住:CGI脚本将是最大的安
- 在linux 没有实现epoll事件驱动机制之前,我们一般选择用select或者poll等IO多路复用的方法来实现并发服务程序。在linux
- 据电信市场研究与咨询公司Dittberner Associates公布的最新研究报告显示,今年一季度,中国的固定宽带用户已经超过美国在全球固
- 本文实例为大家分享了Linux内存泄漏检测的shell脚本,供大家参考,具体内容如下#!/bin/shif [ $# -ne 1 ]; th
- 10月16日消息,对于大多数企业来说,升级到微软公司即将推出的操作系统Windows 7是不可避免的趋势。全球技术研究和咨询公司Gartne
- apache|服务器|高级作为系统管理员,若你只有一个IP地址,却有好几个域名,又要求访问每个域名都要看到不同的内容,那怎么办?总不至于为每
- 1 各种搜索引擎的基本原理目录式搜索引擎是以人工方式或半自动方式搜集信息,由编辑员查看信息之后,人工形成信息摘要,并将信息置于事先确定的分类
- Virtual Box的host-only网络使用Host-only可以在VirtualBox中可以建立一个内部的局域网,而且还可以使得主机
- 一个网站数据完全采集,目前大概3w条,没有生成tag 所以taglist这个表中没有内容 我就不用清理这个了下面看我的步骤原始图没有截下来1
- 一、使用 mod_vhost_alias1、简单的动态虚拟主机# 从 Host: 头中取得服务器名字 Server NameUseCanon
- 1、点击Godaddy进入网站进行购买。2、点击Hosting打开下拉菜单,点击Web Site Hosting进入主机方案列表。操作过程如
- 1.在百度提交网址 但现在百度自动收录的速度已经让众人所知,所以提出以下的方法。供我亲爱的朋友们、战友们以及我核心团队的兄弟姐妹们参考,最后
- DMOZ是什么?Dmoz(The Open Directory Project/ODP)是一个人工编辑管理的目录集合,为 搜索引擎提供结果或
- 在上一篇博文https://www.jb51.net/article/100521.htm中未设置的openwrt无法连接外网本文增加网络设
- 有时在我们刺探竞争对手的情报时,会发现:此站既没有客观的外链,内容又谈不上多好。可为什么就是排名比我好呢?我曾经遇到过这样的情况,起初也未太
- 由于众所周知的原因,微软的产品总能吸引黑客们的目光,IIS也不例外。IIS是什么?即因特网信息服务,作为当今流行的Web服务器之一,它提供了
- 有了这些理论的基础就可以分析一下ajax的具体实现了,下面就以注册过程中的检查用户名在数据库是不是存在并给用户提示这样一个ajax过程进行全
- 内容摘要:核心提示:什么样的网站才是好网站,怎样的网站优化才能让用户更喜欢?这里解析企业网站应如何将用户体验与搜索引擎优化相结合
- 从做网赚到现在,大概也差不多二年多了!看标题,想赚钱的人肯定是希望透露最新最赚钱的网赚项目,不过,这里也没有什么好的网赚项目介绍给大家的,因
- 网络赚钱,简称网赚,英文名make-money-online。指单纯通过网络手段,赚取现实中的现金。大多数人对这个概念的印象非常理想:点点鼠