一、使用oracle硬件要求
1、内存要求
最小内存1G,推荐2G或2G以上
2、swap大小设定
1GB跟2GB物理内存之间的,设定swap大小为物理内存的1.5倍
2GB跟16GB物理内存之间的,设置swap大小与物理内存相等
16GB物理内存以上的,设置swap大小为16GB
3、共享内存/dev/shm要求
至少比在每个oracle实例中的MEMORY_MAX_TARGET和MEMORY_TARGET要大。
4、/tmp空间大小要求
至少1GB空间
5、硬盘大小要求
存放oracle软件文件和数据文件的空间至少6GB
二、使用oracle软件要求
1、操作系统要求
Asianux Server 3 SP2
Oracle Linux 4 Update 7
Oracle Linux 5 Update 2
Oracle Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux)
Red Hat Enterprise Linux 4 Update 7
Red Hat Enterprise Linux 5 Update 2
Red Hat Enterprise Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux)
SUSE Linux Enterprise Server 10 SP2
SUSE Linux Enterprise Server 11
2、软件包要求
下面是64位centos 5或6的软件包要求
binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat
三、开始安装oracle
因为本机没有安装桌面环境,所以我们采用静默安装oracle。
1、安装依赖
- yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat
2、添加用户
- /usr/sbin/groupadd oinstall
- /usr/sbin/groupadd dba
- /usr/sbin/useradd -g oinstall -G dba oracle
- passwd oracle
3、修改内核参数
- 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
- #######
- /sbin/sysctl -p
4、修改用户资源限制
- vi /etc/security/limits.conf
- #####
- oracle soft nproc 2047
- oracle hard nproc 16384
- oracle soft nofile 1024
- oracle hard nofile 65536
- oracle soft stack 10240
- #####
5、目录创建
- mkdir -p /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
- chown -R oracle:oinstall /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
- chmod -R 775 /usr/local/oracle /usr/local/oraInventory /usr/local/oradata/
6、设置用户环境
- su - oracle
- vi .bash_profile
- #####
- export ORACLE_BASE=/usr/local/oracle
- export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
- export ORACLE_SID=sales
- export ORACLE_OWNER=oracle
- export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
- ####
- source .bash_profile
7、下载oracle
切换到root用户
- su -
下载oracle 11g到/home/并解压
- chmod 777 /home/database
- chown -R oracle.oinstall /home/database
8、创建oraInst.loc
- vi /etc/oraInst.loc
- #####
- inventory_loc=/usr/local/oraInventory
- inst_group=oinstall
- #####
- chown oracle:oinstall /etc/oraInst.loc
- chmod 664 /etc/oraInst.loc
9、开始安装
- su - oracle
- /home/database/runInstaller -silent -debug -force \
- FROM_LOCATION=/home/database/stage/products.xml \
- oracle.install.option=INSTALL_DB_SWONLY \
- UNIX_GROUP_NAME=oinstall \
- INVENTORY_LOCATION=/usr/local/oraInventory \
- ORACLE_HOME=/usr/local/oracle/product/11.2.0/db_1 \
- ORACLE_HOME_NAME="Oracle111" \
- ORACLE_BASE=/usr/local/oracle \
- oracle.install.db.InstallEdition=EE \
- oracle.install.db.isCustomInstall=false \
- oracle.install.db.DBA_GROUP=oinstall \
- oracle.install.db.OPER_GROUP=oinstall \
- DECLINE_SECURITY_UPDATES=true
- su -
- /usr/local/oracle/product/11.2.0/db_1/root.sh
安装参考:http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm
错误大全:http://docs.oracle.com/cd/E11882_01/server.112/e17766/toc.htm#BEGIN