原创作品。从 “深蓝blog” 博客,欢迎转载,请务必注明转载如下源。否则追究其版权责任。

深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/40181661

1. 主机配置

[root@hyltest /]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.56.61 hyltest

~

~

[root@hyltest /]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

NM_CONTROLLED="yes"

ONBOOT="yes"

HWADDR=08:00:27:97:CF:CA

TYPE=Ethernet

BOOTPROTO=none

IPADDR=192.168.56.61

PREFIX=24

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0"

UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03

~

~

[root@hyltest /]# vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=hyltest

~

~

#vi serverstop.sh

--编写关闭服务脚本

chkconfig iptables off
chkconfig ip6tables off
chkconfig cups off
chkconfig firstboot off
chkconfig wpa_supplicant off
chkconfig postfix off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
sed -i 's/^GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
#sh serverstop.sh

--运行关闭服务脚本

2. 安装包等

官方文档要求安装的包:

The following packages (or later versions) must be installed:

binutils-2.20.51.0.2-5.11.el6.i686

compat-libcap1-1.10-1.i686

compat-libstdc++-33-3.2.3-69.el6.i686

gcc-4.4.4-13.el6.i686

gcc-c++-4.4.4-13.el6.i686

glibc-2.12-1.7.el6.i686

glibc-devel-2.12-1.7.el6.i686

ksh

libgcc-4.4.4-13.el6.i686

libstdc++-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6.i686

libaio-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6.i686

make-3.81-19.el6.i686

sysstat-9.0.4-11.el6.i686

依据官方文档要求,上传对应的包,例如以下:

#vi rpm.sh

--编写安装rpm包脚本

rpm -ivh binutils-2.20.51.0.2-5.28.el6.x86_64.rpm
rpm -ivh binutils-devel-2.20.51.0.2-5.28.el6.i686.rpm
rpm -ivh binutils-devel-2.20.51.0.2-5.28.el6.x86_64.rpm
rpm -ivh compat-libcap1-1.10-1.i686.rpm
rpm -ivh compat-libcap1-1.10-1.x86_64.rpm
rpm -ivh compat-libstdc++-296-2.96-144.el6.i686.rpm
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.i686.rpm
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-3.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.6-3.el6.x86_64.rpm
rpm -ivh glibc-2.12-1.47.el6.i686.rpm
rpm -ivh glibc-2.12-1.47.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.47.el6.i686.rpm
rpm -ivh glibc-devel-2.12-1.47.el6.x86_64.rpm
rpm -ivh ksh-20100621-12.el6.x86_64.rpm
rpm -ivh libaio-0.3.107-10.el6.i686.rpm
rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.i686.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.x86_64.rpm
rpm -ivh libgcc-4.4.6-3.el6.i686.rpm
rpm -ivh libgcc-4.4.6-3.el6.x86_64.rpm
rpm -ivh libstdc++-4.4.6-3.el6.i686.rpm
rpm -ivh libstdc++-4.4.6-3.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.6-3.el6.i686.rpm
rpm -ivh libstdc++-devel-4.4.6-3.el6.x86_64.rpm
rpm -ivh make-3.81-19.el6.x86_64.rpm
rpm -ivh sysstat-9.0.4-18.el6.x86_64.rpm
#sh rpm.sh

--运行安装rpm包脚本

配置yum

參考其他文章,訪问地址例如以下:

http://blog.csdn.net/huangyanlong/article/details/38614971

#vi yum.sh

--编写yum安装脚本。脚本里使用yum安装的与rpm包单独安装的有反复的,但没关系遇到已安装过的包时会自己主动检查版本号跳过安装

yum -y install autoconf
yum -y install automake
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-db
yum -y install compat-db42
yum -y install compat-db43
yum -y install compat-gcc-34
yum -y install compat-gcc-34-c++
yum -y install compatlibstdc++-33
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXp.so.6
yum -y install libXt.so.6
yum -y install libXtst.so.6
yum -y install libgcc_s.so.1
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install unixODBC
yum -y install unixODBC-devel
#sh yum.sh

--运行yum安装脚本

3. 加入用户、组、文件夹

[root@hyltest /]# groupadd oinstall

--加入oinstall组

[root@hyltest /]# groupadd dba

--加入dba组

[root@hyltest /]# useradd -g oinstall -G dba oracle

--加入oracle用户,主组为oinstall,属组为dba

[root@hyltest /]# passwd oracle

--为oracle用户创建password

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokens updated successfully.

[root@hyltest /]# id oracle

--查看oracle的id值

uid=501(oracle) gid=602(oinstall) groups=602(oinstall),603(dba)

[root@hyltest /]# mkdir -p /u01/app/oracle

--创建oracle相关文件夹

[root@hyltest /]# mkdir -p /u01/app/oraInventory

[root@hyltest /]# chown -R oracle:oinstall /u01/app

--将文件夹归属于oracle及其相关组

[root@hyltest /]# chmod -R 775 /u01/app

--赋予oracle对相关文件夹的訪问权限

4. 配置内核參数等

