安装centos6-7-oracle12cR1-database
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装centos6-7-oracle12cR1-database相关的知识,希望对你有一定的参考价值。
1:准备主机,安装centos6.7
需要选取安装的package groups
Base System > Base,
Compatibility libraries
Hardware monitoring utilities
Large Systems Performance
Network file system client
Performance Tools
Perl Support
Servers > Server Platform
System administration tools
Ftp Server
Desktops > Desktops
Desktop Platform
Fonts
General Purpose Desktop
Graphical Administration Tools
Input Methods
X Window System
Applications > Internet Browser
Development > Additional Development
Development Tools
2:修改主机名SCP01,修改后需要重启操作系统
相关文件/etc/sysconfig/network
[[email protected] Desktop]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=SCP01
配置/etc/hosts文件
[[email protected] Desktop]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.120.110 SCP01
/etc/resolv.conf
关闭iptables
service iptables status
service iptables stop
chkconfig iptables off
[[email protected] Desktop]# chkconfig --list|grep iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
修改selinux
[[email protected] Desktop]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
修改后需要重启操作系统或者执行setenforce Permissive
修改/etc/sysctl.conf
vi /etc/sysctl.conf
# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 930699040 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 65535
/sbin/sysctl -p
-----------使修改数据生效
修改/etc/security/limits.conf
vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
主机联网更新安装包
yum list
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y compat-libstdc++-33.i686
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc
yum install -y glibc.i686
yum install -y glibc-devel
yum install -y glibc-devel.i686
yum install -y ksh
yum install -y libgcc
yum install -y libgcc.i686
yum install -y libstdc++
yum install -y libstdc++.i686
yum install -y libstdc++-devel
yum install -y libstdc++-devel.i686
yum install -y libaio
yum install -y libaio.i686
yum install -y libaio-devel
yum install -y libaio-devel.i686
yum install -y libXext
yum install -y libXext.i686
yum install -y libXtst
yum install -y libXtst.i686
yum install -y libX11
yum install -y libX11.i686
yum install -y libXau
yum install -y libXau.i686
yum install -y libxcb
yum install -y libxcb.i686
yum install -y libXi
yum install -y libXi.i686
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
使用上述命令更新相应的RPM包
创建oracle用户和组
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle
修改/etc/security/limits.d/90-nproc.conf
vi /etc/security/limits.d/90-nproc.conf
#* soft nproc 1024
* - nproc 16384
root soft nproc unlimited
[[email protected] ~]# cat /etc/security/limits.d/90-nproc.conf
# Default limit for number of user‘s processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
#* soft nproc 1024
* - nproc 16384
root soft nproc unlimited
创建相应的目录
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
使用oracle用户
vi /home/oracle/.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 settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=SCP01
export ORACLE_UNQNAME=SCPDB01
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=SCPDB01
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
使用户配置生效后使用oracle用户上传12C的安装文件的压缩包
解压
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
开始安装
cd database/
./runInstaller
安装时还需要用root执行
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/12.1.0.2/db_1/root.sh
12c安装完后可以使用dbca创建一个测试库
以上是关于安装centos6-7-oracle12cR1-database的主要内容,如果未能解决你的问题,请参考以下文章
12.1 LNMP架构介绍 12.2 MySQL安装 12.3/12.4 PHP安装 12.5 Ng
12.1LNMP架构介绍12.2MySQL安装12.312.4 PHP安装12.5Nginx安装
12.1 LNMP架构介绍 12.2 MySQL安装 12.3/12.4 PHP安装 12.5 Ng
12.1 LNMP架构介绍 12.2 MySQL安装 12.3/12.4 PHP安装 12.5 Nginx介绍