oracle 的安装

#检查内核
uname -a
#检查glibc
rpm  -Uvh glibc-2.2.4-32.11.i686.rpm glibc-common-2.2.4-32.11.i386.rpm
#检查gcc ,make binutils
rpm -q gcc  make binutils
#安装   as3 
rpm -Uvh  gcc-3.2.3-20.i386.rpm \
glibc-devel-2.3.2-95.3.i386.rpm \
glibc-headers-2.3.2-95.3.i386.rpm \
glibc-kernheaders-2.4-8.34.i386.rpm




#as 2.1
rpm -ivh  gcc-2.96-108.1.i386.rpm
binutils-2.11.90.0.8-12.i386.rpm
cpp-2.96-108.1.i386.rpm
glibc-devel-2.2.4-32.11.i386.rpm
kernel-headers-2.4.9-e.3.i386.rpm
#rh9 
rpm -Uvh  gcc-3.2.2-5.i386.rpm
 glibc-devel-2.3.2-5.i386.rpm
cpp-3.2.2-5.i386.rpm
glibc-kernheaders-2.4-8.10.i386.rpm
binutils-2.13.90.0.18-9.i386.rpm


 #检查openmotif 软件包
rpm -q openmotif
#as 3
rpm -ivh openmotif-2.2.2-16.i386.rpm
#as 2.1
rpm -ivh   openmotif-2.1.30-11.i386.rpm
rpm  -Uvh openmotif-2.2.2-14.i386.rpm
检查sertarch
rpm  -Uvh  setarch-1.3-1.i386.rpm
检查redhat-release
rpm -q redhat-release
#as  3 
rpm  -ivh redhat-release-3AS-1.i386.rpm
#as 2.1  
rpm -ivh rehat-release-as-2.1as-4.noarch.rpm
编辑/etc/redhat-release
  cat > /etc/redhat-release <<EOF
#创建用户
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba  -d /opt/oracle -s /bin/bash oracle
sudo passwd oracle
#检查系统#变量
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep aio-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max


#/etc/sysctl.conf中增加对应数据
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152kernel.shmmax = 536870912
kernel.shmmni = 4096kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586


#命令更新内核参数:
sysctl –p


#内核限制 /etc/security/limits.conf增加
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   10240


#查看/etc/pam.d/login,增加以下行(有了就不用):
session required pam_limits.so
groupadd dba 
useradd -g dba -d /home/oracle -s /bin/bash oracle
passwd oracle


#创建需要的文件夹(用于安装oracle)并设置其所有权:
mkdir -p /opt/oracle
mkdir -p /opt/oraInventory
chown -R oracle:oinstall  /opt/oracle
chown -R oracle:oinstall  /opt/oraInventory
chmod -R 775  /opt/oracle
oracle 环境变量
.bash_profile
umask 022
export ORACLE_HOME=/opt/ora10  
export ORACLE_BASE=/opt/ora10/Oracle
export ORACLE_OWNER=oracle  
export ORACLE_SID=ora1  
export ORACLE_TERM=xterm  
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH  
LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/rdbms/lib:ORACLE_HOME/lib:$LD_LIBRARY_PATH






















#http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html
#下载jdk-6u45-linux-i586.bin这个文件。放到主文件夹(home目录)下,进入终端:
sudo chmod 777 jdk-6u37-linux-x64.bin   // 将文件赋予运行权限  
sudo -s ./jdk-6u37-linux-x64.bin /usr/lib/jdk  //将JDK安装到/usr/lib/jdk 目录下。
#配置JDK的环境变量,使用编辑器打开主文件夹下的.bashrc配置文件(隐藏),向其中加入如下内容:
#JDK
JAVA_HOME=/usr/lib/jdk/jdk1.6.0_45
JRE_HOME=${JAVA_HOME}/jre
export ANDROID_JAVA_HOME=$JAVA_HOME
export CLASSPATH=.:${JAVA_HOME}/lib:$JRE_HOME/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export JAVA_HOME;
export JRE_HOME;
export CLASSPATH;
HOME_BIN=~/bin/
export PATH=${PATH}:${JAVA_PATH}:${HOME_BIN};




./runInstaller
oraInventory 目录下
orainstRoot.sh
db_1  下
root.sh

你可能感兴趣的:(oracle 的安装)