[root@hyltest /]# vi /etc/sysctl.conf

--改动内核參数

kernel.shmall = 4294967296

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65500

net.core.rmem_default = 4194304

net.core.wmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_max = 262144

~

[root@hyltest /]# 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

net.bridge.bridge-nf-call-ip6tables = 0

net.bridge.bridge-nf-call-iptables = 0

net.bridge.bridge-nf-call-arptables = 0

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65500

net.core.rmem_default = 4194304

net.core.wmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_max = 262144

[oracle@hyltest ~]$ vi .bash_profile

--改动oracle环境变量

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

ORACLE_SID=xcky

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH

~

~

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

--改动系统限制

oracle              soft    nproc   2047

oracle              hard    nproc   16384

oracle              soft    nofile  1024

oracle              hard    nofile  65536

~

[root@hyltest ~]# vi /etc/pam.d/login

session    required     /lib/security/pam_limits.so

session    required     pam_limits.so

~

~

# vi /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

5. 解压安装包

解压

例:解压.zip

# unzip p13390677_112040_Linux-x86-64_1of7.zip

# unzip p13390677_112040_Linux-x86-64_2of7.zip

6. 图形化安装oracle11g

使用X-manager远程调用图形化界面。例如以下图中指令:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

操作例如以下:

[root@hyltest ~]# xhost +

--开启图形化功能

access control disabled, clients can connect from any host

[root@hyltest ~]# su - oracle

[oracle@hyltest ~]$ cd /soft

[oracle@hyltest soft]$ ls

database  rpm11  rpm11odbc  rpm.sh  serverstop.sh  yum.sh

[oracle@hyltest soft]$ cd database

[oracle@hyltest database]$ ls

install      response  runInstaller  stage

readme.html  rpm       sshsetup      welcome.html

[oracle@hyltest database]$ ./runInstaller

--运行安装程序

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 15998 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 4095 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-10-15_08-33-36PM. Please wait ...[oracle@hyltest database]$ You can find the log of this install session at:

/u01/app/oraInventory/logs/installActions2014-10-15_08-33-36PM.log

进入到图形化后,依照提示逐步进行就可以,參考步骤例如以下:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

[root@hyltest ~]# /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@hyltest ~]# /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@hyltest ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /u01/app/oracle/product/11.2.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.

Finished product-specific root actions.

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

7. dbca建库

[oracle@hyltest database]$ dbca

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

8. netca配置监听

[oracle@hyltest database]$ netca

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast">

9. 配置开机实例自启动

[root@hyltest ~]# vi /etc/rc.d/rc.local

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

su - oracle -c "/u01/app/oracle/product/11.2.0/db_1/bin/dbstart start"

su - oracle -c "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start"

~

~

~

~

[root@hyltest ~]# vi /etc/oratab

# This file is used by ORACLE utilities.  It is created by root.sh

# and updated by either Database Configuration Assistant while creating

# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates

# the entry.  Lines beginning with a pound sign, '#', are comments.

#

# Entries are of the form:

#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:

#

# The first and second fields are the system identifier and home

# directory of the database respectively.  The third filed indicates

# to the dbstart utility that the database should , "Y", or should not,

# "N", be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

#

xcky:/u01/app/oracle/product/11.2.0/db_1:Y

~

"/etc/oratab" 23L, 784C written

原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明下面出处,否则追究版权法律责任。

深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/40181661

系列链接_20150523:

蓝的成长记——追逐DBA(1):奔波于路上。挺进山东 

蓝的成长记——追逐DBA(2):安装!

安装!

久违的记忆。引起我对DBA的又一次认知

蓝的成长记——追逐DBA(3):古董上操作。数据导入导出成了问题 

蓝的成长记——追逐DBA(4):追忆少年情愁,再探oracle安装(Linux下10g、11g) 

蓝的成长记——追逐DBA(5):不谈技术谈业务,恼人的应用系统

蓝的成长记——追逐DBA(6): 做事与做人:小技术。大为人

蓝的成长记——追逐DBA(7):基础命令,地基之石 

蓝的成长记——追逐DBA(8):重拾SP报告,回顾oracle的STATSPACK实验

蓝的成长记—
—追逐DBA(9):国庆渐去。追逐DBA,新规划。新启程

蓝的成长记——追逐DBA(10):飞刀防身,熟络而非专长:摆弄中间件Websphere 

蓝的成长记——追逐DBA(11):回家后的安逸,晕晕乎乎醒了过来 

蓝的成长记——追逐DBA(12):七天七收获的SQL

蓝的成长记——追逐DBA(13):协调硬件厂商,六个故事:所见所感的“server、存储、交换机......”

蓝的成长记——追逐DBA(14):难忘的“云”端。起步的hadoop部署

蓝的成长记——追逐DBA(15):以为FTP非常“简单”,谁成想一波三折

蓝色的成长记——追DBA(16):DBA也喝,佰这是一个

