热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

oraclelinux5.8安装oracle10g数据库

1.下载oracleluinux5.8和oracle10g数据库软件2.操作系统安装 (1).图形化界面安装 (2).系统分区     &

1.下载oracle luinux 5.8和oracle 10g数据库软件


2.操作系统安装

  (1).图形化界面安装

  (2).系统分区

     /       根分区(17G)

     /boot    安装oracle分区(512M)

     swap     交换分区(4G)

  (3).禁用防火墙

  (4).禁用Selinux


3.搭建yum网络源

[root@oracle10g ~]# cd /etc/yum.repos.d/

[root@oracle10g yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo

[root@oracle10g 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@oracle10g yum.repos.d]# yum repolist


4.安装系统依赖包

[root@oracle10g ~]# yum install binutils compat-*  gcc-*  glibc-*  libXp  libXt  libXtst  libaio* libgcc  libstdc++-*  libgomp  make  numactl-devel  sysstat  elfutils-libelf-devel unixODBC-*  -y


5.修改内核参数

[root@oracle10g ~]# 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@oracle10g ~]# sysctl -p      --添加的参数生效


6.用户对系统的限制

[root@oracle10g ~]# vim /etc/security/limits.conf 

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

[root@oracle10g ~]#


7.用户对shell的限制

[root@oracle10g ~]# 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@oracle10g ~]# . /etc/profile


8.用户登陆验证模块

[root@oracle10g ~]# vim /etc/pam.d/login 

session   required     /lib/security/pam_limits.so

session   required     pam_limits.so

[root@oracle10g ~]#


9.主机各与IP地址解析,修改系统版本

[root@oracle10g ~]# vim /etc/hosts

192.168.2.143  oracle1

[root@oracle10g ~]# vim /etc/redhat-release 

Red Hat Enterprise Linux Server release 4 (Tikanga)

[root@oracle10g ~]# vim /etc/oracle-release 

Oracle Linux Server release 4

[root@oracle10g ~]#


10.创建用户和用户组

[root@oracle10g ~]# groupadd  -g 500 oinstall

[root@oracle10g ~]# groupadd  -g 501 dba

[root@oracle10g ~]# useradd -u 500 -g oinstall -G dba -d /home/oracle oracle

[root@oracle10g ~]# echo 500 > /proc/sys/vm/hugetlb_shm_group --将oracle用户的UID写入文件

[root@oracle10g ~]# chown -R oracle:oinstall /home/oracle

[root@oracle10g ~]# password oracle    --设置密码


11.创建目录和设置环境变量

[root@oracle10g ~]# mkdir /u01/oracle/product/10.2.0.1/db_1 -p

[root@oracle10g ~]# chown -R oracle:oinstall /u01/

[root@oracle10g ~]# vim /home/oracle/.bash_profile 

export ORACLE_BASE=/u01/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1/db_1

export ORACLE_SID=orcl10g

export PATH=$ORACLE_HOME/bin:$PATH

[root@oracle10g ~]# . /home/oracle/.bash_profile 


12.解压oracle 10g软件并安装

[root@oracle10g ~]# xhost +

access control disabled, clients can connect from any host

[root@oracle10g ~]# su - oracle

[oracle@oracle10g ~]$ zcat 10201_database_linux_x86_64.cpio.gz  | cpio  -idvm

[oracle@oracle10g ~]$ cd database/

[oracle@oracle10g database]$ ./runInstaller 

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

[root@oracle10g ~]# sh /u01/oracle/oraInventory/orainstRoot.sh 

Changing permissions of /u01/oracle/oraInventory to 770.

Changing groupname of /u01/oracle/oraInventory to oinstall.

The execution of the script is complete

[root@oracle10g ~]# sh /u01/oracle/product/10.2.0.1/db_1/root.sh

Running Oracle10 root.sh script...


The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u01/oracle/product/10.2.0.1/db_1


Enter the full pathname of the local bin directory: [/usr/local/bin]: 

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

[root@oracle10g ~]# 

oracle linux 5.8安装oracle 10g数据库


13.创建数据库

[oracle@oracle10g database]$ dbca

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库


14.创建监听

[oracle@oracle10g database]$ netca

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

oracle linux 5.8安装oracle 10g数据库

[oracle@oracle10g database]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-NOV-2016 16:56:10

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle10g)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                12-NOV-2016 16:52:01

