oracle linux 5.8安装oracle 10g数据库

前端之家收集整理的这篇文章主要介绍了oracle linux 5.8安装oracle 10g数据库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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]# wgethttp://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 ~]#echo 500 > /proc/sys/vm/hugetlb_shm_group --将oracle用户的UID写入文件

[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

wKiom1eRvYfjVbk2AAMK3HjTtD8443.png-wh_50

wKiom1eRvYnj3M7iAAMgvtZ3l7A626.png-wh_50

wKioL1eRvYqSs3v5AAMoQuwf8mE686.png-wh_50

wKioL1eRvYzAgvspAAMPwVnW7vE698.png-wh_50

wKiom1eRvY7A8BnmAAJH3WFDCEw561.png-wh_50

wKiom1eRvY-Rll6PAAMx7f8KD0k557.png-wh_50

wKioL1eRvZGxjRLxAAM0WXOegyg977.png-wh_50

wKiom1eRvZLQNGsKAAM3DFNsrR0969.png-wh_50

wKioL1eRvZTB8SVnAAMItfER8w0796.png-wh_50

wKiom1eRvZbAsZnbAAMsBddjc4w860.png-wh_50

wKioL1eRvZjBqFolAAMkC8DQbYE289.png-wh_50

wKiom1eRvZnwPLCuAAJn_ukg2EM977.png-wh_50

wKioL1eRvZqzwgukAAFaVaH5uxs294.png-wh_50

wKioL1eRvbzggJjRAAFVWqpbrqU332.png-wh_50

wKiom1eRv1KRgas5AADx6_Pwf0Q468.png-wh_50

wKioL1eRv1PxC2ZOAADwkpP_AIw487.png-wh_50

wKiom1eRv1XSKwe8AAEFzSDnMRU131.png-wh_50

wKioL1eRv1aQ1u0AAAGQG8OrdsI498.png-wh_50


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>

猜你在找的Oracle相关文章