oracle(环境搭建一)
图形化安装Oracle11gR2
环境:
verify: CentOS release 6.5 (Final)
release:CentOS release 6.7 (Final)
1、登录到root用户下:
2、安装相关软件依赖包
灰色部分存在问题,不执行
切换到yum.repos.d目录下:
cd /etc/yum.repos.d
使用wget下载oracle提供的yum库:
wget https://public-yum.oracle.com/public-yum-ol6.repo
下载yum源
执行yum语句安装所有的oracle所需的先决条件:
yum install oracle-rdbms-server-11gR2-preinstall
如果出现” GPG key retrieval failed “的错误:
wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
如果以上步骤不成功则依次检查安装以下包:
检查:rpm -q package-name
安装:yum install -y package-name
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
3、创建oracle用户,组
创建Oracle安装组oinstall,数据库管理员组dba,及oracle用户
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -G dba oracle(主组oinstall,其它组:dba)
# passwd oracle
4、修改操作系统参数
配置内核参数:
可以直接在/etc/sysctl.conf文件中添加以下参数:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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 = 1048576
然后使用/sbin/sysctl -p --使内核参数实时生效
5、为Oracle用户设置Shell限制
使用命令vim /etc/security/limits.conf添加以下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
6、建立oracle安装目录和环境变量配置:
建立安装目录
创建oracle用户目录: mkdir -p /u01/app/oracle
指定所有者、组和权限
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/
在/etc/profile末尾增加oracle相关限制
vim /etc/profile
#Oracle判断
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
设置Oracle用户环境变量
[root@qiao oracle]# su - oracle --切换到Oracle用户下,接下来的步骤都是oracle用户下操作
vim ~/.bash_profile --编辑Oracle环境变量配置文件
添加以下内容:
export ORACLE_BASE=/u01/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=ocp --默认实例名
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK/UTF8 ---数据库编码
export NLS_DATE_FORMAT=YYYY/MM/DD ----数据库时间格式
----以下两个设置是用来设置rlwrap插件的环境
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rman"
source /home/oracle/.bash_profile --使配置生效
5、安装数据库软件
5.1、准备Oracle11g安装文件并解压
unzip p13390677_112040_Linux-x86-64_1of7.zip -d /u01/app/
unzip p13390677_112040_Linux-x86-64_2of7.zip -d /u01/app/
5.2、静默安装
cd /u01/app/database/response
cd /u01/app/database/response
mv db_install.rsp db_install.rsp.bak
vim db_install.rsp
添加压缩包下的db_install.rsp的内容
文件中ORACLE_HOSTNAME,要与主机名一致
chmod 640 db_install.rsp
灰色部分手动建库时会做
vim dbca.rsp
修改以下内容:
GDBNAME = "upcrm"
SID = "upcrm"
SYSPASSWORD = "upcrm"
SYSTEMPASSWORD = "upcrm"
EMCONFIGURATION = "LOCAL"
SYSMANPASSWORD = "upcrm"
DBSNMPPASSWORD = "upcrm"
vim netca.rsp
修改以下内容:
INSTALL_TYPE=""custom""
cd ..
./runInstaller -silent -responseFile /u01/app/database/response/db_install.rsp
安装失败,返回检查配置
最后会提示成功
在此过程中的安装都会记录到:
/u01/app/oracle/oraInventory/logs/installActions2016-08-25_06-31-10AM.log
灰色部分建库时会执行
cd /u01/app/database/response
dbca -silent -cloneTemplate -responseFile ./dbca.rsp
netca /silent /responseFile /u01/app/database/response/netca.rsp
切换到root用户下
vim /etc/hosts 查看是否有hostname显示的主机名称
如果没有就添加上
灰色部分建库时会执行
切换回oracle用户下:
lsnrctl start
sqlplus / as sysdba
SQL> create spfile from pfile='/u01/app/admin/upcrm/pfile/init.ora';
SQL> startup nomount;
6、安装rlwrap实现sqlplus的回显功能
[oracle@localhost home]$ rpm -ivh rlwrap-0.37-1.el6.x86_64.rpm
遇上的一些错误:
1. PRVF-0002 : Could not retrieve local nodename
信息:
[oracle@QYSD-Test database]$ ./runInstaller -silent -responseFile /u01/app/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 41293 MB Passed
Checking swap space: must be greater than 150 MB. Actual 7903 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-11-14_08-25-10PM. Please wait ...[oracle@QYSD-Test database]$ [FATAL] PRVF-0002 : Could not retrieve local nodename
A log of this session is currently saved as: /tmp/OraInstall2016-11-14_08-25-10PM/installActions2016-11-14_08-25-10PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
解决方式:
修改/etc/hosts文件,添加主机名称。
例如:
127.0.0.1 QYSD-Test localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 QYSD-Test localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.115 QYSD-Test
2. Finding the most appropriate exit status for the current application
信息:
[oracle@QYSD-Test database]$ ./runInstaller -silent -responseFile /u01/app/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 41084 MB Passed
Checking swap space: must be greater than 150 MB. Actual 7903 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-11-14_08-32-42PM. Please wait ...[oracle@QYSD-Test database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[FATAL] [INS-13013] Target environment do not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /tmp/OraInstall2016-11-14_08-32-42PM/installActions2016-11-14_08-32-42PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2016-11-14_08-32-42PM/installActions2016-11-14_08-32-42PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
A log of this session is currently saved as: /tmp/OraInstall2016-11-14_08-32-42PM/installActions2016-11-14_08-32-42PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
日志信息:
WARNING: A log of this session is currently saved as: /tmp/OraInstall2016-11-14_08-32-42PM/installActions2016-11-14_08-32-42PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
INFO: Finding the most appropriate exit status for the current application
INFO: Exit Status is -3
INFO: Shutdown Oracle Database 11g Release 2 Installer
INFO: Unloading Setup Driver
解决方式:
将db_install.rsp中的DECLINE_SECURITY_UPDATES修改为:DECLINE_SECURITY_UPDATES=true
然后使用:./runInstaller -silent -ignoreSysPrereqs -ignorePrereq -responseFile /u01/app/database/response/db_install.rsp
oracle(环境搭建一)的更多相关文章
- nginx整合php+lua+oracle环境搭建
nginx整合php+lua+oracle环境搭建 标签: nginxluaoraclephplinux -- : 1473人阅读 评论() 收藏 举报 分类: 技术() 版权声明:本文为博主原创文章 ...
- 最全Oracle环境搭建之.NET程序员初遇Oracle
前言:如果你习惯了傻瓜式的一步步安装,那么Oracle和.NET搭配,绝对会让你头痛不已. 目前我不敢保证自己理解的Oracle理论部分100%正确,但环境安装过程一定可以收藏以备不时之需. 路这么长 ...
- oracle(环境搭建二)
Configuration oracle database Password file(非必要) cd $ORACLE_HOME/dbs/ ls 查看是否有init.ora 创建密码文件 ...
- ubuntu oracle 环境搭建
安装 Oracle SQL Developer Oracle客户端安装 https://oracle.github.io/odpi/doc/installation.html#linux
- VS2017离线安装与Oracle数据库开发环境搭建
记得之前使用VS2015打开老的MVC4项目,不能右键创建控制器和添加视图,让我非常不习惯!找遍了网络无果,最后只能回到VS2013,但我就是不喜欢用旧的VS,这是不是病... 1.将VS2017离线 ...
- oracle学习笔记1(环境搭建)
学习的开始先剧透一下,本人有点笨,本来想用oracle vbox,装个red hat+oracle,但是虚拟机一直报错,0x00000000内存不能written.所以便想到其他的办法,刚好接触了go ...
- 【转载】Maven+druid+MyBatis+Spring+Oracle+Dubbo开发环境搭建
原地址:http://blog.csdn.net/wp1603710463/article/details/48247817#t16 Maven+druid+MyBatis+spring+Oracle ...
- 小技巧:Mac下Metasploit渗透Oracle环境的搭建
Metasploit是一款开源的安全漏洞检测工具,可以帮助安全和IT专业人士识别安全性问题,验证漏洞的缓解措施,并管理专家驱动的安全性进行评估,提供真正的安全风险情报.这些功能包括智能开发,密码审计, ...
- Linux测试环境搭建的学习建议
随着Linux应用的扩展许多朋友开始接触Linux,根据学习Windwos的经验往往有一些茫然的感觉:不知从何处开始学起.这里介绍学习Linux测试环境搭建的一些建议. 一.Linux测试环境搭建从基 ...
随机推荐
- vue项目编辑修改时批量回显数据
selectCityServiceOne() { let sendData = { token: this.token, id: this.id } post_ajax('backStage/city ...
- JS之函数实际参数转换成数组的方法[].slice.call(arguments)
实际参数在函数中我们可以使用 arguments 对象获得 (注:形参可通过 arguments.callee 获得),虽然 arguments 对象与数组形似,但仍不是真正意义上的数组. 我们可以通 ...
- BZOJ2028: [SHOI2009]会场预约(set)
Time Limit: 20 Sec Memory Limit: 64 MBSubmit: 425 Solved: 213[Submit][Status][Discuss] Description ...
- 【读书笔记】iOS-使用GCD改善性能
一,队列简介. 有些与并行处理相关的术语令人迷惑.线程是一个常用的术语,在iOS应用中,线程是标准的POSIX线程.从技术上说,线程不过是一组指令,可在进程中独立地处理:在同一个进程中,可以有多个线程 ...
- 定位公网丢包的工具 mtr
1.使用mtr工具,可以显示从本机到目的ip之间的沿途路由器,从而可以确定丢包的位置. 2.windows 系统,可以使用winmtr工具.
- Java的优先级任务队列的实践
队列的基本理解 在说队列之前说两个名词:Task是任务,TaskExecutor是任务执行器 而我们今天要说的队列就完全符合某机构这个情况,队列在有Task进来的时候TaskExecutor就立刻开始 ...
- Testlink1.9.17使用方法(第九章 测试结果分析)
第九章 测试结果分析 QQ交流群:585499566 TestLink根据测试过程中记录的数据,提供了较为丰富的度量统计功能,可以直观的得到测试管理过程中需要进行分析和总结的数据.点击首页横向导航栏中 ...
- 实现wc部分功能 java
GitHub地址:https://github.com/carlylewen/ruangong 相关要求 基本功能 wc.exe -c file.c //返回文件 file.c 的字符数(实现 ...
- C#-hello world(二)
1.C# 程序构成 命名空间(Namespace) 一个 class Class 方法 Class 属性 一个 Main 方法 语句(Statements)和 表达式(Expressions) 注释 ...
- MongoDB 主从和Replica Set
目前主要的MongoDB高可用架构包含: 主从架构 Replica set副本集方式 sharding分片 注意:使用高可用架构后ips,qps相比单实例都会有一定程度的下降,其中rs下降不是他太明显 ...