1.下载oracle luinux 5.8和oracle 10g数据库软件
2.操作系统安装
(1).图形化界面安装
(2).系统分区
/ 根分区(9G)
/home 安装oracle分区(10G)
swap 交换分区(1G)
(3).禁用防火墙
(4).禁用Selinux
3.搭建yum网络源
[root@localhost Server]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
[root@localhost yum.repos.d]# vim public-yum-el5.repo
[ol5_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL5/8/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1 --开启
[root@localhost yum.repos.d]# yum repolist
4.安装系统依赖包
[root@localhost ]# yum install
binutils
compat-*
gcc-*
glibc-*
libXp
libXt
libXtst
libaio*
libgcc
libstdc++-*
libgomp
make
numactl-devel
sysstat -y
5.修改内核参数
[root@localhost ~]# vim /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 --添加的参数生效
6.用户对系统的限制
[root@localhost ~]# vim /etc/security/limits.conf
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536
[root@localhost ~]#
7.用户对shell的限制
[root@localhost ~]# vim /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
[root@localhost ~]# . /etc/profile
8.用户登陆验证模块
[root@localhost security]# vim /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
[root@localhost security]#
9.主机各与IP地址解析,修改系统版本
[root@localhost ~]# vim /etc/hosts
192.168.2.143 oracle1
[root@localhost ~]# vim /etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)
[root@localhost ~]# vim /etc/oracle-release
Oracle Linux Server release 4
[root@localhost ~]#
10.创建用户和用户组
[root@localhost ~]# groupadd -g 500 oinstall
[root@localhost ~]# groupadd -g 501 dba
[root@localhost ~]# useradd -g oinstall -G dba oracle -d /home/oracle
[root@localhost ~]# chown -R oracle:oinstall /home/oracle
[root@localhost ~]# password oracle --设置密码
11.用oracle用户登陆设置环境变量
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vim ~/.bash_profile
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1/db_1
export ORACLE_SID=orcl10
export PATH=$ORACLE_HOME/bin:$PATH
[oracle@localhost ~]$
12.解压oracle 10g软件并安装
[root@localhost ~]# zcat 10201_database_linux_x86_64.cpio.gz | cpio -idvm
[root@localhost ~]# xhost +
[root@localhost ~]# su - oracle
[oracle@localhost ~]# cd database/
[oracle@localhost database]# ./runInstaller
13.登陆oracle数据库
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 22 14:41:09 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show user;
USER is "SYS"
SQL>
本文出自 “一起走过的日子” 博客,请务必保留此出处http://tongcheng.blog.51cto.com/6214144/1828676
oracle linux 5.8安装oracle 10数据库
原文地址:http://tongcheng.blog.51cto.com/6214144/1828676