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测试环境搭建从基 ...
随机推荐
- 向后台提交数据:通过form表单提交数据需刷新网页 但通过Ajax提交数据不用刷新网页可通过原生态Ajax或jqueryAjax。Ajax代码部分
原生态Ajax提交表单:需要借助XMLHttpRequest对象的open,要收通过post发送请求还要setRequsetHeader,然后把数据发送给后端,代码如下 目录结构 index.py代码 ...
- 使用Vue-Router 2实现路由功能
转自:http://blog.csdn.net/sinat_17775997/article/details/54710420 注意:vue-router 2只适用于Vue2.x版本,下面我们是基于v ...
- SpringBoot设置文件上传大小限制--默认为1M
SpringBoot默认上传文件大小不能超过1MB,超过之后会报以下异常:org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeL ...
- js截图及绕过服务器图片保存至本地(html2canvas)
今天要分享的是用html2canvas根据自己的需求生成截图,并且修复html2canvas截图模糊,以及绕过服务器图片保存至本地. 只需要短短的几行代码,就能根据所需的dom截图,是不是很方便,但是 ...
- 从发布订阅模式到redux(一)
最近在学习的过程中,学习了一些关于redux的一些知识,学之前用redux,虽然会用但是实现的原理就不是特别清楚,天天沉迷于搬砖 总是这木搬砖也不是个事啊,就准备开始深入了解一些原理性的东西 首先在看 ...
- Android滑动冲突解决
(1).场景一:外部滑动方向跟内部滑动方向不一致,比如外部左右滑动,内部上下滑动 ViewPager+Fragment配合使用,会有滑动冲突,但是ViewPager内部处理了这种滑动冲突 如果 ...
- (后端)SpringBoot中Mybatis打印sql(转)
原文地址:https://www.cnblogs.com/expiator/p/8664977.html 如果使用的是application.properties文件,加入如下配置: logging. ...
- mysql之数据备份与恢复
本文内容: 复制文件法 利用mysqldump 利用select into outfile 其它(列举但不介绍) 首发日期:2018-04-19 有些时候,在备份之前要先做flush tables , ...
- 单纯linux系统下hadoop2.7.3 eclipse,记一次成功的运行wordcount的注意事项
hadoop要正确安装好 hadoop eclipse plugin要对应相应的eclipse版本 define hadoop location mr master:9000 另一个9001 下面的 ...
- C#-运算符(四)
算术运算符 +:两个操作数相加,例:2+3得5 -:第一个操作数减去第二个操作数 例:5-3得2 *:两个操作数相乘,例:2*3得6 /:分子除以分母,例:5/2得2 %:取模运算符,整除后的余数,例 ...