centos7安装oracle11g(根据oracle官方文档安装,解决图形界面安装问题)
一、系统及安装包
操作系统:centos 7.4
oracle版本:oracle 11g r2
二、centos环境配置
安装数据库所需要的软件包
[root@localhost data]# yum -y install binutils* compat-libcap1* compat-libstdc++* gcc* gcc-c++* glibc* glibc-devel* ksh* libaio* libaio-devel* libgcc* libstdc++* libstdc++-devel* libXi* libXtst* make* sysstat* elfutils* unixODBC*
创建运行oracle数据库的系统用户和用户组(root账户下创建)
[root@localhost]# groupadd oinstall #创建用户组oinstall
[root@localhost]# groupadd dba #创建用户组dba
[root@localhost]# useradd -g oinstall -g dba -d /data/oracle -m oracle #创建oracle用户,并加入到oinstall和dba用户组
[root@localhost]# passwd oracle #设置用户oracle的登陆密码,不设置密码,在CentOS的图形登陆界面没法登陆
Changing password for user oracle.
New password: # 密码
BAD PASSWORD: The password is shorter than characters
Retype new password: # 确认密码
[root@localhost]# id oracle # 查看新建的oracle用户
uid=(oracle) gid=(dba) groups=(dba)
创建oracle数据库的安装目录
[root@localhost]# mkdir -p /data/oracle #oracle数据库安装目录
[root@localhost]# mkdir -p /data/oraInventory #oracle数据库配置文件目录
[root@localhost]# mkdir -p /data/database #oracle数据库软件包解压目录
修改操作系统标识
[root@localhost data]# cat /etc/redhat-release
redhat-
# 修改主机名
[root@localhost data]# hostnamectl set-hostname redhat-
关闭防火墙和selinux
systemctl status firewalld.service #查看防火墙状态(运行中)
systemctl stop firewalld.service #关闭防火墙
systemctl disable firewalld.service #禁止使用防火墙(重启也是禁止的) # 关闭selinux
sed -i.bak '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
修改内核参数
# 在/etc/sysctl.conf中加入 vm.swappiness =
net.ipv4.tcp_tw_recycle =
net.ipv4.tcp_tw_reuse =
net.ipv4.tcp_syncookies =
net.ipv4.tcp_max_tw_buckets =
net.ipv4.tcp_keepalive_time =
net.ipv4.tcp_fin_timeout =
net.ipv4.tcp_max_orphans =
net.ipv4.tcp_max_syn_backlog =
net.ipv4.tcp_timestamps =
net.ipv4.ip_local_port_range =
net.core.somaxconn =
net.core.netdev_max_backlog =
net.core.rmem_default =
net.core.rmem_max =
net.core.wmem_default =
net.core.wmem_max =
kernel.shmall =
kernel.shmmax =
kernel.shmmni =
kernel.sem=
fs.file-max =
fs.aio-max-nr = 1048576 #使配置修改内核的参数生效
sysctl -p
对oracle用户设置限制,提高软件运行性能
vi /etc/security/limits.conf oracle soft nproc
oracle hard nproc
oracle soft nofile
oracle hard nofile End of file
配置用户的环境变量
vi /data/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/.local/bin:$HOME/bin export PATH export ORACLE_BASE=/data/oracle #oracle数据库安装目录
export ORACLE_HOME=$ORACLE_BASE/product/11.2./db_1 #oracle数据库路径
export ORACLE_SID=orcl #oracle启动数据库实例名
export ORACLE_UNQNAME=orcl
export ORACLE_TERM=xterm #xterm窗口模式安装
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH #添加系统环境变量
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #添加系统环境变量
export LANG=C #防止安装过程出现乱码
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK #设置Oracle客户端字符集,必须与Oracle安装时设置的字符集保持一致
使用户的环境变量生效
source /data/oracle/.bash_profile
三、安装oracle
将oracle安装包上传到/usr/local/src下
unzip linux.x64_11gR2_database_1of2.zip -d /data/database/
unzip linux.x64_11gR2_database_2of2.zip -d /data/database/
运行/data/database/database下的图形安装脚本,即可开始安装
[root@redhat- database]# ll
total
drwxr-xr-x oracle oinstall Aug doc
drwxr-xr-x oracle oinstall Aug install
drwxrwxr-x oracle oinstall Aug response
drwxr-xr-x oracle oinstall Aug rpm
-rwxr-xr-x oracle oinstall Aug runInstaller
drwxrwxr-x oracle oinstall Aug sshsetup
drwxr-xr-x oracle oinstall Aug stage
-rw-r--r-- oracle oinstall Aug welcome.html
[root@redhat- database]# ./runInstaller
四、oracle安装报错解决
大多数同学在第三步的时候,被各种报错整的焦头烂额。看了很多网上的教程,都是千篇一律,根本解决不了问题。是在木有办法,看了小布老师的oracle视频(他是参照oracle的官方文档进行教学的),完美解决了。
报错一:
报错信息:
Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed 原因分析:
这个是由于图形化设置不当造成的,需要正确的执行xhost +以及设置DISPLAY参数 步骤:
1.安装VNCSERVER(root用户)
yum install tigervnc-server -y
vncserver 2.设置DISPLAY参数以及xhost +
这一步很重要。网上的教程几乎都是 export DISPLAY=db1.us.oracle.com:1,export DISPLAY=127.0.0.1:1,完全不行!真是耽误时间啊!!
export DISPLAY=xxxxx:1,这个"xxxxx"应该填的是Xmanager安装所在的服务器的网关。
----------------------------
假设你在虚拟机上安装oracle,虚拟机ip是192.168.1.100。而在自己的笔记本电脑上安装xmanager,ip是192.168.18.100(网关192.168.18.1)
那你就应该在虚拟机上这样设置:运行命令export DISPLAY=192.168.18.1:1。
----------------------------
再运行xhost +:
[oracle@localhost bin]$ xhost +
access control disabled, clients can connect from any host
提示access control disabled就说明可以了。 提示:也许你按照这个步骤还是不行。这时候千万别灰心,一步一步排查,肯定可以的
centos7安装oracle11g(根据oracle官方文档安装,解决图形界面安装问题)的更多相关文章
- Oracle官方文档在线查看
1.9i Oracle官方文档在线查看 http://www.oracle.com/pls/db92/homepage 2.10g Oracle官方文档线查看 http://www.oracle.co ...
- 【Phabricator】教科书一般的Phabricator安装教程(配合官方文档并带有踩坑解决方案)
随着一声惊雷和滂沱的大雨,我的Phabricator页面终于在我的学生机上跑了起来. 想起在这五个小时内踩过的坑甚如大学隔壁炮王干过的妹子,心里的成就感不禁油然而生. 接下来,我将和大家分享一下本人在 ...
- Oracle 官方文档地址
官方文档地址: https://docs.oracle.com/cd/E11882_01/index.htm
- Linux下安装Oracle的两种方式------有图形界面安装和静默安装
本文参考文章 http://blog.csdn.net/zonej/article/details/50680857 http://blog.csdn.net/tongzidane/article/d ...
- oracle官方文档_查看初始化參数(举例)
原创作品,出自 "深蓝的blog" 博客.深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/46864217 记录 ...
- oracle官方文档的阅读方法
Concept 包含了 oracle 数据库里面的一些基本概念和原理, 比如 数据库逻辑结构, 物理结构, 实例结构, 优化器, 事务等. PDF 460页 Reference 包含了动态性能视图, ...
- 如何查看 oracle 官方文档
Concept 包含了 oracle 数据库里面的一些基本概念和原理, 比如 数据库逻辑结构, 物理结构, 实例结构, 优化器, 事务等. PDF 460页 Reference 包含了动态性能视图, ...
- [置顶] 阅读Oracle官方文档指南
还在整理中.... EXPDP/IMPDP 相关文档:Utilities 2 Data Pump Export 3 Data Pump Import SQL*Loader 相关文档:Utilities ...
- docker官方文档学习-1-Docker for mac安装配置
https://docs.docker.com/docker-for-mac/ Get started with Docker for Mac 首先像在本博客docker-1-环境安装及例子实践处将环 ...
随机推荐
- HTML5中的article和section的区别
HTML5中的article和section的区别 一.总结 一句话总结: article和section都相当于语义化后的div,article强调独立性,section强调分段或者分块 1.art ...
- arcpy显示指定表的索引属性
import arcpy feature_class = "c:/data/well.shp" # Create a list of indexes using the ListI ...
- How to Hack Unity Games using Mono Injection Tutorial
https://guidedhacking.com/threads/how-to-hack-unity-games-using-mono-injection-tutorial.11674/ Unity ...
- delphi 运算符重载
譬如上面的 record 可以这样声明: type TMyRec = record name: string; age: Word; class operator Grea ...
- ISO/IEC 9899:2011 条款6.7.3——类型限定符
6.7.3 类型限定符 语法 1.type-qualifier: const restrict volatile _Atomic 约束 2.除了指针类型(其被引用的类型是一个对象类型)之外的类型,不应 ...
- linux6 x86-64 RPM包安装mysql5.7.20
注意版本和此次更新时间 2017-12-03 版本:mysql-5.7.20-1.el6.x86_64 环境:linux6.x 官方下载地址: wget https://dev.mysql.co ...
- Python记录-python执行shell命令
# coding=UTF-8 import os def distcp(): nncheck = os.system('lsof -i:8020') dncheck = os.system('lsof ...
- yarn那些事儿
本篇文章立足于mac. 一.安装yarn 1.通过homebrew brew update brew install yarn 2.通过脚本 curl -o- -L https://yarnpkg.c ...
- LODOP打印超文本字符串拼接2 单选选择css样式表格
之前的相关字符串拼接的博文:LODOP打印超文本字符串拼接1 固定表格填充数值之前博文介绍过,字符串可以随意拼接,只要最后组织成的字符串是自己需要的超文本就可以了,前面还有一篇也是拼接样式的:Lodo ...
- 【Leetcode_easy】989. Add to Array-Form of Integer
problem 989. Add to Array-Form of Integer 参考 1. Leetcode_easy_989. Add to Array-Form of Integer; 完