国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Oracle > 正文

Debian Sarge 上安裝 Oracle 10g

2024-08-29 13:42:57
字體:
供稿:網(wǎng)友

  介紹一下我在Debian Sarge上安裝Oracle 10g的過程。首先說一下我的愛機(jī)配置情況:
AMD Duron 1.1G
RAM 512MB(Hy sdram 256*2)
Maxtor Diomand Plus 80G+40G

通過Oracle 官方認(rèn)證的系統(tǒng),只有redhat-2.1,redhat-3,Unitedlinux-1.0,并不包括對debian支持,所以在debian上安裝Oracle會多出一些額外的步驟。
一、安裝前的預(yù)備
1.硬件要求
Oracle建議內(nèi)存為512MB或以上,至少1G交換分區(qū),并且需要400MB的臨時目錄空間。
使用以下的命令查看你的內(nèi)存和交換分區(qū)大小:
# grep MemTotal /PRoc/meminfo
# grep SwapTotal /proc/meminfo

你可以使用以下方法添加臨時交換分區(qū):
su - root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap

可以通過以下命令查看臨時空間大小:
#df /tmp
可以自己新建臨時目錄,安裝完后再刪除
#su - root
#mkdir /opt/tmp
#chown root.root /opt/tmp/
# chmod 1777 /opt/tmp
# echo TEMP
# eXPort TEMP=/opt/tmp
# export TEMPDIR=/opt/tmp

對硬盤空間大小的限制,建議預(yù)留3G空間,我按照標(biāo)準(zhǔn)安裝,硬盤消耗接近1.9G。

2.系統(tǒng)參數(shù)調(diào)整
修改/etc/sysctl.conf,添加
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

執(zhí)行
#/sbin/sysctl -p

設(shè)置shell限制,在/etc/security/limits.conf添加
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

修改login設(shè)置,修改 /etc/pam.d/login,添加
session required /lib/security/pam_limits.so

在/etc/profile中添加以下語句:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

3、安裝設(shè)置
確保你已經(jīng)安裝了下列軟件
make
binutils
libc6-dev
libmotif3
rpm
awk

確保你的系統(tǒng)中有以下組和用戶,方法:
#grep dba /etc/group
#grep oinstall /etc/group
#grep nobody /etc/group

#id oracle
#id nobody

切換到root,添加oralce帳戶
#su - root
#groupadd dba # group of users to be granted SYSDBA system privilege
#groupadd oinstall # group owner of Oracle files
#useradd -c "Oracle software owner" -g oinstall -G dba -d /opt/oracle oracle
#passwd oracle
輸入oracle密碼

debian中需要額外的添加nobody用戶組:
#groupadd nobody
系統(tǒng)nogroup組中已經(jīng)有nobody用戶,把nobody用戶添加到新建的nobody組中,
#usermod -G nobody nobody

建立oracle目錄
#su root
#mkdir /opt/oracle
#chown -R oralce.oinstall /opt/oracle

debian需要額外的做以下操作:
# ln -s /usr/bin/awk /bin/awk
# ln -s /usr/bin/rpm /bin/rpm
# ln -s /usr/bin/basename /bin/basename
# ln -s /etc /etc/rc.d

模擬redhat-3進(jìn)行安裝,新建一個文件/etc/redhat-release,寫入以下內(nèi)容:
Red Hat Enterprise Linux AS release 3 (Taroon)

二、開始安裝
你可以從http://mirrors.cn99.com上下載oracle 10g,按以下方法進(jìn)行解壓:
$ gunzip ship.db.cpio.gz
$ cpio -idmv < ship.db.cpio

這樣會生成一個Disk1目錄,進(jìn)入Disk1目錄。

切換到oracle用戶,設(shè)置環(huán)境變量:
$ xhost +
$ su - oralce
$ export ORACLE_BASE=/opt/oracle
$ export ORACLE_SID=oralin#你可以自己命名sid

確保此時環(huán)境中沒有ORACLE_HOME 和TNS_ADMIN
$ unset ORACLE_HOME
$ unset TNS_ADMIN

可以將這些寫進(jìn).bash_profile
export ORACLE_BASE=/opt/oracle
export ORACLE_SID=oralin
unset ORACLE_HOME
unset TNS_ADMIN

umask 022

執(zhí)行
$ ./runInstaller
我選擇標(biāo)準(zhǔn)安裝,安裝大約30多分鐘。安裝過程截圖,參見 http://www.linuxsir.org/bbs/showthread.php?s=&threadid=140617

三、安裝后

1.Oracle 治理工具
Ultra Search URL:
http://debian:5620/ultrasearch

Ultra Search 治理工具 URL:
http://debian:5620/ultrasearch/admin

iSQL*Plus URL:
http://debian:5560/isqlplus

Enteprise Manager 10g Database Control URL:
http://debian:5500/em

2.oracle啟動腳本/etc/init.d/oracle
#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance

ORA_HOME="/opt/oracle/prodUCt/10.1.0/db_1"
ORA_OWNR="oracle"

# if the executables do not exist -- display error

if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi

# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display

case "" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNR -c $ORA_HOME/bin/dbstart

#Optional : for isqlplus only
su - $ORA_OWNR -c "$ORA_HOME/bin/isqlplusctl start"
#Optional : for Enterprise Manager software only
su - $ORA_OWNR -c "$ORA_HOME/bin/emctl start dbconsole"


touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "

#Optional : for isqlplus only
su - $ORA_OWNR -c "$ORA_HOME/bin/isqlplusctl stop"
#Optional : for Enterprise Manager software only
su - $ORA_OWNR -c "$ORA_HOME/bin/emctl stop dbconsole"


su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
rm -f /var/lock/oracle
echo "OK"
;;
reloadrestart)
stop
start
;
;
*)
echo "Usage: startstoprestartreload"
exit 1
esac
exit 0

可以通過/etc/init.d/oracle start來啟動oracle.

參考資料:
1.GNU/Linux Desktop Survival Guide,學(xué)習(xí)debian的最佳資料,其中有Oracle 10g安裝章節(jié)

2.Oracle 中文網(wǎng)站上官方安裝教程: 在 Linux x86 官方安裝 Oracle 數(shù)據(jù)庫 10g

3.Oracle 官方論壇 :Oracle Linux Forum

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 石狮市| 澄江县| 花垣县| 汽车| 乳源| 郸城县| 南木林县| 奉新县| 横山县| 霍州市| 金沙县| 精河县| 乌拉特前旗| 棋牌| 巴林左旗| 庆云县| 文成县| 兴和县| 若尔盖县| 五指山市| 兰西县| 西和县| 天台县| 鄂州市| 安多县| 巴彦淖尔市| 迭部县| 抚宁县| 当涂县| 睢宁县| 莱芜市| 广西| 南城县| 南昌市| 湖州市| 呼图壁县| 佛冈县| 双城市| 普安县| 临漳县| 彭泽县|