標籤:oracle 10g rhel 6.4 link linux
一、Linux系統安裝配置
1.安裝系統時選Desktop
2.設定eth0網卡為靜態IP,添加子網路遮罩,網關,DNS,並配置自動啟動
3.修改/etc/hosts,添加主機名稱和對應IP
4.禁用firewall和selinux
chkconfig iptables off
vi /etc/selinux/config
SELINUX=disabled
[[email protected] selinux]# setenforce 0
[[email protected] selinux]# getenforce
Permissive
5.配置本地yum源
mkdir /media/disk -p
mount -t iso9660 /dev/cdrom /media/disk
mount: block device /dev/sr0 is write-protected, mounting read-only
touch /etc/yum.repos.d/public-yum-rhel6.repo
vi /etc/yum.repos.d/public-yum-rhel6.repo
[rhel6]
name = Red Hat Enterprise Linux 6.4 DVD
baseurl=file:///media/disk/Server/
gpgcheck=0
enabled=1
6.安裝Oracle所需要的包
yum install glibc.i686
yum install glibc-devel.i686
yum install libXp.i686
yum install libXt.i686
yum install libXtst.i686
yum install libstdc++.i686
yum install libstdc++-devel.i686
yum install compat-libstdc++-296.i686
yum install compat-libstdc++-33.i686
yum install compat-gcc-34 #這個沒有i686的包,預設會裝X86_64
yum install gcc #這個沒有i686的包,預設會裝X86_64
yum install oracle-rdbms-server-11gR2-preinstall #只有OEL6才有這個包,裝完會自動設定oracle的安裝環境,方便
裝完以後檢查一遍
[[email protected] disk]# rpm -qa glibc glibc-devel libXp libXt libXtst libstdc++ libstdc++-devel compat-libstdc++-296 compat-libstdc++-33 compat-gcc-34 gcc
gcc-4.4.7-3.el6.x86_64
libXp-1.0.0-15.1.el6.i686
libstdc++-4.4.7-3.el6.i686
libXt-1.1.3-1.el6.x86_64
libstdc++-4.4.7-3.el6.x86_64
glibc-devel-2.12-1.107.el6.i686
compat-libstdc++-33-3.2.3-69.el6.i686
libXtst-1.2.1-2.el6.x86_64
glibc-2.12-1.107.el6.x86_64
glibc-2.12-1.107.el6.i686
libXtst-1.2.1-2.el6.i686
compat-libstdc++-296-2.96-144.el6.i686
libstdc++-devel-4.4.7-3.el6.i686
libXt-1.1.3-1.el6.i686
compat-gcc-34-3.4.6-19.el6.x86_64
glibc-devel-2.12-1.107.el6.x86_64
7.添加使用者和組
groupadd oinstall 501
groupadd dba 502
useradd -g oinstall -G dba oracle
password oracle
8.建立目錄並賦予許可權
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 755 /u01/app/oracle 或者 chmod -R ug=rx,o=rwx
9.配置核心參數
vi /etc/sysctl.conf
#for oracle install
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni =4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
使更改生效
/sbin/sysctl -p
註:一般為記憶體的0.7倍,OLTP系統SGA+PGA<(Total Memory)*0.8,SGA<(Total Memory)*0.8*0.8
10.設定shell中檔案數和進程數的限制
vi /etc/security/limits.conf
#for oracle install
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
11.添加登入使用者對資源的限制
vi /etc/pam.d/login
#for oracle install
session required/lib/security/pam_limits.so
session requiredpam_limits.so
12.添加oracle環境變數
su - oracle
vi ~/home/oracle/.bash_profile
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=zlm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
#umask 022
#alias sqlplus=‘rlwrap sqlplus‘
#alias rman=‘rlwrap rman‘
stty erase ^
source ~/.bash_profile或. ~/.bash_profile
二、資料庫安裝
1.安裝10.2.0.1資料庫軟體
使用Xmanage的shell元件連線伺服器
su - oracle
cpio -idvm < 10201_database_linux_x86_64.cpio
unzip p8202632_10205_Linux-x86-64.zip
cd database/
./runInstaller -ignoreSysPrereqs #RHEL6.4忽略該參數也可以進入圖形化介面,無需修改/etc/redhat-release為低版本,改成5反而進不去安裝介面了
由於10.2.0.1 並不認證Linux 6 所以編譯過程中會提示ins_ctx.mk,ins_rdbms.mk,ins_emdb.mk,ins_net_client.mk等檔案無法link,直接點擊continue繼續,到10.2.0.5升級時保證升級的LINK全部順利通過即可,最後依次執行2個指令碼完成安裝
2.升級資料庫軟體PSR到10.2.0.5
cd /Disk
./runInstaller
會提示一個包沒有裝的錯誤
OUI-11108: Packages information not specified.
vi /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago) -> Red Hat Enterprise Linux Server release4 (Santiago)
把6.4改成4以後,OUI-11108錯誤消失
官方RHEL5所需安裝的包
rpm -q --qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n‘ binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel
重新安裝一遍所有需要的包
yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-develglibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devellibaio-devel.i686 libgcclibgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat
在裝10.2.0.5 PSR時,依然會報link錯誤,由於之前用yum install glibc安裝,系統預設給裝了glibc-devel.X86_64的了,而64 bit oracle需要的是glibc-devel.i686,難怪一直報link錯誤,裝完該包以後,之前的link錯誤不再重現
3.netca建立監聽,dbca建庫
略