Linux上oracle的安装

Linux 版本: Red Hat Enterprise Linux5.0
Oracle 版本: oracle 11g
 
Linux 版本检查 #cat /etc/issue
 
首先检查自己安装的 linux5.0 上是否安装有以下包(参照 oracle11g 文档):
The following packages (or later versions) must be installed:
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
若是10g则需以下包:
make-3.79.1
gcc-3.2.3-34
glibc-2.3.2-95.20
glibc-devel-2.3.2-95.20
glibc-devel-2.3.2-95.20 (32 bit)
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
gnome-libs-1.4.1.2.90-34.1 (32 bit)
openmotif21-2.1.30-8
setarch-1.3-1
libaio-0.3.96-3
libaio-devel-0.3.96-3

怎样检查是否安装呢?如检查 binutils-2.17.50.0.6-2.el5
[root@oracle11gdemo ~]# rpm -qa | grep binutils
binutils-2.17.50.0.6-2.el 5
说明 binutils-2.17.50.0.6-2.el5 已经安装。其它的依次检查。
将没有安装的包(去安装文件的 server 目录下找)上传到 linux 上,然后运行以下命令安装:
# rpm –ivh   *.rpm
 
下面的组和用户必须存在
The oinstall group (the oracle inventory group)
The dba group (the OSDBA group)
The oracle user (the oracle owner)
如果上面的组和用户不存在,用下面的步骤创建它们。
(1) 先查看这些组和用户是否存在 :
#grep oinstall /etc/group
#grep dba /etc/group
(2) 创建安装 oracle 所需的组和用户
#groupadd oinstall
#groupadd dba
 
 
bash: groupadd: command not found 错误解决: groupadd 命令是要用 ROOT 用户来执行的 , 而出错的用户是用 su root 切换到 ROOT 用户下 , 这个命令不会把环境带过去 !!!!, 要用
  su   -   root 命令。
 
(3) 建立一个目录作为 oracle 用户的缺省路径
创建目录: #mkdir –p /user01
建立一个缺省路径为 /user01/oracle 的用户 oracle ,同时 oracle 属于主组 oinstall ,和属于辅助组 dba : #useradd –g oinstall –G dba –d /user01/oracle oracle
 
将目录 user01 的属主改为 oracle ,属组改为 oinstall :
[root@oracle11gdemo /]# chown -R oracle.oinstall /user01
 
查看 nobody 是否存在: [root@oracle11gdemo user01]# id nobody
 
配置内核参数:
在 /etc/sysctl.conf 下通过 vi 添加如下参数
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
 
如下这些参数如法炮制
To increase the shell limits:
1. Add the following lines to the /etc/security/limits.conf file:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
2. Add or edit the following line in the /etc/pam.d/login file, if it does not
already exist:
session required pam_limits.so
3. Depending . the oracle user's default shell, make the following changes to the
default shell start-up file:
■ For the Bourne, Bash, or Korn shell, add the following lines to the
/etc/profile file (or the file . SUSE Linux Enterprise Server systems
/etc/profile.local ):
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
■ For the C shell ( csh or tcsh ), add the following lines to the
/etc/csh.login file (or the file . SUSE Linux Enterprise Server systems
/etc/csh.login.local ):
if ( $USER == "oracle" ) then
limit maxproc 16384
limit de.ors 65536
endif
 
 
以 oracle 用户名登录系统,配置 oracle 用户的环境。以 oracle 帐号用安装器来安装 oracle, 但是开始运行安装器之前,还得设定 oracle 用户的环境变量。
[oracle@oracle11gdemo ~]$ vi .bash_profile
用 vi 打开 .bash_profile, 然后添加一下变量:
ORACLE_BASE=/user01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=Wilson
PATH=$ORACLE_HOME/bin:$PATH
 
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
 
把 oracle 安装文件解压:
[root@oracle11gdemo user01]# unzip linux_11gR1_database_1013.zip
 
解压后将在当前目录生成一个 database 文件夹,将此文件夹移动的 oracle 用户的缺省路径的上一级路径:
[root@oracle11gdemo user01]# mv database/ /user01
 
将目录 database 的属主改为 oracle ,属组改为 oinstall :
[root@oracle11gdemo user01]# chown -R oracle.oinstall database/
 
 
以 oracle 用户登录图像界面,运行 database 下的 runInstaller:
./runInstaller
注:一定要用 oracle 用户登陆,不能用 root ,否则安装 oracle 时会出现错误:。。。。。 at least 256 color 。。。。。

如果用 root 登陆,要按以下操作:
# xhost +
# su - oracle
$ export DISPLAY= :0
$ ./runInstaller.sh
我建议用 oracle 登陆,简单,直接到 Disk1 目录下安装即可
# ./runInstaller
如果是第一次安装的话,系统会提示用 root 用户运行一个脚本文件,新开一个 console , su - root 后,按照提示运行即可。
之后的安装过程比较简单,一路 next 即可。

 
至此, oracle11g 安装完毕。下面介绍怎么创建一个数据库实例:
首先配置一个 Listener ,启动 linux 图形界面,打开终端,输入 netca ,然后一路 next 。
接着就可以配置数据库实例了,在终端中输入 dbca ,然后跳出 dbca 的图形界面,一路设置下去即可。
 
开启监听后才可以用 PLSQL Developer 连接。
开启监听命令: $ lsnrctl start
开启数据库实例命令: SQL> startup
 
