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

首頁 > 數據庫 > Oracle > 正文

Debian Sarge 上安裝 Oracle 10g

2019-09-08 23:30:38
字體:
來源:轉載
供稿:網友

介紹一下我在Debian Sarge上安裝Oracle 10g的過程。

首先說一下我的愛機配置情況:

AMD Duron 1.1G
RAM 512MB(Hy sdram 256*2)
Maxtor Diomand Plus 80G+40G

通過Oracle 官方認證的系統,只有redhat-2.1,redhat-3,UnitedLinux-1.0,并不包括對debian支持,所以在debian上安裝Oracle會多出一些額外的步驟。

一、安裝前的準備

1.硬件要求

Oracle建議內存為512MB或以上,至少1G交換分區,并且需要400MB的臨時目錄空間。
使用以下的命令查看你的內存和交換分區大小:

# grep MemTotal /proc/meminfo
# grep SwapTotal /proc/meminfo

你可以使用以下方法添加臨時交換分區:

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

對硬盤空間大小的限制,建議預留3G空間,我按照標準安裝,硬盤消耗接近1.9G。

2.系統參數調整

修改/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

執行
#/sbin/sysctl -p

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

修改login設置,修改 /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、安裝設置

確保你已經安裝了下列軟件

make
binutils
libc6-dev
libmotif3
rpm
awk

確保你的系統中有以下組和用戶,方法:

#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
系統nogroup組中已經有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進行安裝,新建一個文件/etc/redhat-release,寫入以下內容:
Red Hat Enterprise Linux AS release 3 (Taroon)

二、開始安裝

你可以從http://mirrors.cn99.com上下載oracle 10g,按以下方法進行解壓:

$ gunzip ship.db.cpio.gz
$ cpio -idmv < ship.db.cpio

這樣會生成一個Disk1目錄,進入Disk1目錄。
切換到oracle用戶,設置環境變量:

$ xhost +
$ su - oralce
$ export ORACLE_BASE=/opt/oracle
$ export ORACLE_SID=oralin#你可以自己命名sid

確保此時環境中沒有ORACLE_HOME 和TNS_ADMIN
$ unset ORACLE_HOME
$ unset TNS_ADMIN

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

umask 022

執行
$ ./runInstaller
我選擇標準安裝,安裝大約30多分鐘。安裝過程截圖,參見 http://www.gbunix.com/bbs/ftopic1226.html

三、安裝后

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 "$1" 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"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0

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

Oracle

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 渑池县| 新乡县| 平遥县| 贺兰县| 福鼎市| 和平县| 三穗县| 淮阳县| 公安县| 兰溪市| 南宁市| 米泉市| 凤山市| 碌曲县| 固安县| 乌恰县| 庄浪县| 辰溪县| 邵武市| 陇南市| 南康市| 霍山县| 桃园市| 南丰县| 西昌市| 虎林市| 焦作市| 安乡县| 镇康县| 新平| 雷山县| 常宁市| 塔河县| 广东省| 吴桥县| 合江县| 太湖县| 驻马店市| 涿鹿县| 济阳县| 泉州市|