CentOS下安装Oracle 11g

通过ftp将linux_11gR2_database_1of2和linux_11gR2_database_2of2上传到linux中

unzip linux_11gR2_database_1of2.zip

unzip linux_11gR2_database_2of2.zip

由于我的虚拟机空间不大,所以解压后删除两个压缩文件

rm -f *.zip

mkdir -p /u01/oracle

mv database /u01/database

检查必备包(版本无需要一致):

rpm -qa | grep 名字

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

numactl-devel-0.9.8.i386

sysstat-7.0.2

unixODBC-2.2.11

unixODBC-devel-2.2.11

将没有安装的包装上,可通过yum和rpm方式安装

mkdir -p /mnt/cdrom

mount /dev/cdrom /mnt/cdrom

cd /mnt/cdrom/CentOS

rpm -hiv 缺少的包名

yum install 缺少的包名

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba -d /u01/oracle oracle

cp /etc/skel/.bash* /u01/oracle/

passwd oracle

cd /

chown -R oracle:oinstall u01

vi /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

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

-------------

vi /etc/security/limits.conf

oracle           soft    nproc   2047

oracle           hard    nproc   16384

oracle           soft    nofile  1024

oracle           hard    nofile  65536

------------

vi /etc/pam.d/login 

session    required     pam_limits.so

=============

vi .bash_profile

ORACLE_BASE=/u01

ORACLE_HOME=$ORACLE_BASE/oracle

ORACLE_SID=orcl

PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

============

. /u01/oracle/.bash_profile

init 5

切换到oracle用户

cd /u01/database

./runInstaller

Installation Optiong

install database software only

Grid Options

Single instance database installation

Product Languages

English

Database Edition

Enterprise Edition (3.95)

Installation Location

Oracle Base: /u01

Software Loacation: /u01/oracle

提示: yes

Create Inventory

mkdir /oraInventory

chown -R oracle:oinstall oraInventory

Operating System Groups

Next 

Prerequis ite Checks

Ignore All

Summary

Finish

Install Product

安装完毕, 提示执行 2个脚本

/oraInventory/orainstRoot.sh

/u01/oracle/root.sh

直接按回车, 缺省值就可以

Finish

====================================

上面只是安装了软件, 数据库没有创建, 还有配置 监听器 Listener

netca

一直默认下一步 ,最后 Finish

ps -ef 可以查看Listener是否配置成功

-----------

dbca

一直 Next,Global Database Name 和 SID 都是输入 orcl

选择 User the Same.....All Accounts

选择 Sample Schemas

Memory 内存分配,默认就可以了

Character Sets 选择 Use Unicode(AL32UTF8)

然后一直 Next , 到最后 Finish

弹出一个 Confirmation , 点击 OK 就可以了, 然后自动进行安装

--------------------------------

用 oracle 用户 远程登录, 然后 

$ sqlplus /nolog

SQL> conn / as sysdba

Connected to an idle instance.

出现错误 

SQL> startup

猜你喜欢

转载自yizhaorong.iteye.com/blog/1964265