错误解决:
1.Can't connect to X11 window server using '127.0.0.1:0.0' as the value of the DISPLAY variable.
解决:
在终端里   以root用户执行   #xhost   +
然后su   -   oracle
执行#export   DISPLAY=:0
运行runinstaller
 
2.若想在本地通过plsql访问服务器的oracle,需先把服务器的防火墙关闭。
解决:
1) 重启后生效
开启: chkconfig iptables
关闭: chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。

在开启了防火墙时,做如下设置,开启相关端口,
修改/etc/sysconfig/iptables 文件,添加以下内容:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

linux 上oracle安装相关推荐

  1. linux安装数据库乱码,Linux上Oracle安装前汉字乱码和安装后创建数据库乱码的解决方法...

    相信每一位在Linux上安装过Oracle的朋友都受过汉字"口口"形乱码的困扰,在论坛上搜索了一下,没有找到完整的解决方案,大都是建议将Linux改成英文环境,有部分回复提到过更改 ...

  2. 在RedHat Enterprise Linux 上Oracle 9i的安装配置与调优

    1 安装配置Oracle 9i数据库 本章描述内容如下所示: 1.1 安装前的准备工作 介绍在安装Oracle之前所需的准备工作. 1.2安装前的系统设置 介绍在安装Oracle之前所必须的系统设置. ...

  3. oracle的安装liunx,linux上oracle简单安装

    当前位置:我的异常网» Linux/Unix » linux上oracle简单安装 linux上oracle简单安装 www.myexceptions.net  网友分享于:2013-07-27  浏 ...

  4. ubuntu intellij java_在Linux上,安装Intellij IDEA进行Scala开发

    2016年4月27日 通过瑞雷斯·艾奥阿尼 介绍 Scala是一种编程语言,最近几年开始蓬勃发展.在撰写本文时,流行的TIOBE Index将其排名为比Haskell或Go等更流行的语言更常用.如果您 ...

  5. linux oracle 删除为空的dbf,Linux上Oracle误删除一个没有用的dbf表空间文件

    在Linux下面安装好Oracle只有,Linux 下面就会有一个Oracle用户,Linux上Oracle误删除一个没有用的dbf表空间文件,导致数据库连接 在Linux下面安装好Oracle只有, ...

  6. 在linux环境下启动es,linux上Elasticsearch 安装配置、网页访问

    一.ElasticSearch简述 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch ...

  7. Linux下Oracle安装宝典(转)

    Linux下Oracle安装宝典(转) 笔者用的是Linux版的Oracle V8.1.6,安装在RedHat Linux 6.0上. ??Oracle的安装包括企业版服务器端和客户端两部分,用户可以 ...

  8. redis在Linux上的安装

    1.redis在Linux上的安装 1)安装redis编译的c环境,yum install gcc-c++ 2)将redis-2.6.16.tar.gz上传到Linux系统中 3)解压到/usr/lo ...

  9. linux能安装音乐软件吗,Linux上如何安装使用音乐软件SoundCloud

    Linux上如何安装使用音乐软件SoundCloud 卡饭网 梦在深巷 2015-02-13 18:16:08 对于喜欢音乐的朋友来说,SoundCloud是个不错的音乐软件,SoundCloud是德 ...

最新文章

  1. 教你如何以对象的方式思考
  2. 未来一年最有可能成为独角兽的29家美国初创公司
  3. 2018年智能化发展趋势:语音交互全球开战、AI终端趋势显现
  4. 四针手表指的是什么_1000~1500元的男士手表推荐
  5. 基于session认证
  6. 隐藏的iscroll元素显示后不能滚动问题
  7. 计算机主机爆炸,刚装的PC:开机使用突然爆炸!竟是电源惹的祸
  8. 【英语学习】【Daily English】U08 Dating L04 We can Make it another time.
  9. 拳王虚拟项目公社:网上比较容易挣到钱方式?虚拟资源项目是赚钱的最佳选择
  10. 使用浏览器地址栏调用CXF Webservice的写法
  11. 进销存excel_进销存管理系统excel模板
  12. 【美赛】全面助力2023年美国大学生数学建模竞赛,祝大家取得好成绩
  13. Win11开始菜单怎么改成Win10模式?
  14. python mysql版本查看_怎么查看mysql版本
  15. springboot控制台日志打印到日志文件 (请求路径,执行sql,参数等)
  16. 阿里云ca证书申请和安装(Nginx)
  17. 微信小程序加入企业微信群聊
  18. 2019联想创新科技大会:“端边云网智”一切就绪
  19. 浅谈JDK8相对于JDK7的一些新特性
  20. KeePass v1.21

热门文章

  1. 全国志愿信息服务器,全国志愿者服务信息系统官网登录,2020全国志愿者服务信息系统官网登录注册入口预约 v1.0-手游汇...
  2. win10和win7游戏测试软件,是时候和Win7说再见了!Win10游戏性能最多领先50%
  3. linux php7扩展查看,linux安装PHP7以及扩展
  4. grafana官方使用文档_使用 Loki 采集微服务日志
  5. Java的字符串常量池
  6. 【c语言】扶老奶奶过街
  7. unity 继承了 获取_Unity游戏开发——设计模式概述
  8. python实现shell_基于 Python 的简易 Shell 实现
  9. nginx三大功能(之二负载均衡)
  10. python脚本多线程爬虫爬电脑壁纸