折腾了一个下午,终于在gentoo下安装成功。安装过程都是记忆中仅存的,系统环境为去年某时装的gentoo 2007.0 amd64,由于gentoo下没有安装桌面环境,所以在一台windows的机器上装了xming,设置xming的启动参数增加-ac,否则gentoo在设置了DISPLAY后会提示connect refuse的信息。
安装前的准备工作:
1: 增加用户和组
groupadd -g 10000 dba
groupadd -g 10001 oinstall
useradd -u 10000 -g dba -G dba,oinstall -s /sbin/bash -m -d /oracle oracle
2:安装一些需要(也许需要,因为除了错误就找解决的方法,安装了以下的)软件包
emerge sun-jdk libaio logger libstdc++-v3 app-emulation/emul-linux-x86-baselibs app-emulation/emul-linux-x86-xlibs
3:设置oracle用户的.bash_profile
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/11g
export ORA_CRS_HOME=$ORACLE_BASE/crs
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=orcl1
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:${PATH}:$HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/lib
export LIBPATH=$LIBPATH:$ORA_CRS_HOME/lib:$ORACLE_HOME/lib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/JRE
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
export NLS_LANG=american_america.WE8ISO8859P1
export DISPLAY=10.60.4.137:0
export EDITOR=vi
4:sysctl
kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144
5:安装oracle
su – oracle
cd database
./runInstaller
安装过程中碰到的问题:
Error 1: undefined reference to __pthread_unwind@GLIBC_PRIVATE 解决方法: 编辑$ORACLE_HOME/lib/sysliblist,在-ldl -lm -lpthread -lnsl -lirc -lipgo后加-lrt Error 2: cannot find -lagtsh 解决方法: 将database/stage/Components/oracle.rdbms.util/11.1.0.6.0/1/DataFiles/filegroup14.jar文件解压缩,copy 32位的libagtsh.so.1.0文件到$ORACLE_HOME/lib32目录中 Error 3: skipping incompatible /usr/lib64/libpthread_nonshared.a when searching for /usr/lib64/libpthread_nonshared.a 解决方法: 修改$ORACLE_HOME/bin/genclntsh: [ "$1" = "lib32" ] && ULIB="lib32" && LOOP="DONE" && CF=-m32 && USRLIB32=-L/usr/lib32 LD="gcc ${CF} -shared -Wl,-relax ${STUBS} ${USRLIB32} -L${OLIB}" 修改$ORACLE_HOME/bin/genagtsh: if [ $1 != "-32" ]; then LIB_NAME=$1 # Library name LIB_VER=$2 # Library version number LIB=lib NON64_LDOPT= USRLIB32= else LIB_NAME=$2 # Library name LIB_VER=$3 # Library version number LIB=lib32 LOOP="done" NON64_LDOPT="-m32" USRLIB32=-L/usr/lib32 fi LD="gcc ${NON64_LDOPT} -shared ${USRLIB32} -L${ORACLE_HOME}/${LIB} -L${ORACLE_HOME}/${LIB}/stubs" 修改$ORACLE_HOME/ctx/lib/env_ctx.mk: LDFLAGS32=$(AMD32FLAGS) -o $@ -L/usr/lib32 $(LDPATHFLAG)$(PRODLIBHOME32) $(LDPATHFLAG)$(LIBHOME32) $(LDPATHFLAG)$(LIBHOME32)stubs/ 修改$ORACLE_HOME/rdbms/lib/env_rdbms.mk: REDEFINES32=LIBDIR=lib32 LDFLAGS='-m32 -o $$@ -L/usr/lib32 $$(LDPATHFLAG)$$(PRODLIBHOME) $$(LDPATHFLAG)$$(LIBHOME) $$(LDPATHFLAG)$$(LIBHOME)stubs/' Error 4: cannot find -lclntsh 解决方法: 下载oracle client 32bit的zip包,解压缩,然后将client/stage/Components/oracle.rdbms.ic/11.1.0.6.0/1/DataFiles/filegroup4.jar文件解压缩,copy 32位的libclntsh.so.11.1文件到$ORACLE_HOME/lib32目录中 Error 5: gcc: /usr/lib64/libstdc++.so.6: No such file or directory 解决方法: cd /usr/lib64/ ; ln -s libstdc++.so.5 libstdc++.so.6
参考:
没有评论:
发表评论