10.2.0.1安装并升级到10.2.0.5

10.2.0.1->10.2.0.5->EM补丁->建立实例->修复EM中文乱码问题
1.安装cenots 6.5 注意磁盘规划
内存大小建议1G以上

swap设置
RAM     Swap Space
Up to 512 MB     2 times the size of RAM
Between 1024 MB and 2048 MB     1.5 times the size of RAM
Between 2049 MB and 8192 MB     Equal to the size of RAM
More than 8192 MB     0.75 times the size of RAM

硬盘大小
临时目录可用大小大于400M
df -k /tmp

If there is less than 400 MB of free disk space available in the /tmp directory, then complete one of the following steps:

    Delete unnecessary files from the /tmp directory to meet the disk space requirement.

    Set the TEMP and TMPDIR environment variables when setting the oracle user's environment (described later).

    Extend the file system that contains the /tmp directory. If necessary, contact your system administrator for information
     about extending file systems.

安装目录大小(例如/u01目录至少1.9剩余空间)
# df -k

The following table shows the approximate disk space requirements for software files for each installation type:
Installation Type     Requirement for Software Files (GB)
Enterprise Edition     1.9
Standard Edition     1.9
Custom (maximum)     2.0

2.安装所需包
设置hosts解析
[root@ora10g-1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.213.88 ora10g-1 ora10g-1.localdomain

[root@ora10g-1 ~]# export ORACLE_HOSTNAME=ora10g-1.localdomain
[root@ora10g-1 ~]#
若是出现如下错误
 Protected multilib versions: libXtst-1.2.2-2.1.el6.i686 != libXtst-1.2.1-2.el6.x86_64
Error: Protected multilib versions: libXt-1.1.4-6.1.el6.i686 != libXt-1.1.3-1.el6.x86_64
 You could try using --skip-broken to work around the problem
 
[root@ora10g-1 ~]# yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat libXp  libXt.i686 libXtst.i686 libXt.i686 libXtst.i686 --setopt=protected_multilib=false

3.修改内核文件(/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

sysctl -p

4.修改shell限制(/etc/security/limits.conf)
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

5.Add or edit the following line in the /etc/pam.d/login file, if it does not already exists
vim /etc/pam.d/login添加如下行
session required pam_limits.so

6.Depending on the oracle user's default shell, make the following changes to the default shell start-up file:

    For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the /etc/profile.local file on SUSE systems):
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

7.建立所需目录
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/10.2.0/db_1
mkdir -p /u01/app/oracle/oraInventory
mkdir -p /u02/oradata
mkdir -p /u02/flash_recovery_area

8.建立需用户及组并受权
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
/usr/sbin/useradd -g oinstall -G dba,oper oracle
passwd oracle
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u02
chmod 755 -R /u02/oradata
chmod 755 -R /u02/flash_recovery_area/

9.修改oracle用户bash_profile,添加如下内容
export TMP=/tmp;

export TMPDIR=$TMP;

export ORACLE_BASE=/u01/app/oracle;

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

export ORACLE_SID=netdata;

export ORACLE_TERM=xterm;

export PATH=/usr/sbin:$PATH;

export PATH=$ORACLE_HOME/bin:$PATH;
export NLS_LANG='SIMPLIFIED CHINESE_CHINA.AL32UTF8'
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
TNS_ADMIN=$ORACLE_HOME/network/admin;export TNS_ADMIN
alias tlog='tail -f /u01/app/oracle/admin/netdata/bdump/alert_netdata.log'
umask 022

10.修改内核版本
root账户
[root@ora10g-1 ~]# cp /etc/redhat-release /etc/redhat-release.bak
[root@ora10g-1 ~]# vim /etc/redhat-release
[root@ora10g-1 ~]#
[root@ora10g-1 ~]#
[root@ora10g-1 ~]# cat /etc/redhat-release
redhat-4

11.重启服务器,并将oracle 软件上传至服务器
[root@ora10g-1 ~]# mkdir -p /u02/soft
[root@ora10g-1 ~]# chown -R oracle:oinstall /u02/soft
用oracle 登陆上传至/u02/soft目录

12.安装oracle软件
[oracle@ora10g-1 ~]$ cd /u02/soft
[oracle@ora10g-1 soft]$
[oracle@ora10g-1 soft]$ pwd
/u02/soft
[oracle@ora10g-1 soft]$
ls
10201_database_linux_x86_64.cpio.gz  p8202632_10205_Linux-x86-64.zip
解压
gunzip 10201_database_linux_x86_64.cpio
cpio -idmv <10201_database_linux_x86_64.cpio

安装
[oracle@ora10g-1 soft]$ cd database/
[oracle@ora10g-1 database]$ ./r
response/     runInstaller  
[oracle@ora10g-1 database]$ ./r
response/     runInstaller  
[oracle@ora10g-1 database]$ ./runInstaller
[oracle@ora10g-1 database]$ ./runInstaller
正在启动 Oracle Universal Installer...

正在检查安装程序要求...

检查操做系统版本: 必须是redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      经过


全部安装程序要求均已知足。

准备从如下地址启动 Oracle Universal Installer /tmp/OraInstall2015-03-01_05-33-01PM. 请稍候...[oracle@ora10g-1 database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2015-03-01_05-33-01PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
    at sun.awt.DebugHelper.(Unknown Source)
    at java.awt.Component.(Unknown Source)
    
用root安装如下包
[root@ora10g-1 ~]# yum -y install libXp.so.6

从新安装,界面出现乱码
[root@ora10g-1 ~]# mkdir -p /usr/share/fonts/zh_CN/TrueType
[root@ora10g-1 ~]# cd /usr/share/fonts/zh_CN/TrueType
将windows下黑体常规修改文件名并拷贝到以上目录
选择仅安装软件
安装完成
 /u01/app/oracle/oraInventory/orainstRoot.sh
更改权限/u01/app/oracle/oraInventory 到 770.
更改组名/u01/app/oracle/oraInventory 到 oinstall.
脚本的执行已完成 以root账户运行如下脚本
[root@ora10g-1 TrueType]# /u01/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/10.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.sh script.
Now product-specific root actions will be performed.

13.打补丁
[oracle@ora10g-1 soft]$ ls
10201_database_linux_x86_64.cpio  database  p8202632_10205_Linux-x86-64.zip
[oracle@ora10g-1 soft]$ unzip p8202632_10205_Linux-x86-64.zip
[oracle@ora10g-1 Disk1]$ pwd
/u02/soft/Disk1
[oracle@ora10g-1 Disk1]$ ./runInstaller
[oracle@ora10g-1 Disk1]$ ./runInstaller
正在启动 Oracle Universal Installer...

正在检查安装程序要求...

检查操做系统版本: 必须是redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, redhat-6, UnitedLinux-1.0, asianux-1, asianux-2, asianux-3, enterprise-4, enterprise-5 or SuSE-11
                                      未经过 <<<<

正在退出 Oracle Universal Installer。您能够在 /u01/app/oracle/oraInventory/logs/installActions2015-03-01_05-51-37PM.log 中找到本次会话的日志

vim /etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)
[oracle@ora10g-1 Disk1]$ ./runInstaller
安装完成
[root@ora10g-1 TrueType]# /u01/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle 10g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:

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.

14.打EM补丁p8350262_10205_Generic
[oracle@ora10g-1 soft]$ unzip p8350262_10205_Generic.zip
[oracle@ora10g-1 8350262]$ pwd
/u02/soft/8350262
[oracle@ora10g-1 8350262]$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply
Invoking OPatch 10.2.0.4.9

Oracle 中间补丁程序安装程序版本 10.2.0.4.9
版权全部 (c) 2009, Oracle Corporation。保留全部权利。


Oracle 主目录       : /u01/app/oracle/product/10.2.0/db_1
主产品清单: /u01/app/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.4.9
OUI 版本       : 10.2.0.5.0
OUI 位置      : /u01/app/oracle/product/10.2.0/db_1/oui
日志文件位置 : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2015-03-01_18-03-20下午.log

Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession 将中间补丁程序 '8350262' 应用到 OH '/u01/app/oracle/product/10.2.0/db_1'

Running prerequisite checks...

OPatch 从产品清单中检测到非集群 Oracle 主目录, 将仅对本地系统打补丁。

为 Oracle 主目录备份文件和产品清单 (不是用于自动回退)
正在备份受补丁程序 '8350262' 影响的文件以用于还原。此操做将须要一些时间...
正在备份受补丁程序 '8350262' 影响的文件以用于回退。此操做将须要一些时间...

正在为组件 oracle.sysman.agent.core, 10.2.0.5.0a 打补丁...
用 "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar"
用 "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar"
用 "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar"
用 "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emCORE.jar"
用 "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar"
用 "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar"
用 "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/RootCert.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar"
用 "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class" 更新 jar 文件 "/u01/app/oracle/product/10.2.0/db_1/sysman/jlib/emd_java.jar"
ApplySession 将中间补丁程序 '8350262' 添加到产品清单

Verifying the update...
Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8350262 are present in Oracle Home.

OPatch succeeded.

15.建立监听否则EM启动不了
 netca

Oracle Net Services 配置:
正在配置监听程序:LISTENER
默认本地命名配置完成。
监听程序配置完成。
Oracle Net 监听程序启动:
正在运行监听程序控制:
      /u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start LISTENER
   监听程序控制完成。
监听程序已成功启动。
成功完成 Oracle Net Services 配置。退出代码是0

16.dbca建库
实例名:netdata
flash_recovery路径:/u02/flash_recovery_area
sga:1200*0.8*0.7=672
pga:sga*0.15=100
process=500
字符集:A32UTF-8
默认语言:简体中文
默认语言格式:中国
链接模式:专有
control01:/u02/oradata/{DB_UNIQUE_NAME}/
control02:/u02/oradata/{DB_UNIQUE_NAME}/
control03:/u02/flash_recovery_area
最大数据文件:300
最大重作日志文件数:40
最大成员数:4
数据文件路径
/u02/oradata/{DB_UNIQUE_NAME}/
重作日志文件路径:/u02/oradata/{DB_UNIQUE_NAME}/ 生产环境尽可能不要放到raid5上 并且尽可能不和数据文件放在不一样IO设备上,文件至少100M 
保存为模板及脚本

来自 “ ITPUB博客 ” ,连接:http://blog.itpub.net/24486203/viewspace-1698704/,如需转载,请注明出处,不然将追究法律责任。 java

转载于:http://blog.itpub.net/24486203/viewspace-1698704/linux