首页 > 代码库 > CentOs5.8下安装Oracle12C
CentOs5.8下安装Oracle12C
12C安装向导:
http://docs.oracle.com/database/121/LTDQI/toc.htm
12C下载地址:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
1.安装Oracle依赖包
使用yum安装Oracle12C依赖,标注32 bit不需安装。没有yum环境的这些包可以在操作系统安装介质中查找。这些需要的安装依赖包可以在Oracle提供的12C在线安装文档中找到。操作系统版本不同,所需要的依赖包略有差别。
binutils-2.17.50.0.6compat-libstdc++-33-3.2.3compat-libstdc++-33-3.2.3 (32 bit)gcc-4.1.2gcc-c++-4.1.2glibc-2.5-58glibc-2.5-58 (32 bit)glibc-devel-2.5-58glibc-devel-2.5-58 (32 bit)kshlibaio-0.3.106libaio-0.3.106 (32 bit)libaio-devel-0.3.106libaio-devel-0.3.106 (32 bit)libgcc-4.1.2libgcc-4.1.2 (32 bit)libstdc++-4.1.2libstdc++-4.1.2 (32 bit)libstdc++-devel 4.1.2libXext-1.0.1libXext-1.0.1 (32 bit)libXtst-1.0.1libXtst-1.0.1 (32 bit)libX11-1.0.3libX11-1.0.3 (32 bit)libXau-1.0.1libXau-1.0.1 (32 bit)libXi-1.0.1libXi-1.0.1 (32 bit) make-3.81sysstat-7.0.2
2. 创建用户及组
[root@edu ~]# groupadd oinstall[root@edu ~]# groupadd dba[root@edu ~]# useradd -g oinstall -G dba oracle[root@edu ~]# passwd oracleChanging password for user oracle.New UNIX password: BAD PASSWORD: it is based on a dictionary wordRetype new UNIX password: passwd: all authentication tokens updated successfully.
3.修改系统内核参数
使用vi命令修改配置文件/etc/sysctl.conf,使用/sbin/sysctl –p命令使内核配置生效。
fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586
4.修改用户资源限制
使用vi命令修改配置文件/etc/security/limits.conf
oracle soft nofile 65536oracle hard nofile 65536oracle soft nproc 16384oracle hard nproc 16384oracle stack nproc 16384
5.创建安装目录
[root@edu ~]# mkdir -p /u01/app[root@edu ~]# chown -R oracle:oinstall /u01[root@edu ~]# chmod -R 775 /u01[root@edu ~]# ls -ld /u01/app/drwxrwxr-x 2 oracle oinstall 4096 Jan 29 20:54 /u01/app/[root@edu ~]#
6.配置Oracle用户环境变量
修改Oracle下的.bash_profile文件,不同的shell名称会有区别。source .bash_profile使修改生效。
ORACLE_BASE=/u01/app;export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1 export ORACLE_HOMEORACLE_SID=ORCL;export ORACLE_SIDTMP=/tmp;export TMPTMPDIR=/tmp;export TMPDIRPATH=$PATH:$ORACLE_HOME/bin;export PATHDISPLAY=:0.0;export DISPLAY
7. 解压执行安装Oracle12C软件
按照提示以root身份执行以下脚本:
[root@edu /]# /u01/oraInventory/orainstRoot.sh Changing permissions of /u01/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/oraInventory to oinstall.The execution of the script is complete.
[root@edu /]# /u01/app/product/12.1.0/dbhome_1/root.sh Performing root user operation for Oracle 12c The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/product/12.1.0/dbhome_1Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ...Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.
8.使用dbca创建数据库
在Oracle用户下直接执行dbca命令:
9.使用netca创建监听
10.验证数据库及监听安装
[oracle@edu database]$ sqlplus ‘/as sysdba‘SQL*Plus: Release 12.1.0.1.0 Production on Fri Jan 30 22:46:06 2015Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsSQL> select banner from v$version;BANNER----------------------------------------------------------------------------Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit ProductionPL/SQL Release 12.1.0.1.0 - ProductionCORE 12.1.0.1.0 ProductionTNS for Linux: Version 12.1.0.1.0 - ProductionNLSRTL Version 12.1.0.1.0 – Production
[oracle@edu database]$ lsnrctl statusLSNRCTL for Linux: Version 12.1.0.1.0 - Production on 30-JAN-2015 22:47:42Copyright (c) 1991, 2013, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edu.localdomain)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 12.1.0.1.0 - ProductionStart Date 30-JAN-2015 22:40:00Uptime 0 days 0 hr. 7 min. 42 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/product/12.1.0/dbhome_1/network/admin/listener.oraListener Log File /u01/app/diag/tnslsnr/edu/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=edu.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=edu.localdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/admin/ORCL/xdb_wallet))(Presentation=HTTP)(Session=RAW))Services Summary...Service "ORCL" has 1 instance(s). Instance "ORCL", status READY, has 1 handler(s) for this service...Service "ORCLXDB" has 1 instance(s). Instance "ORCL", status READY, has 1 handler(s) for this service...The command completed successfully
至此我们的Oracle12c数据库安装成功!
CentOs5.8下安装Oracle12C
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。