5.上传Oracle 11g的安装包和静默安装oracle软件和数据库
# cd /u01/app/oracle
# mkdir –p oradsik
# chown –R oracle:oinstall oradisk
# chmod –R 755 oradisk通过FTP客户端上传安装包到该目录下,总共两个安装包
# jar xvf aix.ppc64_11gR2_database_1of2.zip
atabase/stage/properties/oracle.server_PE.properties
inflated: database/stage/properties/oracle.server_SE.properties
inflated: database/stage/properties/platforminfo.properties
inflated: database/stage/properties/ignoreMessages.txt
inflated: database/stage/properties/Paths.properties
inflated: database/stage/properties/sPaths.properties
inflated: database/stage/properties/ssPaths_aix.properties
inflated: database/stage/properties/userPaths.properties
inflated: database/stage/shiphomeinfo.properties
created: database/stage/ext/
created: database/stage/ext/jlib/
inflated: database/stage/ext/jlib/orai18n-mapping.jar
inflated: database/stage/ext/jlib/orai18n-utility.jar
inflated: database/stage/ext/jlib/emocmutl.jar
inflated: database/stage/ext/jlib/remoteinterfaces.jar 省略。。。。。。。
第二个包也一样自动解压到当前目录下。
# ls -ltr
-rw-r----- 1 root system 1564425851 Jan 28 16:30
aix.ppc64_11gR2_database_1of2.zip
-rw-r----- 1 root system 1007010341 Jan 28 16:30 aix.ppc64_11gR2_database_2of2.zip
drwxr-xr-x 9 root system 4096 Jan 28 16:33 database
到此我们就可以安装oracle数据库软件了!!!
我们先来介绍如何静默安装oracle软件,静默就是在没有图形化的方式下安装
首先我们先用root用户执行rootpre.sh这个脚本,如下
# cd database
# ./rootpre.sh
./rootpre.sh output will be logged in /tmp/rootpre.out_14-01-28.16:45:47
check_prereq[11]: test: argument expected
Saving the original files in /etc/ora_save_14-01-28.16:45:47....
Copying new kernel extension to /etc....
./rootpre.sh[348]: test: argument expected
Loading the kernel extension from /etc
Oracle Kernel Extension Loader for AIX
Copyright (c) 1998,1999 Oracle Corporation
Successfully loaded /etc/pw-syscall.64bit_kernel with kmid: 0x50bad000
Successfully configured /etc/pw-syscall.64bit_kernel with kmid: 0x50bad000
The kernel extension was successfuly loaded.
./rootpre.sh[413]: test: argument expected
Oracle安装的基础条件我们已经准备完毕,我们可以通过不同的安装方式来完成oracle数据库的安装!
我们这里提供一个oracle静默安装的方法。此方法适用于项目中不安装图形工具的方法。oracle强烈推荐使用OUI oracle通用图形安装工具。
# cd /etc/
# touch oraInst.loc
添加下面的内容
inventory_loc=/u01/app/oracle/oradata
inst_group=oinstall
设置一下oraInst.loc文件的使用权限
# chown oracle:oinstall /etc/oraInst.loc
# chmod 644 /etc/oraInst.loc
下面我们回到oracle安装文件所在目录
# cd /u01/app/oracle/oradisk/database/response
在这个目录下我们需要修改db_install.rsp文件。
# cp db_install.rsp db_install.rsp.bk
# vi db_install.rsp
oracle.install.option=INSTALL_DB_AND_CONFIG
ORACLE_HOSTNAME=cecgt
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oradata
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=oinstall
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=xupeng11g
oracle.install.db.config.starterdb.SID=xupeng11g
oracle.install.db.config.starterdb.memoryLimit=6144
oracle.install.db.config.starterdb.password.ALL=******
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u01/app/oracle/oradata
DECLINE_SECURITY_UPDATES=true
保存退出,到oracle安装目录下执行
$ ./runInstaller -silent -force -responseFile /u01/app/oracle/oradisk/database/response/db_install.rsp
********************************************************************************
Your platform requires the root user to perform certain pre-installation
OS preparation. The root user should run the shell script 'rootpre.sh' before
you proceed with Oracle installation. rootpre.sh can be found at the top level
of the CD or the stage area.
Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle
installation.
Answer 'n' to abort installation and then ask root to run 'rootpre.sh'.
********************************************************************************
Has 'rootpre.sh' been run by root? [y/n] (n)
Y 输入yes
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 190 MB. Actual 18018 MB Passed
Checking swap space: must be greater than 150 MB. Actual 11264 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-01-28_05-46-43PM. Please wait ...$ [INS-10103] Response file is not specified for this session.内容省略。。。。。
漫长的等待啊
出现下面提示
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root scripts to run
/u01/app/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
在root用户下运行脚本/u01/app/oracle/product/11.2.0/db_1/root.sh
完成,我们把数据库软件和数据库都已经创建好了。登陆数据库
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 29 11:51:07 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL>
SQL>
SQL>
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
我们完成了在没有图形界面下安装数据库软件和创建数据库的操作。
那我再使用oracle 力推的OUI 通用安装工具 runInstaller 安装软件和 dbca创建数据库。
我们可以删掉原来静默安装的数据库,方法有很多种在这里就不熬述了,我们直接开始了