# cp ociheaders.tar /opt/oracle/product/9.2.0/network/rdbms/demo/
# cd cd /opt/oracle/product/9.2.0/network/rdbms/demo
# tar xvf ociheaders.tar
# tar zxvf php-4.3.2.tar.gz
# cd php-4.3.2
# ./configure --prefix=/opt/php --with-zlib
--with-apxs2=/opt/apache/bin/apxs --disable-xml --without-mysql
--with-oci8=/opt/oracle/product/9.2.0
--with-config-file-path=/opt/php/etc/php.ini
--disable-rpath --without-pear
# make
# make install
# mkdir /usr/local/php/etc
# cp /home/peng/php-4.3.2/etc/php.ini-disk /usr/local/php/etc/php.ini/php.ini
# vi /usr/local/php/etc/php.ini/php.ini
5 配置软件:
5.1、启动 odb 主机上的 oracle:
以 oracle 用户登陆:
启动数据库
$ Sqlplus “ / as sysdba”
SQL>startup
启动监听程序
$ lsnrctl
5.2、配置 apache2:
# vi /opt/apache/conf/httpd.conf
添加:AddType application/x-httpd-php .php
更改下列选项如下:
Listen 211.11.11.11:80 --你的发布主机 ip
User nobody
Group nobody
DirectoryIndex index.html index.php
AddDefaultCharset Off
5.3 配置 php:
# vi /usr/local/php/etc/php.ini/php.ini
更改:
register_global =Off 为 register_global =On
5.4 配置 oracle client:
# vi /opt/oracle/product/9.2.0/network/admin/tnsnames.ora