一、Linux系统安装和配置
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
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的安装环境,方便
装完以后检查一遍
[root@10dg1 disk]# rpm -qa glibc glibc-devel libXp libXt libXtst libstdc++ libstdc++-devel compat-libstdc++-296 compat-libstdc++-33 compat-gcc-34 gccgcc-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 -g 501
groupadd dba -g 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 u=rwx,og=rx /u01 ## u -- user ,o -- owner, g -- group
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
二、数据库安装
使用Xmanage的shell组件连接server
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反而进不去安装界面了
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时。依旧会报ins_ctx.mk,ins_rdbms.mk的link错误。能够先忽略这个错误,等软件装完以后运行$ORACLE_HOME/bin/relink all > /u01/relink.log。又一次link一下,并重定向到relink.log日志文件
因为之前用yum install glibc-devel安装。没有指定i686。系统默认装了glibc-devel.X86_64的包,而64 bit oracle须要的是glibc-devel.i686,又一次装完该包以后再执行patch,就不再报link错了
3.netca创建监听,dbca建库
略
版权声明:本文博主原创文章,博客,未经同意不得转载。