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信息,说明你的配置就正确了。
猜你喜欢
- 首先打开IIS,找到我们的数据库。我们试一下是不是能够下载,正常的情况能够下载的。现在我们就开始配置IIS不让数据库被别人下载,我们在数据库
- 如果说中国的SEOer是“掘金者”,那么搜索引擎就是“金子”,从SEO在国内的兴起也有好几年年的时间,至今能在搜索引擎挖到“金”的SEOer
- 自从唐骏先生出任金和软件董事之后,媒体记者问得我最多的问题是:金和软件接下来还要做什么?我要说的是,金和有很多事情会引起大家关注,有的事情还
- Godaddy主机用户快来创建Google站长管理工具帐户吧,来为你提供一种你在创建你的共享托管账户时就可以用来立即登陆你的网站数据的站长管
- 说实话,没有人喜欢将自己的网站搬来搬去,可是有时候由于种种原因又不得不做出搬家的无赖选择。下面这篇文章来自谷歌网站管理员博客,看看,从搜索引
- 很多站长一天发200个论坛,也有站长一天内2个网上线。当然啦,勤能补拙是真理,但是不能把自己累死啊,这么累做包身工都比做网站赚钱啊!今天小弟
- 今天向往常一样打开我的雅虎邮箱,看到一个标题是《phpwinds与贵站建议长期合作关系!》,phpwinds?是那个著名的php论坛吗?不过
- 今天在浏览一个博客时,突然看到一句话“成功就是不断重复地做简单的事”,不禁让我联想起咱们做站何尝不是这样:记得刚开始做站的时候,总是不停地到
- 10月14日下午消息,继数月前推出芒果手机游戏乐园之后,湖南卫视金鹰网又推出“芒果游戏乐园”的网络游
- 上一讲我们介绍了帝国cms采集基本流程,那么我们这一讲介绍帝国cms如何采集内容分页。不少的同学在采集过程中,列表页和内容页都能可以很好地设
- PHPWind v7.3.2“引用”的返回链接如果链接到主题部分出错。解决方法:打开job.php查找:} elseif 
- 1、点击Godaddy进入网站进行购买。2、点击Hosting打开下拉菜单,点击Web Site Hosting进入主机方案列表。操作过程如
- 有Godaddy主机用户问怎样查看自己的网站的运行情况呢?可以使用WebmasterTools,你可以访问crawlstatistics,r
- 提起下载工具,大多数人会想到迅雷、快车、电驴等,可是提起迅雷,相信大多数人第一时间想到的肯定是下载工具。所以当迅雷在线以一种资讯类门户的姿态
- 一、前言随着email在企业里广泛使用,它已经成为传播病毒的最主要的手段,保护企业用户免受可能带病毒的邮件附件的感染,尤其是可执行文件的邮件
- 假设,我们需要在发布时间超过15天的文章中展示广告,我们今天只需要简单的设置一下代码,就能完成。第一步:功能实现起来很简单,用PHP编辑器打
- URL优化的重点就是把内容放在权重高的页面上,以下是各级目录的权重比较。1)目录的权重虽然搜索蜘蛛会捉取3级目录及以上的页面,但是一级目录的
- 在第一部分( 搜索引擎中图像优化漫谈(一)),我们讨论了优化用于网站或是博客图片和图像的一些基本方法。按照SEO的要求,把重要的东西放在第一
- 简单地说就是用流量换钱,如何用百度的流量去赚Google的钱呢?这得先从百度和Google的优势说起,百度号称全国最大的中文搜索,没错啊,中
- 已经了解了如何生成和添加广告代码,现在您关心的问题可能就是:怎么投放广告才能有更多的广告收入呢?下面我们就为您揭开提升网站广告收益的几大秘技