快捷搜索:   nginx

Centos 5.3 下 安装 Oracle 11g

很久以前,大概在刚接触 Linux的时候就听说Oracle数据库如何如何的好,之前也在虚拟机上用RHEL5试过一次,不过,由于技术太烂,没装成功。最近跟着 boobooke上的视频了下,挺顺利的完成的Oracle 11g 软件的安装,在此记录下,同时也对boobooke表示感谢!

相关视频地址:

一,安装前准备:

1:下载CentOS5.3,

2:下载Oracle 11g Linux版安装软件,.com/technology/software/products/database/index.html

3:下载安装说明文档,

二,安装CentOS系统,勾选GME,x-windows,vi以及开发工 具,开发库等基本软件

三,安装必要的软件包,调整内核参数和Oracle用户资源限制,新建dba和 oinstall组,新建oralce用户并设置环境变量!

Asianux 3, Oracle
Enterprise Linux 5, and
Red Hat Enterprise Linux
5
The following packages (or later versions) must be installed:
以下的软件包对于CentOS5系统安装Oracle 11g是必要的
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11

调整内核参数,在/etc/sysctl.conf文件中添加下列参数,并使用 sysctl -p命令使其生效

kernel.shmall = 268435456
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
fs.file-max = 6553600

添加Oracle用户和相关的组
[root@oracle ~]# groupadd oinstall
[root@oracle ~]# groupadd dba
[root@oracle ~]# mkdir /u01
[root@oracle ~]# useradd -g oinstall -G dba -d /u01/oracle oracle

[root@oracle ~]#passwd oracle
[root@oracle ~]#chown -R oistall:dba /u01

设置Oracle用户环境变量
[oracle@oracle ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=sales
PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

[oracle@oracle ~]$ env | grep ORA
ORACLE_SID=sales
ORACLE_BASE=/u01
ORACLE_HOME=/u01/oracle

四:开始安装
1:解压出Linux版Oracle安装包,并将database复制到/u01/oracle目录下,运行/u01/oracle/database目 录下的安装脚本runinstaller

[root@oracle ~]# /u01/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/oracle/oraInventory to 770.
Changing groupname of /u01/oracle/oraInventory to oinstall.
The execution of the script is complete

[root@oracle ~]# /u01/oracle/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /u01/oracle

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

五,安装数据库
1:运行netca,配置网络参数

[oracle@oracle ~]$ ps -ef

oracle   11768     1 0 08:04 ?        00:00:01 /u01/oracle/bin/tnslsnr LISTENER
root     11776 2276 0 08:05 ?        00:00:00 sshd: oracle [priv]
oracle   11778 11776 0 08:05 ?        00:00:00 sshd:

2:运行dbca,安装数据库

[oracle@oracle ~]$ ps -ef

oracle   12455     1 0 08:25 ?        00:00:00 ora_pmon_sales
oracle   12457     1 0 08:25 ?        00:00:00 ora_vktm_sales
oracle   12461     1 0 08:25 ?        00:00:00 ora_diag_sales
oracle   12463     1 0 08:25 ?        00:00:00 ora_dbrm_sales
oracle   12465     1 0 08:25 ?        00:00:00 ora_psp0_sales
oracle   12469     1 0 08:25 ?        00:00:01 ora_dia0_sales
oracle   12471     1 0 08:25 ?        00:00:03 ora_mman_sales
oracle   12473     1 0 08:25 ?        00:00:03 ora_dbw0_sales
oracle   12475     1 0 08:25 ?        00:00:04 ora_lgwr_sales
oracle   12477     1 0 08:25 ?        00:00:01 ora_ckpt_sales
oracle   12479     1 0 08:25 ?        00:00:01 ora_smon_sales
oracle   12481     1 0 08:25 ?        00:00:00 ora_reco_sales
oracle   12483     1 0 08:25 ?        00:00:07 ora_mmon_sales
oracle   12485     1 0 08:25 ?        00:00:01 ora_mmnl_sales
oracle   12487     1 0 08:25 ?        00:00:00 ora_d000_sales
oracle   12489     1 0 08:25 ?        00:00:00 ora_s000_sales
oracle   12499     1 0 08:25 ?        00:00:00 ora_fbda_sales
oracle   12501     1 0 08:25 ?        00:00:00 ora_smco_sales
oracle   12503     1 0 08:25 ?        00:00:00 ora_qmnc_sales
oracle   12505     1 0 08:25 ?        00:00:00 ora_w000_sales
oracle   12519     1 0 08:25 ?        00:00:00 ora_q000_sales
oracle   12521     1 0 08:25 ?        00:00:00 ora_q001_sales
oracle   12599     1 0 08:26 ?        00:00:02 ora_cjq0_sales
oracle   15398     1 0 08:32 pts/2    00:00:00 /u01/oracle/perl/bin/perl /u01/o
oracle   15412 15398 18 08:32 pts/2    00:02:05 /u01/oracle/jdk/bin/java -server
oracle   15435 15398 2 08:32 pts/2    00:00:17 /u01/oracle/bin/emagent
oracle   15524     1 0 08:33 ?        00:00:05 oraclesales (LOCAL=NO)
oracle   15708     1 0 08:33 ?        00:00:00 oraclesales (LOCAL=NO)
oracle   15741     1 10 08:33 ?        00:01:03 oraclesales (LOCAL=NO)
oracle   15845     1 0 08:33 ?        00:00:04 oraclesales (LOCAL=NO)
oracle   16003     1 0 08:35 ?        00:00:00 ora_w001_sales
oracle   16042     1 0 08:36 ?        00:00:01 oraclesales (LOCAL=NO)
oracle   16052     1 0 08:36 ?        00:00:03 oraclesales (LOCAL=NO)
oracle   16055     1 1 08:36 ?        00:00:06 oraclesales (LOCAL=NO)
oracle   16076     1 0 08:36 ?        00:00:02 oraclesales (LOCAL=NO)
oracle   16079     1 6 08:36 ?        00:00:31 oraclesales (LOCAL=NO)
oracle   16085     1 0 08:36 ?        00:00:00 oraclesales (LOCAL=NO)
oracle   16087     1 0 08:36 ?        00:00:00 oraclesales (LOCAL=NO)
oracle   16138     1 0 08:36 ?        00:00:00 oraclesales (LOCAL=NO)
oracle   16140     1 0 08:36 ?        00:00:00 oraclesales (LOCAL=NO)
oracle   16143     1 11 08:36 ?        00:00:50 oraclesales (LOCAL=NO)
oracle   17091 11779 0 08:44 pts/4    00:00:00 ps -ef

[oracle@oracle ~]$ sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 28 08:45:46 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

SQL> conn / as sysdba
Connected.

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论