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.el5
说明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

本文转自 yzzh9 51CTO博客,原文链接:http://blog.51cto.com/java999/124177,如需转载请自行联系原作者

Linux上oracle的安装相关推荐

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

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

  2. linux oracle异常,Linux上oracle常见安装异常总结

    Linux下oracle常见安装错误总结 错误一: /tmp/OraInstall2007-12-30_02-16-11PM/jre/1.4.2/lib/i386/libawt.so: libXp.s ...

  3. Linux上Oracle 11g安装步骤图解(超详细图文教程)附带导入数据和新建数据库教程

    首先本文采用Docker方式快速在Linux上安装 目录 1.安装Docker容器 (1)登陆服务器,输入命令安装Docker容器 (2)安装完成后运行下列代码如果弹出Docker版本则表示安装成功 ...

  4. linux 上oracle安装

    Linux上oracle的安装 Linux 版本: Red Hat Enterprise Linux5.0 Oracle 版本: oracle 11g   Linux 版本检查 #cat /etc/i ...

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

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

  6. JProfiler远程监控Linux上Tomcat的安装过程细讲(步骤非常详细!!!)

    JProfiler远程监控Linux上Tomcat的安装过程细讲(步骤非常详细!!!) 1.文件准备: 服务器:CentOS Linux release 7.3.1611 (Core)     Apa ...

  7. linux下Oracle 10g安装(超级详细图解教程)

    linux下Oracle 10g安装(超级详细图解教程) 一,基本配置: 1.以root登录,挂载linux iso文件 [root@oracle ~]# hostnameoracle.junjie. ...

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

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

  9. 深度linux安装spotify,如何在 Linux 上使用 snap 安装 Spotify(声破天)

    如何在 Ubuntu Linux 桌面上安装 spotify 来在线听音乐? Spotify 是一个可让你访问大量歌曲的数字音乐流服务.你可以免费收听或者购买订阅,可以创建播放列表.订阅用户可以免广告 ...

最新文章

  1. 为什么现在大家喜欢用3*3小卷积?
  2. docker 漏洞测试 靶机环境 靶机平台 vulhub vulapps 简介
  3. 发现在创建云服务器ecs实例的磁盘快照时_玩转ECS第7讲|ECS数据保护-数据备份新特性与最佳实践...
  4. linux 7.0查看防火墙状态,centos7查看防火墙状态
  5. android4.4安全性,[原创]Android第二代加固(support 4.4-8.1)
  6. java8 重复注解_Java8新特性_重复注解与类型注解
  7. 解决Tomcat catalina.out 不断成长导致档案过大的问题
  8. php和python-浅析PHP与Python进行数据交互
  9. linux下 vim修改文件后如何保存
  10. 大K提醒各位常备DOS杀毒盘
  11. jquery 使用文档
  12. Windows XP 启动NetMeeting
  13. 储存管理系统c语言,《C语言,图书管理系统,未做文件储存系统.docx
  14. 竞品分析 | 不背单词、百词斩
  15. L298N模块接线纪实
  16. MongoDB之学习【一】:初识Mongo,路远道长,绵绵不绝
  17. confusion matix
  18. [TYVJ1143]飘飘乎居士的约会
  19. 泊松分布分布与Python图解
  20. 分布式链路追踪opentracing-go jaeger小示例

热门文章

  1. 在ActivMQ中添加jmx监控
  2. c语言:输出一个菱形图
  3. 真是好东西!一组动感的页面加载动画效果
  4. 测试某个端口是否开放的方法
  5. 用SecureCRT在linux系统下载文件
  6. python kafka 生产
  7. ros 消息队列与缓冲区_Spring Boot消息队列系统:RocketMQ初入门
  8. python include_tag_详解Python的Django框架中inclusion_tag的使用
  9. mysql while 游标_mysql 游标 loop while 的使用
  10. python 批量下载 代码_Python + Selenium +Chrome 批量下载网页代码修改