oracle linux 5.8安装oracle 10g数据库

简介:

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 

wKiom1gm0FWDtJijAAMHnPmaVys484.png-wh_50

wKioL1gm0FezFmceAAMYTyjqkrU293.png-wh_50

wKiom1gm0FjCCoCyAAM4tHuuSX0302.png-wh_50

wKiom1gm0FqjUgtFAAMG9mqWW7Q108.png-wh_50

wKioL1gm0FvDn3ofAAJBRrIp7BU833.png-wh_50

wKioL1gm0FzyE3yBAAM_uzZUs48409.png-wh_50

wKiom1gm0F2RvJ0YAAFb5xP_JgU747.png-wh_50

wKiom1gm0F7SRvJ7AAMxmyTbuY0743.png-wh_50

wKioL1gm0F6AYQ5GAAAxUJuLqgc581.png-wh_50

[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 ~]# 

wKiom1gm0F-x6pCLAAGN51o870A245.png-wh_50


13.创建数据库

[oracle@oracle10g database]$ dbca

wKiom1gm1NyC7K5RAADXXZ7V-RE854.png-wh_50

wKioL1gm1N2QWpxLAADdStyA-fU471.png-wh_50

wKiom1gm1N3h-PxMAADBV_jRXFU389.png-wh_50

wKioL1gm1N7y-ysHAADABf-Q8tk315.png-wh_50

wKioL1gm1N6iah5BAADaABZ-s4s530.png-wh_50

wKiom1gm1N-D6fE8AADE5MdUoNM736.png-wh_50

wKiom1gm1ODyUlufAADW3s4231w396.png-wh_50

wKioL1gm1OHTvFydAADUN0G_W-I517.png-wh_50

wKiom1gm1OKDo1hIAADRFFShCUo183.png-wh_50

wKioL1gm1OKRatquAACsh7Lb2gY419.png-wh_50

wKioL1gm1OPi05Y6AAD5MFjD_BY158.png-wh_50

wKiom1gm1OOAJoFaAABX-WtPgSU316.png-wh_50

wKiom1gm1OTSpZ9jAADf71OuW_I869.png-wh_50

wKioL1gm1OSDZXFwAAA4Cerf3p0500.png-wh_50

wKiom1gm1OXgEx1LAACzBf1lsQU510.png-wh_50

wKioL1gm1WqSJuUGAAA_Cp-1ar4724.png-wh_50


14.创建监听

[oracle@oracle10g database]$ netca

wKioL1gm2RDyopFGAAD4qoqj26k556.png-wh_50

wKiom1gm2RGhZYK9AADm4dy7rl4285.png-wh_50

wKioL1gm2RLgge2nAADdL9dj-sM247.png-wh_50

wKiom1gm2ROCcl9KAADoD2SVbgY842.png-wh_50

wKioL1gm2RSR0rWpAADiOgyAJqY337.png-wh_50

wKioL1gm2RWxl7R0AADanWIOS3I868.png-wh_50

wKiom1gm2RXih5BWAADlDS3Rz5Q391.png-wh_50

wKioL1gm2Rbzm4EPAAD3488Ps58913.png-wh_50

[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> 










本文转自 z597011036 51CTO博客,原文链接:http://blog.51cto.com/tongcheng/1828676,如需转载请自行联系原作者
目录
相关文章
|
12月前
|
Ubuntu 安全 关系型数据库
安装与配置MySQL 8 on Ubuntu,包括权限授予、数据库备份及远程连接指南
以上步骤提供了在Ubuntu上从头开始设置、配置、授权、备份及恢复一个基础但完整的MySQL环境所需知识点。
1226 7
|
Ubuntu 关系型数据库 Linux
Linux数据库安装
本文介绍了在CentOS 8.0和Ubuntu 22.04系统上安装、配置和启动MariaDB数据库服务器的详细步骤。包括通过`yum`和`apt`包管理器安装MariaDB服务,启动并检查服务运行状态,设置root用户密码以及连接数据库的基本操作。此外,还展示了如何在Ubuntu上更新软件包列表、安装依赖项,并验证MariaDB的版本和运行状态。通过这些步骤,用户可以成功部署并初始化MariaDB环境,为后续数据库管理与应用开发奠定基础。
970 61
|
SQL 关系型数据库 MySQL
MySQL下载安装全攻略!小白也能轻松上手,从此数据库不再难搞!
这是一份详细的MySQL安装与配置教程,适合初学者快速上手。内容涵盖从下载到安装的每一步操作,包括选择版本、设置路径、配置端口及密码等。同时提供基础操作指南,如数据库管理、数据表增删改查、用户权限设置等。还介绍了备份恢复、图形化工具使用和性能优化技巧,帮助用户全面掌握MySQL的使用方法。附带常见问题解决方法,保姆级教学让你无忧入门!
1490 21
MySQL下载安装全攻略!小白也能轻松上手,从此数据库不再难搞!
|
Oracle Cloud Native 关系型数据库
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
559 11
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
630 0
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle 关系型数据库 Linux
MyEMS开源系统安装之CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux
本指南介绍如何在CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux服务器上部署MyEMS开源能源管理系统。内容涵盖系统准备、数据库配置、多个MyEMS服务(如myems-api、myems-admin、myems-modbus-tcp等)的安装与配置,以及Nginx服务器设置和防火墙规则调整。通过完成所有步骤,您将能够访问MyEMS Admin UI和Web UI,默认端口分别为8001和80,初始登录凭据已提供。
945 0
|
12月前
|
缓存 关系型数据库 BI
使用MYSQL Report分析数据库性能(下)
使用MYSQL Report分析数据库性能
652 158
|
12月前
|
关系型数据库 MySQL 数据库
自建数据库如何迁移至RDS MySQL实例
数据库迁移是一项复杂且耗时的工程,需考虑数据安全、完整性及业务中断影响。使用阿里云数据传输服务DTS,可快速、平滑完成迁移任务,将应用停机时间降至分钟级。您还可通过全量备份自建数据库并恢复至RDS MySQL实例,实现间接迁移上云。
|
12月前
|
关系型数据库 MySQL 数据库
阿里云数据库RDS费用价格:MySQL、SQL Server、PostgreSQL和MariaDB引擎收费标准
阿里云RDS数据库支持MySQL、SQL Server、PostgreSQL、MariaDB,多种引擎优惠上线!MySQL倚天版88元/年,SQL Server 2核4G仅299元/年,PostgreSQL 227元/年起。高可用、可弹性伸缩,安全稳定。详情见官网活动页。
1750 152
|
12月前
|
关系型数据库 MySQL 数据库
阿里云数据库RDS支持MySQL、SQL Server、PostgreSQL和MariaDB引擎
阿里云数据库RDS支持MySQL、SQL Server、PostgreSQL和MariaDB引擎,提供高性价比、稳定安全的云数据库服务,适用于多种行业与业务场景。
1167 156

热门文章

最新文章