1. 程式人生 > 實用技巧 >Debain-4 安裝 oracle 12.2.0.1 資料庫database軟體

Debain-4 安裝 oracle 12.2.0.1 資料庫database軟體

首先:debian-4 預設發行版是無法安裝oracle12c的!原因是發行版的 [g]libc6版本、libstdc++6庫版本太低!

關鍵:既然知道了原因,升級就好了。問題就在於這兩個傢伙都是系統最最底層的支援庫,小白根本升級不了,弄不好系統就徹底崩潰了!

提示:測試、測試、再測試; 嘗試、嘗試、再嘗試!

我摸索出來的setup12c-for4.sh,內容如下:

#!/bin/sh

##gcc-4.1.2
##debian-4,buildin glibc version is 2.3.6
##in purpose to install oracle12c, must upgrade glic to 2.4
+ ,libstdc++ to 4.4.5-8 (gcc-base 4.4.5-8) function downfile () { bfile=$(basename $1) if [ ! -e ./${bfile} ] then echo download file : ${bfile} ... wget -c $1 echo download complete. else echo exists : ${bfile} fi } ######################################
cat <<eof>>/etc/profile export DISPLAY=192.168.157.1:0 alias cls=clear alias ll='ls -l --color' alias Grep=grep eof ###################################### ##for oracle12c downfile http://archive.debian.org/debian/pool/main/t/tzdata/tzdata_2011k-0lenny1_all.deb downfile http://archive.debian.org/debian/pool/main/g/glibc/libc6_2.7-18lenny7_amd64.deb
downfile http://archive.debian.org/debian/pool/main/g/glibc/locales_2.7-18lenny7_all.deb downfile http://archive.debian.org/debian/pool/main/g/glibc/libc6-dev_2.7-18lenny7_amd64.deb downfile http://archive.debian.org/debian/pool/main/b/binutils/binutils_2.18.1~cvs20080103-7_amd64.deb downfile http://archive.debian.org/debian/pool/main/l/linux-2.6/linux-libc-dev_2.6.26-29_amd64.deb downfile http://archive.debian.org/debian/pool/main/g/gcc-4.4/gcc-4.4-base_4.4.5-8_amd64.deb downfile http://archive.debian.org/debian/pool/main/g/gcc-4.4/libstdc++6_4.4.5-8_amd64.deb dpkg -l|grep libc6|grep 2.7-18lenny7 if [ $? -ne 0 ] then apt-get -y remove libc6-dev dpkg -i ./tzdata_2011k-0lenny1_all.deb dpkg -i ./libc6_2.7-18lenny7_amd64.deb dpkg -i ./locales_2.7-18lenny7_all.deb dpkg -i ./binutils_2.18.1~cvs20080103-7_amd64.deb fi dpkg -l|grep libc6-dev|grep 2.7-18lenny7 if [ $? -ne 0 ] then apt-get -f remove linux-kernel-headers dpkg -i ./binutils_2.18.1~cvs20080103-7_amd64.deb dpkg -i ./libc6-dev_2.7-18lenny7_amd64.deb fi dpkg -l|grep libstdc++|grep 4.4.5-8 if [ $? -ne 0 ] then dpkg -i ./gcc-4.4-base_4.4.5-8_amd64.deb dpkg -i ./libstdc++6_4.4.5-8_amd64.deb fi exit ###################################### #apt-get -y install wget man curl ftp telnet net-tools strace psmisc tree #apt-get -y install rlwrap #apt-get -y --force-yes install gcc make libc6-dev libaio-dev #apt-get -y --force-yes install xutils xbase-clients apt-get -y install gcc make libaio-dev apt-get -y install xutils xbase-clients ###################################### #ln -sf /bin/bash /bin/sh ln -s /usr/bin/awk /bin/ ln -s /usr/lib/x86_64-linux-gnu /usr/lib64 ###################################### groupadd oinstall useradd -g oinstall -m -s /bin/bash oracle mkdir /u01 chown oracle:oinstall /u01