Uptime                    0 days 0 hr. 4 min. 11 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/oracle/product/10.2.0.1/db_1/network/admin/listener.ora

Listener Log File         /u01/oracle/product/10.2.0.1/db_1/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle10g)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "orac10g" has 1 instance(s).

  Instance "orac10g", status READY, has 1 handler(s) for this service...

Service "orac10gXDB" has 1 instance(s).

  Instance "orac10g", status READY, has 1 handler(s) for this service...

Service "orac10g_XPT" has 1 instance(s).

  Instance "orac10g", status READY, has 1 handler(s) for this service...

The command completed successfully

LSNRCTL> 


14.登陆oracle数据库

[oracle@oracle10g database]$ sqlplus system/system@orac10g

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Nov 12 16:56:48 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> select * from dual;

D

-

X

SQL> create table t (a number);

Table created.

SQL> insert into t values(1);

1 row created.

SQL> select * from t;

    A

----------

    1

SQL> 



推荐阅读
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • 图解redis的持久化存储机制RDB和AOF的原理和优缺点
    本文通过图解的方式介绍了redis的持久化存储机制RDB和AOF的原理和优缺点。RDB是将redis内存中的数据保存为快照文件,恢复速度较快但不支持拉链式快照。AOF是将操作日志保存到磁盘,实时存储数据但恢复速度较慢。文章详细分析了两种机制的优缺点,帮助读者更好地理解redis的持久化存储策略。 ... [详细]
  • 本文介绍了在CentOS 6.4系统中更新源地址的方法,包括备份现有源文件、下载163源、修改文件名、更新列表和系统,并提供了相应的命令。 ... [详细]
  • 本文介绍了5个基本Linux命令行工具的现代化替代品,包括du、top和ncdu。这些替代品在功能上进行了改进,提高了可用性,并且适用于现代化系统。其中,ncdu是du的替代品,它提供了与du类似的结果,但在一个基于curses的交互式界面中,重点关注占用磁盘空间较多的目录。 ... [详细]
  • 进入配置文件目录:[rootlinuxidcresin-4.0.]#cdusrlocalresinconf查看都有哪些配置文件:[rootlinuxid ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • 一、Hadoop来历Hadoop的思想来源于Google在做搜索引擎的时候出现一个很大的问题就是这么多网页我如何才能以最快的速度来搜索到,由于这个问题Google发明 ... [详细]
  • 本文介绍了Redis的基础数据结构string的应用场景,并以面试的形式进行问答讲解,帮助读者更好地理解和应用Redis。同时,描述了一位面试者的心理状态和面试官的行为。 ... [详细]
  • Mac OS 升级到11.2.2 Eclipse打不开了,报错Failed to create the Java Virtual Machine
    本文介绍了在Mac OS升级到11.2.2版本后,使用Eclipse打开时出现报错Failed to create the Java Virtual Machine的问题,并提供了解决方法。 ... [详细]
  • 1,关于死锁的理解死锁,我们可以简单的理解为是两个线程同时使用同一资源,两个线程又得不到相应的资源而造成永无相互等待的情况。 2,模拟死锁背景介绍:我们创建一个朋友 ... [详细]
  • sklearn数据集库中的常用数据集类型介绍
    本文介绍了sklearn数据集库中常用的数据集类型,包括玩具数据集和样本生成器。其中详细介绍了波士顿房价数据集,包含了波士顿506处房屋的13种不同特征以及房屋价格,适用于回归任务。 ... [详细]
  • 第四讲ApacheLAMP服务器基本配置Apache的编译安装从Apache的官方网站下载源码包:http:httpd.apache.orgdownload.cgi今 ... [详细]
  • 三、查看Linux版本查看系统版本信息的命令:lsb_release-a[root@localhost~]#lsb_release-aLSBVersion::co ... [详细]
  • 【技术分享】一个 ELF 蠕虫分析
    【技术分享】一个 ELF 蠕虫分析 ... [详细]
  • 对于一般的扩展包,我们一般直接pipinstallxxx即可安装,但是unrar直接安装后,发现并不能通过Python程序实现解压的功能& ... [详细]
author-avatar
晨曦微露jie
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有