Deploy Oracle 10.2.0.5 on Red Hat Enterprise Linux 6.4,deploy10.2.0.5

來源:互聯網
上載者:User

Deploy Oracle 10.2.0.5 on Red Hat Enterprise Linux 6.4,deploy10.2.0.5

一、Linux系統安裝配置


1.安裝系統時選Desktop


2.設定eth0網卡為靜態IP,添加子網路遮罩,網關,DNS,並配置自動啟動


3.修改/etc/hosts,添加主機名稱和對應IP


4.禁用firewall和selinux
chkconfig iptables off
vi /etc/selinux/config
SELINUX=disabled


[root@10dg1 selinux]# setenforce 0
[root@10dg1 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
cd /media/disk/
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 oracle-rdbms-server-11gR2-preinstall
 yum install gcc
 yum install glibc
 yum install glibc-devel
 yum install libXp
 yum install libXt
 yum install libXtst
 yum install libstdc++ 
 yum install libstdc++-devel
 yum install compat-libstdc++-296
 yum install compat-libstdc++-33
 yum install compat-gcc-34
裝完以後檢查一遍
rpm -qa gcc glibc libXp libXt libstdc++ libstdc++-devel compat-libstdc++-296 compat-libstdc++-33 compat-gcc-34


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.dbca建立監聽,建庫





相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.