6.5 oraclelinux
2014-01-06 14:24:05 weixin_33763244 阅读数 3


oracle linux 6.5 安装 virtualbox

1.安装依赖包
yum -y install gcc kernel-uek-devel kernel-PAE-devel
wget http://linux.dell.com/dkms/permalink/dkms-2.2.0.3-1.noarch.rpm
rpm -ivh dkms-2.2.0.3-1.noarch.rpm

2.下载virtualbox包
https://www.virtualbox.org/wiki/Linux_Downloads
wget http://download.virtualbox.org/virtualbox/4.3.6/VirtualBox-4.3-4.3.6_91406_el6-1.x86_64.rpm

3.下载virtualbox扩展包    
http://www.downloadcrew.com/article/20279-virtualbox_extension_pack

4.安装依赖
yum install gcc-c++ libcap-devel libcurl-devel libIDL-devel libstdc++-static   \
libxslt-devel libXmu-devel openssl-devel pam-devel pulseaudio-libs-devel   \
python-devel qt-devel SDL_ttf-devel SDL-static texlive-latex wine-core   \
device-mapper-devel wget subversion subversion-gnome kernel-devel   \
glibc-static zlib-static glibc-devel.i686 libstdc++.i686 libpng-devel

5.安装virtualbox  
[root@oracle-v src]# rpm -ivh VirtualBox-4.3-4.3.6_91406_el6-1.x86_64.rpm
warning: VirtualBox-4.3-4.3.6_91406_el6-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
Preparing...                ########################################### [100%]
  1:VirtualBox-4.3         ########################################### [100%]

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules [  OK  ]
Uninstalling old VirtualBox DKMS kernel modules [  OK  ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-431.el6.x86_64 cannot be found at
/lib/modules/2.6.32-431.el6.x86_64/build or /lib/modules/2.6.32-431.el6.x86_64/source.
[FAILED]
 (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
 (Look at /var/log/vbox-install.log to find out what went wrong)

重新启动后问题解决
[root@oracle-v ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modulesError! There are no instances of module: vboxhost
4.3.6 located in the DKMS tree.
                                                          [  OK  ]
Trying to register the VirtualBox kernel modules using DKMS[  OK  ]
Starting VirtualBox kernel modules                         [  OK  ]

6.安装扩展
[root@oracle-v ~]# VBoxManage extpack install /usr/src/Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".

7.
http://sourceforge.net/projects/phpvirtualbox/
unzip phpvirtualbox-4.3-0.zip
[root@oracle-v ~]# mkdir -p /data/www
[root@oracle-v ~]# mv /usr/src/phpvirtualbox /data/www/phpvir

8.配置vboxweb-server
[root@oracle-v ~]# cat /etc/vbox/vbox.cfg
VBOXWEB_USER=root
VBOXWEB_HOST=localhost
VBOXWEB_PORT=18083
VBOXWEB_TIMEOUT=300
VBOXWEB_CHECK_INTERVAL=5
VBOXWEB_THREADS=100
VBOXWEB_KEEPALIVE=100
VBOXWEB_LOGFILE=/var/log/vboxweb.log

9.启动
[root@oracle-v ~]# /etc/init.d/vboxweb-service start

10.设置授权
[root@oracle-v ~]# VBoxManage setproperty websrvauthlibrary null

11.修改配置文件
[root@oracle-v ~]# cd /data/www/phpvir/
[root@oracle-v phpvir]# vim config.php
var $username = 'root';
var $password = '123456';
var $language = 'en';
var $vrdeports = '9000-9100';
var $cachePath = '/data/www/vm';

12.安装apache+php
yum -y install httpd php

修改httpd.conf配置文件
将:
DirectoryIndex index.html index.html.var
改为:
DirectoryIndex index.php index.html index.html.var

添加如下内容:
AddType application/x-httpd-php .php
DocumentRoot "/data/www/phpvir"

13.添加php扩展模块
yum -y install php-soap
vim /etc/php.ini
extension = soap.so

转载于:https://blog.51cto.com/leeforget/1348952

2018-03-25 18:22:16 ddlys1412 阅读数 2521

 

Oracle Linux 6.5 安装oracle 11.2.0.4(64位)


系统环境 

Oracle Linux Server release 6.5(64位)

Oracle 11.2.0.4(64位)

 

本文档详细介绍Oracle  11.2.0.4在 Oracle linux  6.5 的安装部署 包括安装操作系统 、给操作系统打补丁、创建Oracle用户、用户组和 oracle安装环境的部署。

 

<第一部分>

 

安装操作系统

直接  回车

 

检查镜像文件

选择  skip   不检查镜像文件

 

 

 

选择 next

设置 系统语言

 

 

选择语言  English

选择键盘

 

 

选择键盘语言  U.S.English

 

 

 

 

选择 skip

系统分区方案

 

 

分区方案  选择  create custorm  layout

参考网上资料,创建分区

 

 

 

创建所需的分区  分区方案可以参考网上资料

 

设置启动项

 

 

 选择  next

配置网卡

 

 

网络分配  选择 manual 手动指定ip地址

启用IPV4 不启用IPV6

 

 

设置IP地址

 

 

不要忘记填写网关

 

 

记住填写网关地址

设置时区

 

 

选择时区 

初次登陆需要给管理员设置密码

 

 

给root用户设置密码

安装操作系统类型

 

 

选择定制  customize  now

安装的补丁包如下

 

  • Desktop Environments
    • GNOME Desktop Environment
  • Applications
    • Editors
    • Graphical Internet
    • Text-based Internet
  • Development
    • Development Libraries
    • Development Tools
    • Legacy Software Development
  • Servers
    • Server Configuration Tools
  • Base System
    • Administration Tools
    • Base
    • Java
    • Legacy Software Support
    • System Tools
    • X Window System

 

请选择对应的软件包

久违的安装进度

 

安装完成

 

 

重启操作系统

 

 

 

 

 

 

 

 

 

<第二部分>

 


检查系统所需软件包

 


硬件环境监测

 

检查物理内存

[root@ora11g Server]# grep MemTotal /proc/meminfo

MemTotal:      2058780 kB

 

查看交换分区

[root@ora11g Server]# grep SwapTotal /proc/meminfo

SwapTotal:           0 kB

 

查看当前内存使用情况

[root@ora11g Server]# free

             total       used       free     shared    buffers     cached

Mem:       2058780    1995888      62892          0      91824    1572204

-/+ buffers/cache:     331860    1726920

Swap:            0          0          0

 

查看当前临时空间

[root@ora11g Server]# df -h /dev/shm/

Filesystem            Size  Used Avail Use% Mounted on

tmpfs                1006M     0 1006M   0% /dev/shm

 

System Architecture 系统架构

查看操作系统位数

[root@ora11g Server]# uname -m

x86_64                 系统为64位

 


检查磁盘空间(临时分区)

Disk Space Requirements

At least 1 GB of disk space in the /tmp directory   

/tmp  至少  1G   

[root@ora11g Server]# df -h /tmp

 

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda6             1.2G   34M  1.1G   4% /tmp


 


软件环境监测

Operating System Requirements

检查操作系统版本号

[root@ora11g Server]# cat /proc/version  查看系统版本号

Linux version 2.6.18-308.el5 (mockbuild@x86-007.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Jan 27 17:17:51 EST 2012

 


查看内核需求

Kernel Requirements 查看内核需求

[root@ora11g Server]# uname  -r

2.6.18-308.el5

 


检查补丁包

Package Requirements  查看补丁包

 

The following or later version of packages for Asianux 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 must be installed:

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-2.5-24 (32 bit)

glibc-common-2.5

glibc-devel-2.5

glibc-devel-2.5 (32 bit)

glibc-headers-2.5

ksh-20060214

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libaio-devel-0.3.106 (32 bit)

libgcc-4.1.2

libgcc-4.1.2 (32 bit)

libstdc++-4.1.2

libstdc++-4.1.2 (32 bit)

libstdc++-devel 4.1.2

make-3.81

sysstat-7.0.2

 

 

检测上述软件包 是否安装

[root@ora11g Server]# rpm -q elfutils-libelf-0.125

package elfutils-libelf-0.125 is not installed

[root@ora11g Server]# rpm -q gcc-4.1.2

package gcc-4.1.2 is not installed

[root@ora11g Server]# rpm -q gcc-c++-4.1.2

package gcc-c++-4.1.2 is not installed

[root@ora11g Server]# rpm -q glibc-2.5-24

package glibc-2.5-24 is not installed

[root@ora11g Server]# rpm -q glibc-common-2.5

glibc-common-2.5-81

[root@ora11g Server]# rpm -q glibc-devel-2.5

package glibc-devel-2.5 is not installed

[root@ora11g Server]# rpm -q glibc-headers-2.5

package glibc-headers-2.5 is not installed

[root@ora11g Server]# rpm -q ksh-20060214

package ksh-20060214 is not installed

[root@ora11g Server]# rpm -q libaio-0.3.106

libaio-0.3.106-5

libaio-0.3.106-5

[root@ora11g Server]# rpm -q libaio-devel-0.3.106

package libaio-devel-0.3.106 is not installed

[root@ora11g Server]# rpm -q libgcc-4.1.2

libgcc-4.1.2-52.el5

libgcc-4.1.2-52.el5

[root@ora11g Server]# rpm -q libstdc++-4.1.2

libstdc++-4.1.2-52.el5

libstdc++-4.1.2-52.el5

[root@ora11g Server]# rpm -q libstdc++-devel 4.1.2

package libstdc++-devel is not installed

package 4.1.2 is not installed

[root@ora11g Server]# rpm -q make-3.81

make-3.81-3.el5

[root@ora11g Server]# rpm -q sysstat-7.0.2

package sysstat-7.0.2 is not installed

 

安装缺失的包

[root@ora11g Server]# yum gcc-4.1.2

[root@ora11g Server]# yum install gcc-c++-4.1.2

 

[root@ora11g Server]# yum install glibc-2.5-24 (64位的redhat 应该安装glibc-2.5-81.x86_64.rpm 这个包 )

Loaded plugins: katello, product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

No package glibc-2.5-24 available.

Nothing to do

 

[root@ora11g Server]# yum install glibc-devel-2.5

[root@ora11g Server]# yum install glibc-headers-2.5

 

[root@ora11g Server]# yum install ksh-20060214

Loaded plugins: katello, product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

No package ksh-20060214 available.

Nothing to do

 

[root@ora11g Server]# yum  install libaio-devel-0.3.106

[root@ora11g Server]# yum  install libstdc++-devel 4.1.2

 

 

安装 elfutils-libelf-devel-0.137 和 elfutils-libelf-0.137

[root@ora11g Server]# rpm -q elfutils-libelf-0.137

elfutils-libelf-0.137-3.el5

 

[root@ora11g Server]# rpm -q elfutils-libelf-devel-0.137

package elfutils-libelf-devel-0.137 is not installed

 

[root@oracle11g ~]# yum install elfutils-libelf-devel-0.137

Loaded plugins: katello, product-id, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated

--> Processing Dependency: elfutils-libelf-devel-static-i386 = 0.137-3.el5 for package: elfutils-libelf-devel

--> Processing Dependency: elfutils-libelf-i386 = 0.137-3.el5 for package: elfutils-libelf-devel

--> Processing Dependency: libelf.so.1 for package: elfutils-libelf-devel

---> Package elfutils-libelf-devel.x86_64 0:0.137-3.el5 set to be updated

--> Processing Dependency: elfutils-libelf-devel-static-x86_64 = 0.137-3.el5 for package: elfutils-libelf-devel

--> Running transaction check

---> Package elfutils-libelf.i386 0:0.137-3.el5 set to be updated

---> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated

---> Package elfutils-libelf-devel-static.x86_64 0:0.137-3.el5 set to be updated

--> Finished Dependency Resolution

 

Dependencies Resolved

 

=====================================================================================================================================

 Package                                        Arch                     Version                        Repository              Size

=====================================================================================================================================

Installing:

 elfutils-libelf-devel                          i386                     0.137-3.el5                    base                    25 k

 elfutils-libelf-devel                          x86_64                   0.137-3.el5                    base                    25 k

Installing for dependencies:

 elfutils-libelf                                i386                     0.137-3.el5                    base                    58 k

 elfutils-libelf-devel-static                   i386                     0.137-3.el5                    base                    66 k

 elfutils-libelf-devel-static                   x86_64                   0.137-3.el5                    base                    64 k

 

Transaction Summary

=====================================================================================================================================

Install       5 Package(s)

Upgrade       0 Package(s)

 

Total download size: 237 k

Is this ok [y/N]: y

Downloading Packages:

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

Total                                                                                                2.5 MB/s | 237 kB     00:00    

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : elfutils-libelf                                                                                               1/5

  Installing     : elfutils-libelf-devel                                                                                         2/5

  Installing     : elfutils-libelf-devel-static                                                                                  3/5

  Installing     : elfutils-libelf-devel                                                                                         4/5

  Installing     : elfutils-libelf-devel-static                                                                                  5/5

Installed products updated.

 

Installed:

  elfutils-libelf-devel.i386 0:0.137-3.el5                         elfutils-libelf-devel.x86_64 0:0.137-3.el5                       

 

Dependency Installed:

  elfutils-libelf.i386 0:0.137-3.el5                                 elfutils-libelf-devel-static.i386 0:0.137-3.el5                

  elfutils-libelf-devel-static.x86_64 0:0.137-3.el5                

 

Complete!

 


Creating Required Operating System Groups and Users

创建所需 用户和 组

 

[root@ora11g ~]# vi  mk_user.sh

groupadd -g 501 oinstall

groupadd -g 502 dba

groupadd -g 503 oper

useradd  -u 501 -g oinstall  -G  dba,oper   oracle

 

[root@ora11g ~]# sh mk_user.sh

 

 

[root@ora11g ~]# vi mk_dir.sh

 

mkdir -p /u01/app/oraInventory

chmod -R 775 /u01/app/oraInventory

mkdir -p /u01/app/oracle

mkdir /u01/app/oracle/cfgtoollogs

chown -R oracle:oinstall  /u01

chmod -R 775 /u01/app/oracle

mkdir -p /u01/app/oracle/product/11.2.0/db_1

chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1

chmod -R 775 /u01/app/oracle/product/11.2.0/db_1

 

[root@ora11g ~]# sh mk_dir.sh

修改内核参数

Configuring Kernel Parameters  修改内核参数

修改/etc/hosts  增加 ip地址 和 主机名的对应关系

[root@ora11g ~]# vi /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1        ora11g

192.168.8.167   ora11g

 

~

 

修改/etc/sysctl.conf 文件

[root@localhost ~]# vi /etc/sysctl.conf

 

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

 

[root@localhost ~]# sysctl –p   使当前修改生效

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

 


Check Resource Limits for the Oracle Software Installation Users

配置oracle用户的资源限制

[root@ora11g ~]# vi /etc/security/limits.conf

 

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

 


修改profile文件

[root@ora11g ~]# vi /etc/profile

 

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

 


修改用户环境变量

Configuring the oracle User's Environment 

[oracle@ora11g ~]$ vi .bash_profile

 

#!/bin/bash

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

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

ORACLE_SID=prod; export ORACLE_SID

ORACLE_UNQNAME=prod; export ORACLE_UNQNAME

ORACLE_TERM=xterm; export ORACLE_TERM

ORACLE_HOSTNAME=ora11g; export ORACLE_HOSTNAME

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<第三部分>

 

 

以下是安装过程

 

 启动安装程序

进入oracle 软件的目录,点击 runInstaller

 

 

 

 

动态查看安装过程中的日志

[root@ora11g ~]# tail -f /u01/app/oraInventory/logs/installActions2013-09-15_03-23-17PM.log

动态查看安装过程中的告警日志

 

 

不需要email地址

 

 

这一步填写 email地址 可以忽略

 

 

 

继续点击 Yes  进入下一步

仅安装oracle软件

 

 

选择  install  database  software  only  只安装 oracle软件

 

单实例的oracle软件

 

 

 

选择单实例 类型 的数据库

 

选择oracle的语言

 

 

语言选择 英文

 

选择oracle的类型

 

 

选择 企业版

 

设置oracle主目录

 

 

查看 Oracle_Base  路径 和 Oracle_home路径  必须和用户的初始化参数文件一致!!!

修改以后  如下:

 

 

设置 INVENTORY DIRECTORY

 

 

 

这个目录有用,但是我不清楚

 

检查oracle用户所属的组

注意查看 操作系统的用户组  注意 应该是 oinstall

 

再次查看 osdba  和osoper 对应的用户组

 

监测oracle所依赖的软件包

 

 

检查系统所依赖的软件包 重新安装缺失的软件包

 

 

重新检查  还是缺失 elfutils-libelf-0.125 和 elfutils-libelf-devel-0.125

 

需要注意的是 操作系统是  Redhat 5.8.19.6  64位  但是 Oracle软件是 11.2.0.1 32位的,所以只需安装 系统包 elfutils-libelf-0.137  和 elfutils-libelf-devel-0.137 这是安装之前的一个疏忽!!!

 

重新检测

 

最后一步监测oracle的情况

 

 

 

 

最后一次查看 数据库的情况

 

久违的安装界面

 

 

久违的安装界面终于出现了  哈哈

 

安装完成顺序执行 如下两个脚本

 

 

以root 用户身份 顺序执行上面的两个脚本

 

 

最后 点击 close  大功告成

 


动态查看安装过程中的日志

 

<第四部分>

 

NETCA配置监听程序


NETCA 创建监听  这个过程简单  一直 next!!!

 

操作系统上执行 netca

 

 


DBCA建库

操作系统上执行 dbca

 

 

 

 

 

 

 

一般用途的数据库

 

 

选择  一般用途的数据库

 

设置数据库名

 

 

不配置EM

 

 

不启用 OEM  以后配置OEM

 

设置密码

 

 

使用统一密码   oracle

设置oracle 存储的配置

 

 

不需修改 直接next

 

配置 oracle恢复选项

 

 

不启用快速恢复区   不启用归档(以后自己设置)   

 

使用oracle的示例 用户

 

选择创建示例用户 scott

 

配置oracle的内存

 

 

这一步不需修改 直接 next

 

检查数据文件、控制文件、日志文件的目录

 

 

看看而已

 

选择 create database

 

 

选择create  database   然后点击  finish

 

 

 

最后一步的检查

 

安装进度

 

 

这是安装进度

 

安装完成

 

 

 

Ok  大功告成了!!!

2015-05-15 18:42:40 ly52354 阅读数 212

原文出处 http://www.unixmen.com/install-oracle-database-12-oracle-linux-6-5/?utm_source=tuicool

In this tutorial, I’d like to show you step by step latest Oracle installation in Oracle Linux 6.5 64bit. Normally Virtualbox is not that good to install a production Oracle database environments, but it can be  enough for Developers and testers.

I suggest you to use minimum of 40GB VM hard disk, 4GB SWAP and 6GB RAM.

Download Oracle database files from Oracle

Please note: Using  database express server package is free and no license is required.

I downloaded the following database packages.

linuxamd64_12c_database_1of2.zip
linuxamd64_12c_database_2of2.zip

After downloading, unzip the files to a folder.

Change the hostname like this:

[root@Databases Databases]# cat  /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.1.114 Databases.localdomain Databases

Oracle Installation Prerequisites

Add oracle repository to your system:

# cd /etc/yum.repos.d
# wget https://public-yum.oracle.com/public-yum-ol6.repo

Then,

# yum install oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64

All necessary prerequisites will be installed automatically.

Run yum update again:

# yum update

Manual Setup

If you have not used the oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64  package to perform all prerequisites, you have to manually perform the following setup tasks.

Oracle recommend the following minimum parameter settings.

“/etc/sysctl.conf” file.

[root@Databases Databases]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Add the following lines to the “/etc/security/limits.conf” file.

oracle              soft    nproc   2047
 oracle              hard    nproc   16384
 oracle              soft    nofile  4096
 oracle              hard    nofile  65536
 oracle              soft    stack   10240

Install the following packages if they are not already present.

yum install binutils-2*x86_64*
yum install glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
yum install glibc-2*i686* nss-softokn-freebl-3*i686*
yum install compat-libstdc++-33*x86_64*
yum install glibc-common-2*x86_64*
yum install glibc-devel-2*x86_64*
yum install glibc-devel-2*i686*
yum install glibc-headers-2*x86_64*
yum install elfutils-libelf-0*x86_64*
yum install elfutils-libelf-devel-0*x86_64*
yum install gcc-4*x86_64*
yum install gcc-c++-4*x86_64*
yum install ksh-*x86_64*
yum install libaio-0*x86_64*
yum install libaio-devel-0*x86_64*
yum install libaio-0*i686*
yum install libaio-devel-0*i686*
yum install libgcc-4*x86_64*
yum install libgcc-4*i686*
yum install libstdc++-4*x86_64*
yum install libstdc++-4*i686*
yum install libstdc++-devel-4*x86_64*
yum install make-3.81*x86_64*
yum install numactl-devel-2*x86_64*
yum install sysstat-9*x86_64*
yum install compat-libstdc++-33*i686*
yum install compat-libcap*

Create the new groups and users.

 groupadd -g 501 oinstall
 groupadd -g 502 dba
 groupadd -g 503 oper
 groupadd -g 504 asmadmin
 groupadd -g 506 asmdba
 groupadd -g 505 asmoper
useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
passwd oracle

Note: We are not going to use the “asm” groups, since this installation will not use ASM.

Amend the “/etc/security/limits.d/90-nproc.conf” file as described below.

# Change this
 *          soft    nproc    1024
# To this
 * - nproc 16384

Set secure Linux to permissive by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.

SELINUX=permissive

Once the change is complete, restart the server.

If you have the Linux firewall enabled, you will need to disable:

/etc/init.d/iptables stop

Or Configure Iptables to allow the databases ports.

Create this file and  change the ownership (the installation will use this later).

touch /etc/oratab
chown -R oracle:oinstall /etc/oratab

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Login from terminal  and  make X11 enabled:

Edit the “.bash_profile” file of the oracle user.

# Oracle Settings
 TMP=/tmp; export TMP
 TMPDIR=$TMP; export TMPDIR
 ORACLE_HOSTNAME=Databases.localdomain; export ORACLE_HOSTNAME
 ORACLE_UNQNAME=DB12C; export ORACLE_UNQNAME
 ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
 ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOME
 ORACLE_SID=DB11C; export ORACLE_SID
 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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Go to the extracted Zip file and start  the installation under oracle user.

 [oracle@Databases database]$ ./runInstaller
 Starting Oracle Universal Installer...
 Checking Temp space: must be greater than 500 MB.   Actual 12551 MB    Passed
 Checking swap space: must be greater than 150 MB.   Actual 2803 MB    Passed
 Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
 Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-02-10_01-33-40PM. Please wait .

oracle11oracle12oracle13oracle14oracle15oracle16oracle17oracle18oracle19oracle20

[root@Databases Databases]# /u01/app/oraInventory/orainstRoot.sh
 Changing permissions of /u01/app/oraInventory.
 Adding read,write permissions for group.
 Removing read,write,execute permissions for world.
  Changing groupname of /u01/app/oraInventory to oinstall.
 The execution of the script is complete.
 [root@Databases Databases]#
[root@Databases Databases]# /u01/app/oracle/product/12.1.0/db_1/root.sh
 Performing root user operation for Oracle 12c
The following environment variables are set as:
 ORACLE_OWNER= oracle
 ORACLE_HOME=  /u01/app/oracle/product/12.1.0/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 script.
 Now product-specific root actions will be performed.

oracle21

Via password management, make a password for SYS and SYSTEM users:

oracle22oracle23

Test your oracle Server (Listeneing  ports 1521/ managment http port 5500):

[root@Databases ~]# netstat  -an  |  grep  "::" | grep tcp
tcp        0      0 ::1:6010                    :::*                        LISTEN
tcp        0      0 :::5500                     :::*                        LISTEN
tcp        0      0 :::54570                    :::*                        LISTEN
tcp        0      0 :::111                      :::*                        LISTEN
tcp        0      0 :::1521                     :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
tcp        0      0 :::42230                    :::*                        LISTEN
tcp        0      0 ::1:631                     :::*                        LISTEN
tcp        0      0 ::1:25                      :::*                        LISTEN
tcp        0      0 ::ffff:10.1.1.114:1521      ::ffff:10.1.1.114:32248     ESTABLISHED

Point your browser with IP address https://ip:5500/em

Note: Iptables should be configured or disabled.

oracle24

Login with sys or System as DBA to configure and add users and databases.

oracle25

Enjoy!

2017-11-07 22:21:00 weixin_34009794 阅读数 3

1. oracle11g安装环境准备

采用OEL6.5 x64安装,安装过程与Redhat一致,安装过程中选中桌面,开发包,开发库,其它默认选项。   
Desktops > X Window System    
Development > Additional Development    
Development > Development Tools

安装好后:   
(1) 关闭selinux    
(2) 关闭iptables    
(3) 重启

2. 开始安装基础包(放入光盘、或挂载ISO文件)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
mount /dev/cdrom /mnt   
cd /mnt/cdrom/Server/Packages    
rpm -Uvh binutils-2*x86_64*    
rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*    
rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*    
rpm -Uvh compat-libstdc++-33*x86_64*    
rpm -Uvh glibc-common-2*x86_64*    
rpm -Uvh glibc-devel-2*x86_64*    
rpm -Uvh glibc-devel-2*i686*    
rpm -Uvh glibc-headers-2*x86_64*    
rpm -Uvh elfutils-libelf-0*x86_64*    
rpm -Uvh elfutils-libelf-devel-0*x86_64*    
rpm -Uvh gcc-4*x86_64*    
rpm -Uvh gcc-c++-4*x86_64*    
rpm -Uvh ksh-*x86_64*    
rpm -Uvh libaio-0*x86_64*    
rpm -Uvh libaio-devel-0*x86_64*    
rpm -Uvh libaio-0*i686*    
rpm -Uvh libaio-devel-0*i686*    
rpm -Uvh libgcc-4*x86_64*    
rpm -Uvh libgcc-4*i686*    
rpm -Uvh libstdc++-4*x86_64*    
rpm -Uvh libstdc++-4*i686*    
rpm -Uvh libstdc++-devel-4*x86_64*    
rpm -Uvh make-3.81*x86_64*    
rpm -Uvh numactl-devel-2*x86_64*    
rpm -Uvh sysstat-9*x86_64*    
rpm -Uvh compat-libstdc++-33*i686*    
rpm -Uvh compat-libcap*

(1) 确认安装以下包

1
2
3
4
5
# rpm -q binutils compat-libstdc++-33 compat-gcc-34-c++ elfutils-libelf 
elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel 
glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp 
libstdc++ libstdc++-devel make sysstat numactl-devel unixODBC 
unixODBC-devel openmotif22 openmotif compat-db libXp

binutils-2.20.51.0.2-5.36.el6.x86_64   
compat-libstdc++-33-3.2.3-69.el6.x86_64    
compat-libstdc++-33-3.2.3-69.el6.i686    
package compat-gcc-34-c++ is not installed    
elfutils-libelf-0.152-1.el6.x86_64    
elfutils-libelf-devel-0.152-1.el6.x86_64    
gcc-4.4.7-4.el6.x86_64    
gcc-c++-4.4.7-4.el6.x86_64    
glibc-2.12-1.132.el6.x86_64    
glibc-2.12-1.132.el6.i686    
glibc-common-2.12-1.132.el6.x86_64    
glibc-devel-2.12-1.132.el6.x86_64    
glibc-devel-2.12-1.132.el6.i686    
glibc-headers-2.12-1.132.el6.x86_64    
kernel-headers-2.6.32-431.el6.x86_64    
ksh-20120801-10.el6.x86_64    
libaio-0.3.107-10.el6.x86_64    
libaio-0.3.107-10.el6.i686    
libaio-devel-0.3.107-10.el6.x86_64    
libaio-devel-0.3.107-10.el6.i686    
libgcc-4.4.7-4.el6.x86_64    
libgcc-4.4.7-4.el6.i686    
libgomp-4.4.7-4.el6.x86_64    
libstdc++-4.4.7-4.el6.x86_64    
libstdc++-4.4.7-4.el6.i686    
libstdc++-devel-4.4.7-4.el6.x86_64    
make-3.81-20.el6.x86_64    
sysstat-9.0.4-22.el6.x86_64    
numactl-devel-2.0.7-8.el6.x86_64    
package unixODBC is not installed    
package unixODBC-devel is not installed    
package openmotif22 is not installed    
package openmotif is not installed    
package compat-db is not installed    
package libXp is not installed

(2) 安装相关包

1
2
3
4
# rpm -ivh compat-db-4.6.21-15.el6.x86_64.rpm compat-db42-4.2.52-15.el6.x86_64.rpm compat-db43-4.3.29-15.el6.x86_64.rpm    
# rpm -ivh compat-gcc-34-c++-3.4.6-19.el6.x86_64.rpm compat-gcc-34-3.4.6-19.el6.x86_64.rpm     
# rpm -ivh unixODBC-2.2.14-12.el6_3.x86_64.rpm unixODBC-devel-2.2.14-12.el6_3.x86_64.rpm     
# rpm -ivh openmotif-2.3.3-6.1.el6_4.x86_64.rpm openmotif22-2.2.3-19.el6.x86_64.rpm libXp-1.0.0-15.1.el6.x86_64.rpm

(3) 替换sqlplus工具

# wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz    
# tar zxvf rlwrap-0.37.tar.gz    
# cd rlwrap-0.36    
# ./configure    
# make    
# make check    
# make install

3. 创建oracle安装相关用户组及用户帐号

1)创建oinstall,dba组和oracle用户(用root身份)

groupadd oinstall   
groupadd dba    
useradd -g oinstall -G dba oracle    
passwd oracle

2)创建Oralce HOME目录

mkdir -p /u01/app/oracle/product/11.2.0/db_1   
chmod -R 775 /u01/app    
chown -R oracle:oinstall /u01

 

4. 修改内核支持

# vi /etc/sysctl.conf

fs.aio-max-nr = 1048576   
fs.file-max = 6815744    
kernel.shmall = 2097152    
kernel.shmmax = 2147483648    
kernel.shmmni = 4096    
kernel.sem = 250 32000 100 128    
net.ipv4.ip_local_port_range = 9000 65500    
net.core.rmem_default = 4194304    
net.core.rmem_max = 4194304    
net.core.wmem_default = 262144    
net.core.wmem_max = 1048586

# sysctl -p

内核参数配置说明:    
kernel.shmall = 2097152      # 系统可以使用的共享内存总页数,缺省值就是2097152。    
kernel.shmmax = 2147483648   # 单个共享内存段的最大值,字节为单位, 此例为2GB。    
kernel.shmmni = 4096         # 共享内存段的最大默认数量

 

5. 修改文件描述符

cat >> /etc/security/limits.conf << EOF   
oracle   soft   nproc   2047    
oracle   hard   nproc   16384    
oracle   soft   nofile  1024    
oracle   hard   nofile  65536    
oracle   soft   stack   10240    
EOF

 

6. 修改登陆认证模块

cat >> /etc/pam.d/login << EOF   
session required /lib64/security/pam_limits.so    
EOF

 

7. 修改本地hosts文件

# vi /etc/hosts   
192.168.233.100    vm100

 

8. 修改oracle用户环境变量

(1) 配置系统环境变量,加入到最后。

cat >> /etc/profile << EOF   
if [ \$USER = "oracle" ]; then    
      if [ \$SHELL = "/bin/ksh" ]; then    
          ulimit -p 16384    
          ulimit -n 65536    
      else    
          ulimit -u 16384 -n 65536    
      fi    
fi    
EOF

(2) 配置oracle环境变量

# su - oracle

cat >> /home/oracle/.bash_profile << EOF   
export EDITOR=vi    
export ORACLE_BASE=/u01/app/oracle    
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1    
export ORACLE_SID=orcl    
export PATH=\$ORACLE_HOME/bin:\$PATH    
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"    
export LANG=en_US    
export LC_ALL=en_US    
export LD_LIBRARY_PATH=/lib:/usr/lib:\$ORACLE_HOME/lib    
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib    
alias sqlplus="rlwrap sqlplus"    
alias rman="rlwrap rman"    
umask 022    
EOF    
source .bash_profile

 

9. 拷贝oracle安装包到linux系统中

# mv p13390677_112040_Linux-x86-64_1of7.zip /u01/app/   
# mv p13390677_112040_Linux-x86-64_2of7.zip /u01/app/    
# unzip p13390677_112040_Linux-x86-64_1of7.zip    
# unzip p13390677_112040_Linux-x86-64_2of7.zip

# 解压在/u01/app/database下   
# chown -R oracle:oinstall /u01/app/database/

 

10. 安装oracle11g软件

说明:本文采用本机安装方式,远程安装推荐采用VNC或Xmanager。

1
2
3
4
5
6
7
8
# xhost +   
access control disabled, clients can connect from any host
su - oracle   
cd /u01/Oracle/database    
$ ./runInstaller
最后要在root执行以下两条脚本   
# /u01/app/oraInventory/orainstRoot.sh    
# /u01/app/oracle/product/11.2.0/db_1/root.sh

 

11. 创建监听服务

$ netca   
# 参数一律默认即可    
$ ps -ef |grep ora_

 

12. 创建数据库

$ dbca   
# 选择gernel purpose,在SID和全局名称中,选择你在.bash_profile中创建的SID.    
# 数据库的字符集选项中选择ZHS16GBK, 其它默认OK,完成.

 

13. oracle的启动服务配置

#开机自启动采用rc.local启动方式,没有配置成服务方式,关闭数据库还是手动执行的好。

$ vi /etc/oratab   
#把最后的N改成Y (默认是N)    
orcl:/u01/app/oracle/product/11.2.0/db_1:Y

cat >> /etc/rc.local << EOF   
# Oracle service start    
su - oracle -c "lsnrctl start"    
su - oracle -c "dbstart"    
EOF





本文转自 koumm 51CTO博客,原文链接:http://blog.51cto.com/koumm/1582595,如需转载请自行联系原作者

2014-11-26 00:22:34 weixin_34198453 阅读数 2

1. oracle11g安装环境准备

采用OEL6.5 x64安装,安装过程与Redhat一致,安装过程中选中桌面,开发包,开发库,其它默认选项。  
Desktops > X Window System    
Development > Additional Development    
Development > Development Tools

安装好后:  
(1) 关闭selinux    
(2) 关闭iptables    
(3) 重启

2. 开始安装基础包(放入光盘、或挂载ISO文件)

mount /dev/cdrom /mnt   
cd /mnt/cdrom/Server/Packages    
rpm -Uvh binutils-2*x86_64*    
rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*    
rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*    
rpm -Uvh compat-libstdc++-33*x86_64*    
rpm -Uvh glibc-common-2*x86_64*    
rpm -Uvh glibc-devel-2*x86_64*    
rpm -Uvh glibc-devel-2*i686*    
rpm -Uvh glibc-headers-2*x86_64*    
rpm -Uvh elfutils-libelf-0*x86_64*    
rpm -Uvh elfutils-libelf-devel-0*x86_64*    
rpm -Uvh gcc-4*x86_64*    
rpm -Uvh gcc-c++-4*x86_64*    
rpm -Uvh ksh-*x86_64*    
rpm -Uvh libaio-0*x86_64*    
rpm -Uvh libaio-devel-0*x86_64*    
rpm -Uvh libaio-0*i686*    
rpm -Uvh libaio-devel-0*i686*    
rpm -Uvh libgcc-4*x86_64*    
rpm -Uvh libgcc-4*i686*    
rpm -Uvh libstdc++-4*x86_64*    
rpm -Uvh libstdc++-4*i686*    
rpm -Uvh libstdc++-devel-4*x86_64*    
rpm -Uvh make-3.81*x86_64*    
rpm -Uvh numactl-devel-2*x86_64*    
rpm -Uvh sysstat-9*x86_64*    
rpm -Uvh compat-libstdc++-33*i686*    
rpm -Uvh compat-libcap*

(1) 确认安装以下包

# rpm -q binutils compat-libstdc++-33 compat-gcc-34-c++ elfutils-libelf 
elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel 
glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp 
libstdc++ libstdc++-devel make sysstat numactl-devel unixODBC 
unixODBC-devel openmotif22 openmotif compat-db libXp

binutils-2.20.51.0.2-5.36.el6.x86_64  
compat-libstdc++-33-3.2.3-69.el6.x86_64    
compat-libstdc++-33-3.2.3-69.el6.i686    
package compat-gcc-34-c++ is not installed    
elfutils-libelf-0.152-1.el6.x86_64    
elfutils-libelf-devel-0.152-1.el6.x86_64    
gcc-4.4.7-4.el6.x86_64    
gcc-c++-4.4.7-4.el6.x86_64    
glibc-2.12-1.132.el6.x86_64    
glibc-2.12-1.132.el6.i686    
glibc-common-2.12-1.132.el6.x86_64    
glibc-devel-2.12-1.132.el6.x86_64    
glibc-devel-2.12-1.132.el6.i686    
glibc-headers-2.12-1.132.el6.x86_64    
kernel-headers-2.6.32-431.el6.x86_64    
ksh-20120801-10.el6.x86_64    
libaio-0.3.107-10.el6.x86_64    
libaio-0.3.107-10.el6.i686    
libaio-devel-0.3.107-10.el6.x86_64    
libaio-devel-0.3.107-10.el6.i686    
libgcc-4.4.7-4.el6.x86_64    
libgcc-4.4.7-4.el6.i686    
libgomp-4.4.7-4.el6.x86_64    
libstdc++-4.4.7-4.el6.x86_64    
libstdc++-4.4.7-4.el6.i686    
libstdc++-devel-4.4.7-4.el6.x86_64    
make-3.81-20.el6.x86_64    
sysstat-9.0.4-22.el6.x86_64    
numactl-devel-2.0.7-8.el6.x86_64    
package unixODBC is not installed    
package unixODBC-devel is not installed    
package openmotif22 is not installed    
package openmotif is not installed    
package compat-db is not installed    
package libXp is not installed

(2) 安装相关包

# rpm -ivh compat-db-4.6.21-15.el6.x86_64.rpm compat-db42-4.2.52-15.el6.x86_64.rpm compat-db43-4.3.29-15.el6.x86_64.rpm    
# rpm -ivh compat-gcc-34-c++-3.4.6-19.el6.x86_64.rpm compat-gcc-34-3.4.6-19.el6.x86_64.rpm     
# rpm -ivh unixODBC-2.2.14-12.el6_3.x86_64.rpm unixODBC-devel-2.2.14-12.el6_3.x86_64.rpm     
# rpm -ivh openmotif-2.3.3-6.1.el6_4.x86_64.rpm openmotif22-2.2.3-19.el6.x86_64.rpm libXp-1.0.0-15.1.el6.x86_64.rpm

(3) 替换sqlplus工具

# wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz    
# tar zxvf rlwrap-0.37.tar.gz    
# cd rlwrap-0.36    
# ./configure    
# make    
# make check    
# make install

3. 创建oracle安装相关用户组及用户帐号

1)创建oinstall,dba组和oracle用户(用root身份)

groupadd oinstall  
groupadd dba    
useradd -g oinstall -G dba oracle    
passwd oracle

2)创建Oralce HOME目录

mkdir -p /u01/app/oracle/product/11.2.0/db_1  
chmod -R 775 /u01/app    
chown -R oracle:oinstall /u01

 

4. 修改内核支持

# vi /etc/sysctl.conf

fs.aio-max-nr = 1048576  
fs.file-max = 6815744    
kernel.shmall = 2097152    
kernel.shmmax = 2147483648    
kernel.shmmni = 4096    
kernel.sem = 250 32000 100 128    
net.ipv4.ip_local_port_range = 9000 65500    
net.core.rmem_default = 4194304    
net.core.rmem_max = 4194304    
net.core.wmem_default = 262144    
net.core.wmem_max = 1048586

# sysctl -p

内核参数配置说明:    
kernel.shmall = 2097152      # 系统可以使用的共享内存总页数,缺省值就是2097152。    
kernel.shmmax = 2147483648   # 单个共享内存段的最大值,字节为单位, 此例为2GB。    
kernel.shmmni = 4096         # 共享内存段的最大默认数量

 

5. 修改文件描述符

cat >> /etc/security/limits.conf << EOF  
oracle   soft   nproc   2047    
oracle   hard   nproc   16384    
oracle   soft   nofile  1024    
oracle   hard   nofile  65536    
oracle   soft   stack   10240    
EOF

 

6. 修改登陆认证模块

cat >> /etc/pam.d/login << EOF  
session required /lib64/security/pam_limits.so    
EOF

 

7. 修改本地hosts文件

# vi /etc/hosts  
192.168.233.100    vm100

 

8. 修改oracle用户环境变量

(1) 配置系统环境变量,加入到最后。

cat >> /etc/profile << EOF  
if [ \$USER = "oracle" ]; then    
      if [ \$SHELL = "/bin/ksh" ]; then    
          ulimit -p 16384    
          ulimit -n 65536    
      else    
          ulimit -u 16384 -n 65536    
      fi    
fi    
EOF

(2) 配置oracle环境变量

# su - oracle

cat >> /home/oracle/.bash_profile << EOF  
export EDITOR=vi    
export ORACLE_BASE=/u01/app/oracle    
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1    
export ORACLE_SID=orcl    
export PATH=\$ORACLE_HOME/bin:\$PATH    
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"    
export LANG=en_US    
export LC_ALL=en_US    
export LD_LIBRARY_PATH=/lib:/usr/lib:\$ORACLE_HOME/lib    
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib    
alias sqlplus="rlwrap sqlplus"    
alias rman="rlwrap rman"    
umask 022    
EOF    
source .bash_profile

 

9. 拷贝oracle安装包到linux系统中

