linux环境安装oracle11G准备环境(自学笔记1)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux环境安装oracle11G准备环境(自学笔记1)相关的知识,希望对你有一定的参考价值。
系统选择红帽企业版5.4 64位,数据库:oracle11G-R2
oracle安装准备环境:
1:yum服务器配置:
[[email protected] ~]# cat /etc/yum.repos.d/base.repo [Server] name=Server baseurl=file:///iso/Server gpgcheck=0 [VT] name=VT baseurl=file:///iso/VT gpgcheck=0
2:安装下列软件包:
binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3 (32 bit) elfutils-libelf-0.125 elfutils-libelf-devel-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-2.5-24 (32 bit) glibc-common-2.5 glibc-devel-2.5 glibc-devel-2.5 (32 bit) glibc-headers-2.5 ksh-20060214 libaio-0.3.106 libaio-0.3.106 (32 bit) libaio-devel-0.3.106 libaio-devel-0.3.106 (32 bit) libgcc-4.1.2 libgcc-4.1.2 (32 bit) libstdc++-4.1.2 libstdc++-4.1.2 (32 bit) libstdc++-devel-4.1.2 make-3.81 sysstat-7.0.2 unixODBC.x86_64 unixODBC.i386 unixODBC-devel.x86_64 unixODBC-devel.i386
3:修改/etc/redhat-release为如下:
[[email protected] ~]# cat /etc/redhat-release redhat-5
4:执行下列命令添加参数到/etc/sysctl.conf 并执行sysctl -p
echo "fs.file-max = 65536" >> /etc/sysctl.conf echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf echo "kernel.shmall = 2097152" >> /etc/sysctl.conf echo "kernel.shmmni = 4096" >> /etc/sysctl.conf echo "kernel.shmmax = 1073741824" >> /etc/sysctl.conf echo "net.core.rmem_default=262144" >> /etc/sysctl.conf echo "net.core.rmem_max=262144" >> /etc/sysctl.conf echo "net.core.wmem_default=262144" >> /etc/sysctl.conf echo "net.core.wmem_max=262144" >> /etc/sysctl.conf echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
5:执行下列命令添加参数到/etc/security/limits.conf
echo "oracle soft nproc 2047" >>/etc/security/limits.conf echo "oracle hard nproc 16384" >>/etc/security/limits.conf echo "oracle soft nofile 1024" >>/etc/security/limits.conf echo "oracle hard nofile 65536" >>/etc/security/limits.conf
6:执行下列命令添加参数到在 /etc/pam.d/login
echo "session required /lib/security/pam_limits.so" >>/etc/pam.d/login
7:修改/etc/hosts为如下:
[[email protected] ~]# cat /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.21.101 station90.example.com station90
8:oracle环境变量:
groupadd oinstall groupadd dba useradd -g oinstall -G dba -d /home/oracle oracle echo "oracle" | passwd --stdin oracle echo "export ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profile echo ‘export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1‘ >> /home/oracle/.bash_profile echo "export ORACLE_SID=orcl" >> /home/oracle/.bash_profile echo ‘export LD_LIBRARY_PATH=$ORACLE_HOME/lib‘ >> /home/oracle/.bash_profile echo ‘export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/X11R6/lib‘ >> /home/oracle/.bash_profile echo ‘export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/jdk/jre/lib/i386‘ >> /home/oracle/.bash_profile echo ‘export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/jdk/jre/lib/i386/server‘ >> /home/oracle/.bash_profile echo ‘export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/rdbms/lib‘ >> /home/oracle/.bash_profile echo ‘export CLASS_PATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib‘ >> /home/oracle/.bash_profile echo ‘export CLASS_PATH=$CLASS_PATH:$ORACLE_HOME/rdbms/jlib‘ >> /home/oracle/.bash_profile echo ‘export CLASS_PATH=$CLASS_PATH:$ORACLE_HOME/network/jlib‘ >> /home/oracle/.bash_profile echo ‘export TNS_ADMIN=$ORACLE_HOME/network/admin‘ >> /home/oracle/.bash_profile echo "export NLS_LANG=american_america.AL32UTF8" >> /home/oracle/.bash_profile echo "export ORACLE_TERM=xterm" >> /home/oracle/.bash_profile echo "export EDITOR=vi" >> /home/oracle/.bash_profile echo ‘export PATH=$ORACLE_HOME/bin:$PATH‘ >> /home/oracle/.bash_profile echo "export LANG=en_US" >> /home/oracle/.bash_profile
9:创建目录,跟设置权限
mkdir -p /u01/app/oracle mkdir -p /stage mkdir -p /home/oracle chown oracle:oinstall /u01/app/oracle chown oracle:oinstall /stage chown oracle:oinstall /home/oracle
10:解压缩oracle11G软件,并且将解压出来文件加入到oracle用户和oinstall组
[[email protected] u01]# ll 总计 2297868 drwxr-xr-x 4 root root 4096 10-24 20:09 app drwxr-xr-x 8 oracle oinstall 4096 2009-08-21 database -rw-r--r-- 1 root root 1239269270 10-24 19:43 linux.x64_11gR2_database_1of2.zip -rw-r--r-- 1 root root 1111416131 10-24 19:44 linux.x64_11gR2_database_2of2.zip drwx------ 2 root root 16384 10-24 18:43 lost+found [[email protected] u01]# chown oracle:oinstall database
11:root用户下执行xhost+
12:切换oracle用户找到/u01/database 执行./runInstaller
本文出自 “楠哥” 博客,请务必保留此出处http://576302263.blog.51cto.com/13412343/1976129
以上是关于linux环境安装oracle11G准备环境(自学笔记1)的主要内容,如果未能解决你的问题,请参考以下文章
RHEL6.6安装Oracle 11g RAC - 基于VMware的实验环境