DB : Oracle 11gR2

安装

操作系统 : Oracle Linux 6

1. 设置VMware

设置Hard Disk时一定要大于20G,否则创建数据库时会由于空间不够导致失败,此处设置为40G

2. 安装Oracle Linux 6

在安装OS 时选择如下包:

Base System > Base
Base System > Client management tools
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Development > Additional Development
Development > Development Tools
Applications >Internet Browser

3. 安装Oracle 11gR2

3.1 修改hosts文件
vim /etc/hosts
<ip-address>  <machine-name>
eg:
127.0.0.1  vSKY
不修改会导致安装时出现错误:net configuration assistant failed

3.2 配置
3.2.1 创建相关用户和组
创建用户,输入命令:
groupadd  oinstall 
groupadd  dba
创建Oracle用户和密码,输入命令:
useradd -g oinstall -g dba -m oracle
passwd  oracle
然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认

3.2.2 创建数据库软件目录和数据文件存放目录,目录的位置
输入命令:
mkdir /home/oracle/app
mkdir /home/oracle/app/oracle
mkdir /home/oracle/app/oradata
mkdir /home/oracle/app/oracle/ product

更改目录属主为Oracle用户所有
chown -R oracle:oinstall /home/oracle/app

3.2.3 配置oracle用户的环境变量
su – oracle
cd /home/oracle
vi .bash_profile

umask 022
export ORACLE_BASE=/home/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

3.3 正式安装
cd database
./runInstaller
一路Next

你可能感兴趣的:(DB : Oracle 11gR2)