CentOS 6 安装Oracle11g的更多相关文章

  1. CentOS上安装oracle11g报错处理

    ​ 最近,在处理oracle gateway的报错问题.只因个人的测试环境已经迁移到docker上了,又懒得装一套环境就直接在机器上安装oracle11g.今天分享的故事就从此开始-- 运行环境 项目 ...

  2. centos平台搭建Oracle11g数据库+远程连接

    经过了几天的摸爬滚打,终于成功的能在宿主机上(window10上的Plsql)去成功的连上虚拟机上的centos数据库 下面将自己的经验分享给大家: 具体的centos7.centos6上安装Orac ...

  3. CentOS Linux上安装Oracle11g笔记

    CentOS Linux上安装Oracle11g 到 otn.oracle.com 网站上下载 Linux版的oracle 11g 编辑 /etc/sysctl.conf : kernel.shmal ...

  4. 【CentOS】在Centos7 下无图形界面安装 Oracle11g

    目标 - 在虚拟机CentOS7中无图形界面安装Oracle11G R2版本 ① 系统要求以及准备 1. 物理内存不小于1G: 查看方式: # grep MemTotal /proc/meminfo ...

  5. Linux CentOS 6.5 64位 静默安装Oracle11g 云主机

    本例: 通过SSH远程连接云主机,上传oracle11g安装包,在centos6.5上无图形化界面静默安装oracle11g. 涉及工具及环境: 1.本地环境windows7+ssh远程连接工具xSh ...

  6. CentOS/RHEL安装oracle 11G

    系统:RHEL6.5 + oracle11G x86_64 (CentOS上安装与此大同小异) 使用本地yum源(提前下载pdksh包),具体过程参考(适用于RHEL/CentOS):http://w ...

  7. CentOS 7安装Oracle 11gR2以及设置自启动

    一.环境准备 1.正确无误的CentOS 7系统环境 CentOS 7安装:http://www.cnblogs.com/VoiceOfDreams/p/8043958.html 2.正确的JDK环境 ...

  8. centos7远程安装oracle11g R2详细教程-解决一切问题

    相关链接与资源: sqldevelper(各种操作系统的oracle客户端) http://www.oracle.com/technetwork/cn/developer-tools/sql-deve ...

  9. CentOS 7安装Oracle 11gR2以及设置自启动(1)

    一.环境准备 1.正确无误的CentOS 7系统环境 虚拟机要求: 内存至少2G 处理器至少2个 根分区要大于20G(安装oracle很占空间,空闲空间要足够) 2.正确的JDK环境 CentOS 7 ...

随机推荐

  1. ubuntu12.10下arm-linux-gcc交叉编译环境的搭建

    交叉编译环境搭建的原因:通俗上讲,因为嵌入式系统可用资源比较少:几十M的ARM 二三百M的flash相对我们的pc机来说资源真的没法比.所以,为了解决这种局面就将PC机等作为主机,搭建开发环境,进行编 ...

  2. VC 中与字符串相关的宏 _T、TEXT,_TEXT、L 的作用(简单明了)

    一. 在字符串前加一个L作用:    如  L"我的字符串"    表示将ANSI字符串转换成unicode的字符串,就是每个字符占用两个字节.   strlen("as ...

  3. 使用git微命令深入理解git工作机制

    首先.这篇不是真正意义上的翻译,所以大家在看的时候不要找相应的英文文章相应着看.这篇文章之所以归类为翻译.是由于最開始有一篇英文文章让我对git内部机制有了清楚的认识,它能够说是我git的启蒙老师吧. ...

  4. autoit 处理文件上传弹出框,并在JAVA中调用

    Java  代码 //定义exe 文件存放的绝对路径 File file2 = new File("."); String command = file2.getCanonical ...

  5. 【web必知必会】—— 图解HTTP(转)good

    本篇总结关于http的相关知识,主要内容参考如下导图: 主要讲解的内容有: 1 URL与URI的区别. 2 请求报文与相应报文的内容. 3 GET与POST的区别. 4 http的cookie.持久化 ...

  6. Android清理设备内存具体完整演示样例(一)

    MainActivity例如以下: package come.on; import android.app.Activity; import android.content.Context; impo ...

  7. OpenCV-Python教程(9、使用霍夫变换检测直线)

    相比C++而言,Python适合做原型.本系列的文章介绍如何在Python中用OpenCV图形库,以及与C++调用相应OpenCV函数的不同之处.这篇文章介绍在Python中使用OpenCV的霍夫变换 ...

  8. document.write()相关

    原文地址:http://www.cnblogs.com/dh616854836/articles/2140349.html document.write()脚本向窗口(不管是本窗口或其他窗口)写完内容 ...

  9. PHP_SELF、 SCRIPT_NAME、 REQUEST_URI差别

    $_SERVER[PHP_SELF], $_SERVER[SCRIPT_NAME], $_SERVER['REQUEST_URI'] 在使用方法上是很相似的,他们返回的都是与当前正在使用的页面地址有关 ...

  10. 公布windows的&quot;Universal Apps&quot; Unity3D游戏

    转载请注明出处:http://blog.csdn.net/u010019717 更全的内容请看我的游戏蛮牛地址:http://www.unitymanual.com/space-uid-18602.h ...