免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1905 | 回复: 0
打印 上一主题 下一主题

php5+apache2+sqlite3+pdo_sqlite白痴安装文档 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-29 09:52 |只看该作者 |倒序浏览
一.安装expect-5.42.1-1.i386.rpm
rpm -ivh expect-5.42.1-1.i386.rpm
二.sqlite 安装配置
1. tar xzvf sqlite-3.3.8.tar.gz
2. cd sqlite-3.3.8
3. ./configure --disable-tcl --prefix=/usr/local/sqlite3
4. make
5. make install
6. make doc
7. cp /usr/local/sqlite3/include /usr/include
8. cp /usr/local/sqlite3/lib/lib* /usr/lib/
9. cp /usr/local/sqlite3/bin/sqlite3 /bin/
三.安装apache
1.  tar xzvf httpd-2.2.3.tar.gz
2.  cd httpd-2.2.3
3.  ./configure --prefix=/usr/local/apache2 --enable-module=so --enable-so
4.  make
5.  make install
四.安装php
php 5 安装配置
1. tar xzvf php-5.2.0.tar.gz
2. cd php-5.2.0
2. ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-pdo=shared --with-sqlite=shared --with-pdo-sqlite=shared --with-zlib
3  make
4  make install
5. cp php-5.2.0/php.ini-dist /usr/local/php/lib/php.ini
6. cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ /usr/local/php/include/php/ext/pdo/

五. 配置 /usr/local/php/lib/php.ini
1. 修改extension_dir = "/"
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/php/include/php/ext/pdo/"
; Whether or not to enable the dl() function.  The dl() function does NOT work
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
2. 增加extension
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
六 修改/usr/local/apache2/conf/httpd.conf文件;
1. 修改ServerAdmin
ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g.
admin@your-domain.com
#
ServerAdmin
dingy@keyou.cn
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
2. 修改ServerName
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName
www.example.com:80
ServerName
www.hacgui.com
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
3. 增加AddDefaultCharset gb2312
AddDefaultCharset gb2312
4. 可选[修改apache默认目录:]
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/apache2/htdocs"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
DocumentRoot "/var/www/html/HAC/www/"
-----------------------------------------------------------
5. 增加php type
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps
七. 启动, 关闭Apache 服务器:
   /usr/local/apache2/bin/apachectl start
    /usr/local/apache2/bin/apachectl stop.
八. 测试,在apache 的主目录下增加info.php 文件
info.php文件内容如下
通过web测试,web页面上找到sqlite,pdo_sqlite项说明安装成功


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6038/showart_222895.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP