Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7180416
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类: Oracle

2015-05-22 11:44:51

这篇文章描述Oracle Database 11g Release 2 (11.2) (64-bit) on Linux 6 (64-bit)的安装介绍,这篇文章的操作系统至少需要2G swap,
而且SELinux须设置为permissive,防火墙必须disabled。

需求关键点:
1、选择语言
2、SID:arpdb
3、选择字符集为 Simplfied Chinese ZHS16GBK
4、修改数据库端口为1523

red hat enterprise Linux 6 必须安装的package

The following or later version of packages for Oracle Linux 6, and Red Hat 
Enterprise Linux 6 must be installed:
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
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
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
unixODBC-2.2.14-11.el6 (x86_64)or later
unixODBC-2.2.14-11.el6.i686 or later
unixODBC-devel-2.2.14-11.el6 (x86_64) or later
unixODBC-devel-2.2.14-11.el6.i686 or later

上传镜像并挂载镜像
#mkdir -p /arp/software (上传rhel-server-6.4-x86_64-dvd.iso至/arp/software目录中)
#mkdir -p /arp/iso
#mount -o loop /arp/software/rhel-server-6.4-x86_64-dvd.iso /arp/iso

YUM文件配置
#cd /etc/yum.repos.d/
# mv rhel-source.repo rhel-source.repo.bak 
[root@localhost yum.repos.d]# cat rhel-source.repo
[Server]
name=Server
baseurl=file:///arp/iso
gpgcheck=0      
gpgkey=file:///arp/iso/RPM-GPG-KEY-redhat-release

验证yum功能
[root@localhost yum.repos.d]# yum list -y

安装所需的包
yum install -y binutils* 
yum install -y compat-libcap1*
yum install -y compat-libstdc++*
yum install -y elfutils-libelf* elfutils-libelf-devel*
yum install -y glibc* glibc-devel*
yum install -y gcc*
yum install -y gcc-c++*
yum install -y libaio* libaio-devel*
yum install -y libgcc*
yum install -y libstdc++ libstdc++-devel*
yum install -y ksh*
yum install -y libXp* libXp-devel*
yum install -y libxt* libxt-devel*
yum install -y make*
yum install -y sysstat*
yum install -y unixODBC*
yum install -y unixODBC-devel*

配置主机名称
vi  /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.13.10  arpdb-1310

添加oraarp用户
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oraarp

创建目录
mkdir -p /arp/oraarp/product
mkdir -p /arp/oraarp/oradata
mkdir -p /arp/oraarp/oraInventory

赋予权限
chown -R oraarp:oinstall /arp/oraarp
chown -R oraarp:oinstall /arp/software

# passwd oraarp

修改/etc/sysctl.conf文件
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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=1048586

要使 /etc/sysctl.conf 更改立即生效,执行以下命令
/sbin/sysctl -p

为Oracle用户设置shell限制

修改:/etc/security/limits.conf
oraarp              soft    nproc   16384
oraarp              hard    nproc   16384
oraarp              soft    nofile  4096
oraarp              hard    nofile  65536
oraarp              soft    stack   10240

配置环境变量
#su - oraarp
$vi  .bash_profile
增加如下几行:
# added by oraarp
export ORACLE_BASE=/arp/oraarp
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=arpdb
export NLS_LANG="Simplified Chinese_CHINA.ZHS16GBK"
export ORACLE_TERM=xterm 
export PATH=/usr/sbin:$PATH 
export PATH=$ORACLE_HOME/bin:$PATH 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64/ 
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 

注意:修改后要用oraarp重新登录,或者执行以下命令才能生效。
$source .bash_profile
检查环境变量是否生效:
$set

额外配置
配置/etc/selinux/config文件,关闭selinux。
SELINUX=permissive

VNC配置
VNC在Linux上的安装
#yum install tigervnc-server
# vncserver   #该命令在服务器端启动一个VNC进程。允许一个
   VNC View连接进来;如果需要多个View连接到服务器,需要多次执行上述命令;
Password:   # 为了不想任何人都可以任意遥控此计算机。因此当第1次启动VNC server时,会要求设置网络遥控的密码。
Verify:     # 验证密码;
进入root主目录下的.vnc隐含目录, 找到 xstartup文件并编辑:
# cd /root/.vnc
# vi xstartup 
# twm & (注释掉该行)
startkde & (添加该行)
# killall Xvnc
# vncserver

---------------------vnc安装需要图形桌面环境---------------------
yum groupinstall "X Window System"
yum -y groupinstall Desktop
----------------------------------------------------------------
上传Oracle包至/arp/software/目录中
#11.2.0.4
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
# cd /arp/software/
# chown -R oraarp.oinstall database
# chmod 777 -R database

如果是以root用户启动的话,需要首先执行(进图形化界面):
[root@node1 ~]#  xhost +
Access control disabled, clients can connect from any host
[root@node1 ~]#  su - oraarp
[oraarp@localhost software]# cd /arp/software/database/
[oraarp@node1 database]$ ./runInstaller  

监听配置

配置文件/arp/oraarp/product/11.2.0/db_1/network/admin/listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = arpdb-1310)(PORT = 1523))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /arp/oraarp/product/11.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = arpdb)
      (ORACLE_HOME = /arp/oraarp/product/11.2.0/db_1)
      (SID_NAME = arpdb)
    )
  )

自启动配置
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
arpdb:/u01/app/oracle/product/11.2.0/db_1:Y

软件介质文档来源:来自Oracle MOS     
                 文档号:730365.1
                 专门介绍Oracle版本升级的文档。
可知Oracle 11gR2的最新版本为11.2.0.4
文章描述如下:The software can be downloaded from My Oracle support: Patch:13390677
阅读(1017) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~