安裝oracle+php+apache出現的新問題

huakaibird發表於2006-11-18

首先安裝ora10

解壓cpio: cpio -idmv < 檔名
rpm -Uvh --force rpm包

hehe,Note:169706.1 is very good, you can check it by yourself.
Linux x86_64 EM64T AMD64 Patches/
Packages

Red Hat Enterprise Linux 4.0:

binutils-2.15.92.0.2-13.0.0.0.2.x86_64 Download here or you can install binutils-2.15.92.0.2-18.x86_64.rpm from RHEL4 Update 3.
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-22.1
gcc-c++-3.4.3-22.1
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1.x86_64
libstdc++-3.4.3-22.1.x86_64
libstdc++-devel-3.4.3-22.1.x86_64
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2

needed RPMS for RHEL4 not mentioned in Install Guide/Release Notes (Ref. Note 339510.1)
compat-libstdc++-33-3.2.3-47.3.x86_64.rpm
compat-libstdc++-33-3.2.3-47.3.i386.rpm
glibc-kernheaders-2.4-9.1.87.x86_64.rpm
glibc-headers-2.3.4-2.9.x86_64.rpm
libaio-0.3.103-3.i386.rpm
libaio-0.3.103-3.x86_64.rpm
glibc-devel-2.3.4-2.9.x86_64.rpm
glibc-devel-2.3.4-2.9.i386.rpm
ORBit-0.5.17-14.i386.rpm
gnome-libs-1.4.1.2.90-44.1.i386.rpm

glibc-devel-2.3.4-2.9.x86_64.rpm
glibc-devel-2.3.4-2.9.i386.rpm
這兩個包一定要同時裝,同時linux自帶的binutils-2.15.92.0.2-15.0.0.0.2.x86_64是有問題的
重新下載在03_095811_1130768958資料夾中


groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle


mkdir /opt/ora10
cd /opt/ora10
mkdir product
cd product
mkdir 10.2
chown -R oracle:oinstall /opt/ora10*


編輯/etc/sysctl.conf
新增
kernel.core_uses_pid = 1
kernel.shmmax = 1024000000
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

執行命令 sysctl -p 是核心引數設定生效
設定環境:
切換到oracle使用者,編輯.bash_profile

export ORACLE_BASE=/opt/ora10
export ORACLE_HOME=/opt/ora10/product/10.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=big20
export ORACLE_TERM=xterm
export LD_ASSUME_KERNEL=2.4.19
export THREADS_FLAG=native
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/lib64:/usr
/lib64:$ORACLE_HOME/lib/stubs:$ORACLE_HOME/:$ORACLE_HOME/network/lib
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export NLS_LANG=AMERICAN_AMERICA.zhs16cgb231280


安裝
建立資料庫的時候注意nls_characterset

然後安裝apache 2.2.3

run檔案

./configure
"--prefix=/opt/apache"
"--enable-shared=max"
"--enable-module=most"
make

make install

然後安裝php 5.1.6

run檔案

rm config.cache
./configure --prefix=/opt/php
--with-apxs2=/opt/apache/bin/apxs
--enable-gd
--with-regex=system
--enable-calendar
--without-imap
--enable-versioning
--with-oci8=/opt/ora10/product/10.2
--without-mysql
--without-pgsql
--enable-dba
--enable-dbase
--enable-filepro
--with-config-file-path=/opt/php/etc
--with-fdftk=no
--enable-debug=no
--enable-magic-quotes
--enable-debugger
--enable-bcmath
--enable-ftp
--with-pcre-regex
--without-ldap
--with-xml=shared,/usr
--without-mm
--enable-track-vars
--enable-safe-mode
--with-exec-dir=/usr/bin
--with-system-regex
--with-dom
--with-zlib-dir=/usr/lib
--with-iconv

make

make install

安裝完畢,用oci8的ocilogon老是提示錯誤

Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set

以前在ora8和ora9時沒有這個問題,後來上網發現是ora10的目錄有嚴格的限制,

處理辦法

find $ORACLE_HOME ( -perm 750 -o -perm 640 ) -print|wc -l

chmod -R o+rx $ORACLE_HOME

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/545828/viewspace-878153/,如需轉載,請註明出處,否則將追究法律責任。

相關文章