忙活了一个周,Oracle10g算是装上了,但在RedHat上配置应用总是有问题,又写了一个简单的web程序试了一下,可以正常运行,可能是项目自身的问题吧,先把Oracle的安装备份一下。
感觉Oracle的安装得讲究天时地利人和,网上的资料挺多,但即便全按照网上的步骤做,也很可能不成功,哎,碰运气吧。现在自己虽然装上了,但总感觉磕磕绊绊。
我使用的是RedHat 5,安装的时候选择了全部的包,除了Java(这个不想用它的Java1.4),目的就是避免问题一。
Java版本:
[root@localhost logs]# java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
Tomcat版本:5.5.30
一、建立安装Oracle需要的组、用户和目录
#groupadd oinstall
#groupadd dba
#groupadd oper
#useradd –g oinstall –G dba oracle
#passwd oracle /修改oracle用户的密码/
[root@localhost bin]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
#mkdir /oracle
#chown –R oracle:oinstall /oracle
#chmod –R 755 /oracle
PS:安装oracle的目录建议安装在一个单独的分区或磁盘上
使用oracle用户登录ftp主机,将oracle10g安装文件上传,因为使用诸如root用户上传文件时可能会有文件权限的问题,就先使用oracle用户操作。
二、修改内核参数
[root@localhost /]# vi /etc/sysctl.conf
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
使更改文件立即生效,使用命令:
[root@localhost /]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
三、设置oracle用户的Shell limit
[root@localhost /]# vi /etc/security/limits.conf
#add for oracle
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
修改文件,使上面的操作生效:
[root@localhost /]# vi /etc/pam.d/login
加入语句:
#add for oracle10g
session required /lib/security/pam_limits.so
session required pam_limits.so
PS:貌似如果文件中已经有的话可以不做操作,我的里面以前没有,新增
四、配置IP地址
安装RedHat的时候,最后使用静态地址,但安装时IP静态设定的选项太多,就选择DHCP,现在需要修改文件。
[root@localhost /]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29:3B:CF:16
ONBOOT=yes
IPADDR=192.168.198.134
NETMASK=255.255.255.0
GATEWAY=192.168.198.1
这时,切换用户到oracle操作
五、配置oracle用户的环境变量(使用oracle用户)
防止Oracle安装的页面显示乱码,设置语言环境
[oracle@localhost ~]$ export LC_CTYPE=en_US.UTF-8
打开/home/oracle/.bash_profile文件,加入如下内容:
#add for oracle 10g
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=crdsf
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
六、开始安装
使用root用户输入命令:
#xhost +
然后root用户logout,使用oracle 用户登录系统,不能使用su命令切换
前一步中,已经使用Oracle用户将oracle 10g的安装文件传到/home/oracle下(10201_database_linux32.zip),解压缩:
#unzip 10201_database_linux32.zip
完成后,目录中出现一个新文件夹database,
进入database文件夹,执行命令:
#./runInstaller –ignoresysprereqs /忽略系统检查/
安装过程中,需要使用root用户进行两项操作:
[root@localhost oraInventory]# /oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventory to 770.
Changing groupname of /oracle/oraInventory to oinstall.
The execution of the script is complete
图示:
安装完成后,运行netca命令配置监听程序
创建用户:
create user username
identified by passwd
default tablespace users
temporary tablespace TEMP
profile default;
--grant/revoke object privileges
grant select,update,delete,insert on SYS.ALL_ALL_TABLES to username;
--grant/revoke role privileges
grant connect to crdsf;
grant dba to crdsf;
--grant /revoke system privileges
grant unlimited tablespace to crdsf;
相关推荐
RedHat enterprise linux 5下安装 oracle 10g详细安装步骤
在Redhat Enterprise linux 5上 安装Oracle10g Release 2
在Redhat Enterprise Linux 5.4上安装Oracle 10g是一个相对复杂的过程,涉及到操作系统配置、环境变量设定以及数据库的安装与管理。本指南将详细介绍这个过程,并着重解决可能出现的em/dbca乱码问题以及如何配置...
RedHat Enterprise Linux 7下安装 Oracle 12C
- `在Redhat下安装Oracle10g.pdf`:这份文档详细介绍了在Redhat系统上安装Oracle10g的步骤,包括硬件需求、安装流程、数据库配置等。 - `在RedHat Enterprise Linux 5下安装JDK.doc`:这份文档将指导你如何在...
Redhat Enterprise Linux Advanced Server 4安装oracle11g
### RedHat Linux Enterprise 5.7 下安装Oracle 10g 教程 #### 一、准备工作 在开始安装Oracle 10g之前,确保已经完成以下准备工作: 1. **操作系统环境**: 确认使用的是RedHat Linux Enterprise 5.7版本。 2. **...
在 Linux 操作系统下安装 Oracle 数据库,尤其是较早期的版本如 Oracle 10g,可能会遇到不少挑战。这不仅是因为安装过程较为复杂,而且随着 Oracle 官方对旧版支持的逐步减少,获取相应的安装资源也变得困难起来。...
在Redhat Enterprise Linux 4环境下安装Oracle 10g是一个涉及多步骤的过程,需要对操作系统和数据库软件有深入的理解。以下是对安装过程的详细说明: 1. **安装前准备**: - **下载安装程序**:从Oracle官方网站...
在Red Hat Enterprise Linux (RHEL) 5.3环境下安装Oracle 10g Release 2时,必须确保系统具备特定的RPM(Red Hat Package Manager)包,因为Oracle数据库软件依赖于这些包来提供必要的库和编译工具。在描述中提到的...
redhat linux enterprise 5 安装Oracle10G .txt
RedHat_Linux6.3下Oracle_...本教程指导读者在RedHat_Linux6.3环境下安装Oracle_11g数据库,涵盖了安装Linux操作系统、配置Linux系统下的Oracle安装环境、安装Oracle软件和数据库、测试运行安装的Oracle系统四个步骤。
REHL linuxE5.5X 下ORACLE10G安装
在企业级Linux 5系统上安装Oracle 11g Release 1是一项技术性强且需要精心规划的任务。Oracle数据库是企业级的重要数据管理工具,而Red Hat Enterprise Linux (RHEL) 是一个稳定、安全且高性能的操作系统平台,是...
### Red Hat Enterprise Linux 5 下安装 Oracle 10g 相关知识点 #### 一、准备工作 ##### 1.1 引言 本文档详细介绍了如何在 Red Hat Enterprise Linux 5 (RHEL 5) 上逐步安装 Oracle 10g 企业版。尽管官方文档...
### 在RedHat Enterprise Linux 5下安装JDK的详尽指南 #### 一、系统环境与准备工作 在开始安装JDK之前,确保你的系统环境符合以下条件: - 操作系统:RedHat Enterprise Linux 5(本文以RedHat AS5.0为例) - ...
### Linux RedHat Enterprise 5.4 安装与Oracle 10g及VNC服务配置详解 #### 第一部分:Linux RedHat Enterprise 5.4 的安装及其问题解决 Linux RedHat Enterprise 5.4 是一款稳定且功能强大的企业级操作系统。在...
### RedHat Enterprise 5下Oracle10g安装详解 #### 系统要求与前期准备 在开始Oracle10g的安装之前,确保你的RedHat Enterprise 5系统满足以下硬件和软件要求: 1. **磁盘空间**:确保/tmp目录有至少400MB的自由...