1、安装包
/etc/yum.repos.d/localyum.repo
[base]
name=localyum
baseurl=file:///media/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
yum makecache
解析:
makecache
Is used to download and make usable all the metadata for the
currently enabled yum repos.
yum clean all
清除YUM缓存
yum 会把下载的软件包和header存储在cache中,而不会自动删除。如果我们觉得它们占用了磁盘空间,可以使用yum clean指令进行清除,更精确 的用法是yum clean headers清除header,yum clean packages清除下载的rpm包,yum clean all一 股脑儿端.
yum makecache
yum makecache 是 将服务器上的软件包信息 现在本地缓存,以提高 搜索 安装软件的速度
yum groupinstall "Compatibility libraries"
yum install libXp binutils compat-libstdc++-33-3.2.3 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++-4.1.2 libstdc++-devel-4.1.2 make sysstat unixODBC unixODBC-devel2
yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
2.配置/etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.100.20 dga
192.168.100.21 dgb
::1 localhost6.localdomain6 localhost6
3.添加组和用户
groupadd -g 1000 oinstall
groupadd -g 1001 dba
useradd -u 1000 -g oinstall -G dba oracle;echo oracle|passwd --stdin oracle
4. 配置内核参数
修改内核参数 /etc/sysctl.conf
# kernel for oracle
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.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
如果有如下提示错误,忽略,因为即使未修改参数也提示有这个错误
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
注意: kernel.shmmax's 的值是物理内存的一半。 我的是 2G 内存,所以是
1073741824
/etc/security/limits.conf
# limits for oracle
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
/etc/pam.d/login
# pam for oracle
session required pam_limits.so
/etc/profile
# profile for oracle
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
重启系统,或者使用 sysctl -p 使修改生效
oracle 用户环境变量 /home/oracle/.bash_profile
umask 022
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_BASE ORACLE_HOME
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/jdk/bin:$ORACLE_HOME/jre/1.4.2/bin:$PATH
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/r
export PATH LD_LIBRARY_PATH
建立目录
mkdir -p /u01/app/oracle
chown oracle:oinstall /u01/app/oracle
chmod 775 /u01/app/oracle
7.安装
#xhost +
oracle 用户登录
$ cksum 10201_database_linux_x86_64.cpio.gz
2921604215 758433170 10201_database_linux_x86_64.cpio.gz
$ gunzip 10201_database_linux_x86_64.cpio.gz
$ cpio -idmv < 10201_database_linux_x86_64.cpio
$ ./runInstaller
8.执行root.sh和orainstRoot.sh两个sell文件
9.export ORACLE_SID=orcl 设定
10.sqlplus / nolog -----startuup ------conn / as sysdba
11.错误处理没有写出来,请联系本人