Home > Database > Mysql Tutorial > Red Hat Enterprise Linux 5下安装Oracle全程图解

Red Hat Enterprise Linux 5下安装Oracle全程图解

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:54:35
Original
875 people have browsed it

一、Red Hat Enterprise Linux 5下安装Oracle前准备:下载文件Oracle Database 10g Release 2(10.2.0.1) Software解压文件解压文

一、Red Hat Enterprise Linux 5下安装Oracle前准备:

下载文件

Oracle Database 10g Release 2(10.2.0.1) Software

解压文件

解压文件命令:

unzip 10201_database_linux32.zip

解压后的文件夹可能“database”或“db/Disk1”

Hosts文件

在/etc/hosts 文件中包含一个完整合法的服务器名

设置内核参数

在/etc/sysctl.conf中添加以下行:

#kernel.shmall = 2097152

#kernel.shmmax = 2147483648

kernel.shmmni = 4096

# semaphores: semmsl, semmns, semopm, semmni

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.wmen_max=262144

运行下面的命令应用以上OS参数

/sbin/sysctl -p

添加以下行到/ect/security/limits.conf文件中

*               soft    nproc   2047

*               hard    nproc   16384

*               soft    nofile 1024

*               hard    nofile 65536

如果/etc/pam.d/login文件中没有以下行,则添加以下内容:

session    required     /lib/security/pam_limits.so

修改/etc/selinux/config文件来关闭linux防火墙,确保SELINUX设置如下:

SELINUX=disabled

检查安装包

检查是否具备以下安装包:

make-3.79.1

gcc-3.2.3-34

glibc-2.3.2-95.20

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

libXp

openmotif21-2.1.30-8

setarch-1.3-1

查询所需安装包是否完整(缺少补啥)

rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel libXp

用以下命令安装以下包:

rpm -Uvh [包名称]添加组和用户

groupadd oinstall

groupadd dba

groupadd oper

useradd -g oinstall -G dba oracle

passwd oracle

检查内存和磁盘

检查内存情况

# grep MemTotal /proc/meminfo

# grep SwapTotal /proc/meminfo

检查磁盘情况

#df -h

建立安装目录

建立oracle安装目录

#mkdir -p /u01/app/oracle/product/10.2.0/db_1

#chown -R oracle:install /u01/

# chmod -R 775 /u01/app/oracle

版本信息

因为默认rhel5.1不支持10.2,0.1,所以要修改一些参数

编辑/etc/RedHat-release文件替换现在的版本信息(Red Hat Enterprise Linux Server release 5 (Tikanga))

redhat-4以可以通过修改安装文件oraparam.ini,添加redhat-5(二者选一即可)

# vi /10201_database_linux32/database/install/oraparam.ini

### #[Certified Versions]

Linux=redhat-3,SUSE-9,redhat-4,redhat-5,UnitedLinux-1.0,asianux-1,asianux-2]再添加

[Linux-redhat-5.0-optional]TEMP_SPACE=80

SWAP_SPACE=150

MIN_DISPLAY_COLORS=256用户环境变量

以oracle用户登陆,在.bash_profile文件尾添加以下行:

# Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME

ORACLE_SID=TSH1; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

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

linux

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template