千家信息网

linux环境安装oracle11G准备环境(自学笔记1)

发表于:2024-11-26 作者:千家信息网编辑
千家信息网最后更新 2024年11月26日,系统选择红帽企业版5.4 64位,数据库:oracle11G-R2oracle安装准备环境:1:yum服务器配置:[root@station90 ~]# cat /etc/yum.repos.d/ba
千家信息网最后更新 2024年11月26日linux环境安装oracle11G准备环境(自学笔记1)

系统选择红帽企业版5.4 64位,数据库:oracle11G-R2


oracle安装准备环境:


1:yum服务器配置:

[root@station90 ~]# cat /etc/yum.repos.d/base.repo [Server]name=Serverbaseurl=file:///iso/Servergpgcheck=0[VT]name=VTbaseurl=file:///iso/VTgpgcheck=0


2:安装下列软件包:

binutils-2.17.50.0.6compat-libstdc++-33-3.2.3compat-libstdc++-33-3.2.3 (32bit)elfutils-libelf-0.125elfutils-libelf-devel-0.125gcc-4.1.2gcc-c++-4.1.2glibc-2.5-24glibc-2.5-24 (32 bit)glibc-common-2.5glibc-devel-2.5glibc-devel-2.5 (32bit)glibc-headers-2.5ksh-20060214libaio-0.3.106libaio-0.3.106 (32 bit)libaio-devel-0.3.106libaio-devel-0.3.106 (32 bit)libgcc-4.1.2libgcc-4.1.2 (32 bit)libstdc++-4.1.2libstdc++-4.1.2 (32bit)libstdc++-devel-4.1.2make-3.81sysstat-7.0.2unixODBC.x86_64unixODBC.i386unixODBC-devel.x86_64unixODBC-devel.i386

3:修改/etc/redhat-release为如下:

[root@station90 ~]# cat /etc/redhat-release  redhat-5

4:执行下列命令添加参数到/etc/sysctl.conf 并执行sysctl -p

echo "fs.file-max = 65536" >> /etc/sysctl.confecho "kernel.sem = 250 32000 100 128" >> /etc/sysctl.confecho "kernel.shmall = 2097152" >> /etc/sysctl.confecho "kernel.shmmni = 4096" >> /etc/sysctl.confecho "kernel.shmmax = 1073741824" >> /etc/sysctl.conf          echo "net.core.rmem_default=262144" >> /etc/sysctl.confecho "net.core.rmem_max=262144" >> /etc/sysctl.confecho "net.core.wmem_default=262144" >> /etc/sysctl.confecho "net.core.wmem_max=262144" >> /etc/sysctl.confecho "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf

5:执行下列命令添加参数到/etc/security/limits.conf

echo "oracle soft nproc 2047" >>/etc/security/limits.confecho "oracle hard nproc 16384" >>/etc/security/limits.confecho "oracle soft nofile 1024" >>/etc/security/limits.confecho "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为如下:

[root@station90 ~]# 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 oinstallgroupadd dbauseradd -g oinstall -G dba -d  /home/oracle   oracle echo "oracle" | passwd --stdin oracleecho "export ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profileecho 'export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1' >> /home/oracle/.bash_profileecho "export ORACLE_SID=orcl"  >> /home/oracle/.bash_profileecho 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib'  >> /home/oracle/.bash_profileecho 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/X11R6/lib'  >> /home/oracle/.bash_profileecho 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/jdk/jre/lib/i386'  >> /home/oracle/.bash_profileecho 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/jdk/jre/lib/i386/server'  >> /home/oracle/.bash_profileecho 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/rdbms/lib'  >> /home/oracle/.bash_profileecho 'export CLASS_PATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib'  >> /home/oracle/.bash_profileecho 'export CLASS_PATH=$CLASS_PATH:$ORACLE_HOME/rdbms/jlib'  >> /home/oracle/.bash_profileecho 'export CLASS_PATH=$CLASS_PATH:$ORACLE_HOME/network/jlib'  >> /home/oracle/.bash_profileecho 'export TNS_ADMIN=$ORACLE_HOME/network/admin'  >> /home/oracle/.bash_profileecho "export NLS_LANG=american_america.AL32UTF8" >> /home/oracle/.bash_profileecho "export ORACLE_TERM=xterm" >> /home/oracle/.bash_profileecho "export EDITOR=vi" >> /home/oracle/.bash_profileecho 'export PATH=$ORACLE_HOME/bin:$PATH' >> /home/oracle/.bash_profileecho "export LANG=en_US" >> /home/oracle/.bash_profile

9:创建目录,跟设置权限

mkdir -p /u01/app/oraclemkdir -p /stagemkdir -p /home/oraclechown oracle:oinstall /u01/app/oraclechown oracle:oinstall /stagechown oracle:oinstall /home/oracle

10:解压缩oracle11G软件,并且将解压出来文件加入到oracle用户和oinstall组

[root@station90 u01]# ll总计 2297868drwxr-xr-x 4 root   root           4096 10-24 20:09 appdrwxr-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.zipdrwx------ 2 root   root          16384 10-24 18:43 lost+found[root@station90 u01]# chown oracle:oinstall database

11:root用户下执行xhost+

12:切换oracle用户找到/u01/database 执行./runInstaller

0