# mv p13390677_112040_Linux-x86-64_1of7.zip /u01/app/  
# mv p13390677_112040_Linux-x86-64_2of7.zip /u01/app/    
# unzip p13390677_112040_Linux-x86-64_1of7.zip    
# unzip p13390677_112040_Linux-x86-64_2of7.zip

# 解压在/u01/app/database下  
# chown -R oracle:oinstall /u01/app/database/

 

10. 安装oracle11g软件

说明:本文采用本机安装方式,远程安装推荐采用VNC或Xmanager。

# xhost +   
access control disabled, clients can connect from any host
$ su - oracle   
$ cd /u01/Oracle/database    
$ ./runInstaller
最后要在root执行以下两条脚本   
# /u01/app/oraInventory/orainstRoot.sh    
# /u01/app/oracle/product/11.2.0/db_1/root.sh

 

11. 创建监听服务

$ netca  
# 参数一律默认即可    
$ ps -ef |grep ora_

 

12. 创建数据库

$ dbca  
# 选择gernel purpose,在SID和全局名称中,选择你在.bash_profile中创建的SID.    
# 数据库的字符集选项中选择ZHS16GBK, 其它默认OK,完成.

 

13. oracle的启动服务配置

#开机自启动采用rc.local启动方式,没有配置成服务方式,关闭数据库还是手动执行的好。

$ vi /etc/oratab  
#把最后的N改成Y (默认是N)    
orcl:/u01/app/oracle/product/11.2.0/db_1:Y

cat >> /etc/rc.local << EOF  
# Oracle service start    
su - oracle -c "lsnrctl start"    
su - oracle -c "dbstart"    
EOF

转载于:https://blog.51cto.com/koumm/1582595

InstallOracle12cR1toOracleLinux6.5inVirtualBox.

博文 来自: neuandustbneo

6.5 linux

阅读数 92

没有更多推荐了,返回首页