1.硬件和系统配置
CPU 双核
内存 1480M
swap 4G
/u01 16G
核心版本 2.6.32-431.29.2.el6.x86_64
2.配置系统和安装所需软件包
2.1 关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
2.2 关闭防火墙
chkconfig iptables off
2.3 进行一次升级
yum update -y
2.4 修改主机名并进行一次重启
vim /etc/sysconfig/network #填写你的主机名,例如ora1.fincod.com
reboot
2.5 修改hosts,添加一条主机记录
echo "192.168.2.200 ora1 ora1.fincod.com" >> /etc/hosts
ping ora1.fincod.com
2.6 安装oracle所需的软件包
yum install gcc gcc-c++ glibc glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel zlib-devel unzip compat-libcap1 compat-libstdc++-33 libaio-devel.i686 unixODBC-devel.i686 glibc-devel.i686 libstdc++-devel.i686 compat-libstdc++-33.i686 compat-libcap1.i686
2.7 添加oracle用户和组
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle
2.8 修改系统参数
2.8.1 /etc/sysctl.conf
fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500
2.8.2 应用核心参数
sysctl -p
2.8.3 /etc/security/limits.conf
oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768
2.9 创建安装文件夹
mkdir -p /u01/app/oracle/product/12.1.0.1/db_1 chown oracle:oinstall /u01 -R
3.切换到oracle用户,配置oracle用户环境变量
3.1 切换到oracle用户
su - oracle
3.2 编辑oracle用户环境变量配置文件~/.bash_profile
export TMP=/tmp export TMPDIR=$TMP
export ORACLE_HOSTNAME=ora1.fincod.com export ORACLE_UNQNAME=mydb export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/db_1 export ORACLE_SID=mydb PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; alias cdob='cd $ORACLE_BASE' alias cdoh='cd $ORACLE_HOME' alias tns='cd $ORACLE_HOME/network/admin' alias envo='env | grep ORACLE'
3.3 应用环境变量
source .bash_profile
4.获取安装包进行安装
4.1 从http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 下载oracle12c安装包
4.2 解压安装包
unzip linuxamd64_12c_database_1of2.zip unzip linuxamd64_12c_database_2of2.zip
4.3 进入database文件夹复制一个应答文件
cd database cp response/db_install.rsp inst.rsp
mkdir -p /u01/orainst/120.1.0.1/database/stage
4.4 修改应答文件
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0 oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=ora1 UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/orainst/12.1.0.1/database/stage SELECTED_LANGUAGES=en,zh_CN ORACLE_HOME=/u01/app/oracle/product/12.1.0.1/db_1 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=oper oracle.install.db.BACKUPDBA_GROUP=dba oracle.install.db.DGDBA_GROUP=dba oracle.install.db.KMDBA_GROUP=dba SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true
4.5 执行安装程序
./runInstaller -ignoreSysPrereqs -force -silent -responseFile /home/oracle/database/inst.rsp
4.6 查看是否有出错日志
tailf /u01/orainst/12.1.0.1/database/stage/logs/installActions2014-09-28_06-46-31AM.log
4.7 安装完成之后,用root执行root.sh
su - root sh -x /u01/app/oracle/product/12.1.0.1/db_1/root.sh
sh -x /u01/orainst/12.1.0.1/database/stage/orainstRoot.sh
后续:oracle 12C就安装完成了,剩下的配置内容,学习的时候再发上来