• Oracle10g升级到Oracle11g 实验过程


    在虚拟机环境下安装oracle10.2.0.1升级到10.2.0.4,然后再升级到11g的过程

    复制 所需要的文件

    安装10.2.0.1

    [root@demo ~]# /usr/sbin/groupadd oinstall

    [root@demo ~]# /usr/sbin/groupadd dba

    [root@demo ~]# /usr/sbin/useradd -g oinstall -G dba oracle

    [root@demo ~]# passwd oracle

    Changing password for user oracle.

    New UNIX password:

    oBAD PASSWORD: it is based on a dictionary word

    Retype new UNIX password:

    Sorry, passwords do not match.

    New UNIX password:

    BAD PASSWORD: it is based on a dictionary word

    Retype new UNIX password:

    passwd: all authentication tokens updated successfully.

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

    [root@demo ~]# 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 = 4294967295

    kernel.shmall = 268435456

    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 = 1048576

    net.core.rmem_max = 1048576

    net.core.wmem_default = 262144

    net.core.wmem_max = 262144

    [root@demo ~]# vim /etc/security/limits.conf

    oracle soft nproc 2047

    oracle hard nproc 16384

    oracle soft nofile 1024

    oracle hard nofile 65536

    [root@demo ~]# vim /etc/pam.d/login

    [root@demo ~]# cat /etc/pam.d/login

    #%PAM-1.0

    auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so

    auth include system-auth

    account required pam_nologin.so

    account include system-auth

    password include system-auth

    # pam_selinux.so close should be the first session rule

    session required pam_selinux.so close

    session include system-auth

    session required pam_loginuid.so

    session optional pam_console.so

    # pam_selinux.so open should only be followed by sessions to be executed in the user context

    session required pam_selinux.so open

    session optional pam_keyinit.so force revoke

    # for oracle

    session required /lib/security/pam_limits.so

    session required pam_limits.so

    /etc/profile file (or the file on SUSE systems)/etc/profile.local:

    if [ $USER = "oracle" ]; then

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

    ulimit -p 16384

    ulimit -n 65536

    else

    ulimit -u 16384 -n 65536

    fi

    Fi

    [root@demo ~]# mkdir -p /u01/app/oracle/product/10.2.0/db_1

    [root@demo ~]# chown -R oracle:oinstall /u01

    [root@demo ~]# chmod -R 775 /u01

    [oracle@demo ~]$ vi .bash_profile

    [oracle@demo ~]$ . .bash_profile

    [oracle@demo ~]$ cat .bash_profile

    # .bash_profile

    # Get the aliases and functions

    if [ -f ~/.bashrc ]; then

    . ~/.bashrc

    fi

    # User specific environment and startup programs

    PATH=$PATH:$HOME/bin

    PATH=$PATH:$HOME/bin

    ORACLE_BASE=/u01/app/oracle

    ORACLE_SID=demo

    ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

    export ORACLE_BASE ORACLE_SID ORACLE_HOME

    PATH=$ORACLE_HOME/bin:$PATH

    export PATH

    export LC_CTYPE=en_US

    [root@demo ~]# cd ~/Desktop/

    [root@demo Desktop]# ll

    total 2378948

    drwxr-xr-x 6 root root 4096 Jul 3 2005 10201_database_linux32

    -rw-r--r-- 1 root root 1322952768 Aug 30 2011 p10098816_112020_LINUX_1of7.zip

    -rw-r--r-- 1 root root 1050532828 Aug 30 2011 p10098816_112020_LINUX_2of7.zip

    drwxr-xr-x 3 root root 4096 Nov 8 12:38 p6810189_10204_Linux-x86.zip_FILES

    drwxr-xr-x 3 root root 4096 Nov 8 12:54 p6890831_111070_Linux-x86.zip_FILES

    -r--r--r-- 1 root root 60144286 Jan 18 2012 VMwareTools-8.8.2-590212.tar.gz

    [root@demo Desktop]# mv 10201_database_linux32 /

    [root@demo Desktop]# cd /

    [root@demo /]# chmod -R 777 10201_database_linux32/

    [root@demo /]# export DISPLYA=:0.0

    [root@demo /]# xhost +

    access control disabled, clients can connect from any host

    [oracle@demo ~]$ cd /10201_database_linux32/

    [oracle@demo 10201_database_linux32]$ ls

    doc install response runInstaller stage welcome.html

    [oracle@demo 10201_database_linux32]$ ./runInstaller

    Starting Oracle Universal Installer...

    Checking installer requirements...

    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

    Failed <<<<

    Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2012-11-08_01-10-21PM/installActions2012-11-08_01-10-21PM.log

    [root@demo /]# vim /etc/redhat-release

    [root@demo /]# cat /etc/redhat-release

    Red Hat Enterprise Linux Server release 4.0 (Tikanga)

    [oracle@demo 10201_database_linux32]$ ./runInstaller

    Starting Oracle Universal Installer...

    Checking installer requirements...

    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2

    Passed

    All installer requirements met.

    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-08_01-11-10PM. Please wait ...

    [root@demo /]# . /u01/app/oracle/oraInventory/orainstRoot.sh

    Changing permissions of /u01/app/oracle/oraInventory to 770.

    Changing groupname of /u01/app/oracle/oraInventory to oinstall.

    The execution of the script is complete

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

    建库

    Dbca

    安装完毕

    停库 准备升级到10.2.0.4

    [root@demo /]# su - oracle

    [oracle@demo ~]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 8 13:47:17 2012

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Connected to:

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    With the Partitioning, OLAP and Data Mining options

    SQL> shutdown immediate;

    Database closed.

    Database dismounted.

    ORACLE instance shut down.

    SQL> exit

    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    With the Partitioning, OLAP and Data Mining options

    [oracle@demo ~]$ ps -ef | grep ora

    root 3803 3765 0 11:39 ? 00:00:07 hald-addon-storage: polling /dev/hdc

    root 11497 11459 0 13:47 pts/2 00:00:00 su - oracle

    oracle 11498 11497 0 13:47 pts/2 00:00:00 -bash

    oracle 11549 11498 0 13:48 pts/2 00:00:00 ps -ef

    oracle 11550 11498 0 13:48 pts/2 00:00:00 grep ora

    root 18543 25059 0 13:07 pts/3 00:00:00 su - oracle

    oracle 18552 18543 0 13:07 pts/3 00:00:00 -bash

    [oracle@demo 10201_database_linux32]$ cd ../p6810189_10204_Linux-x86.zip_FILES/

    [oracle@demo p6810189_10204_Linux-x86.zip_FILES]$ ls

    Disk1 README.html

    [oracle@demo p6810189_10204_Linux-x86.zip_FILES]$ cd Disk1/

    [oracle@demo Disk1]$ ls

    10204_buglist.htm install patch_note.htm response runInstaller stage

    [oracle@demo Disk1]$ ./runInstaller

    [oracle@demo Disk1]$ ./runInstaller

    Starting Oracle Universal Installer...

    Checking installer requirements...

    Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1, asianux-2 or asianux-3

    Passed

    All installer requirements met.

    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-08_01-50-08PM. Please wait ...

    升级数据库软件

    [root@demo /]# . /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]:

    The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying dbhome to /usr/local/bin ...

    The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying oraenv to /usr/local/bin ...

    The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying coraenv to /usr/local/bin ...

    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.

    Dbua

    [oracle@demo Disk1]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.4.0 - Production on Thu Nov 8 15:21:57 2012

    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

    Connected to:

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    SQL> select * from v$version;

    BANNER

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

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod

    PL/SQL Release 10.2.0.4.0 - Production

    CORE 10.2.0.4.0 Production

    TNS for Linux: Version 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

    安装 11g r2

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

    chown -R oracle:oinstall /u01/app/

    chmod -R 775 /u01/app/

    [oracle@demo ~]$ cp .bash_profile .bash_profile_bak

    [oracle@demo ~]$ vim .bash_profile

    [oracle@demo ~]$ . .bash_profile

    [oracle@demo ~]$ cat .bash_profile

    # .bash_profile

    # Get the aliases and functions

    if [ -f ~/.bashrc ]; then

    . ~/.bashrc

    fi

    # User specific environment and startup programs

    PATH=$PATH:$HOME/bin

    PATH=$PATH:$HOME/bin

    ORACLE_BASE=/u01/app/oracle

    ORACLE_SID=demo

    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

    export ORACLE_BASE ORACLE_SID ORACLE_HOME

    PATH=$ORACLE_HOME/bin:$PATH

    export PATH

    export LC_CTYPE=en_US[root@demo VMwareDnD]# cd ~/Desktop/

    [root@demo Desktop]# mv database\(11.2.0\)/ /

    [root@demo Desktop]# cd /

    [root@demo /]# chmod -R 777 database\(11.2.0\)/

    mv database\(11.2.0\) database11r2

    [oracle@demo database11r2]$ ./runInstaller

    Starting Oracle Universal Installer...

    Checking Temp space: must be greater than 80 MB. Actual 3643 MB Passed

    Checking swap space: must be greater than 150 MB. Actual 2046 MB Passed

    Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed

    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-08_04-16-20PM. Please wait ...

    [root@demo Server]# vi /etc/sysctl.conf

    [root@demo Server]# 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 = 4294967295

    kernel.shmall = 268435456

    fs.aio-max-nr = 1048576

    fs.file-max = 6815744

    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@demo Server]# rpm -ivh sysstat-7.0.2-3.el5.i386.rpm

    warning: sysstat-7.0.2-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

    Preparing... ########################################### [100%]

    1:sysstat ########################################### [100%]

    [root@demo Server]# rpm -ivh libaio-devel-0.3.106-5.i386.rpm

    warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

    Preparing... ########################################### [100%]

    1:libaio-devel ########################################### [100%]

    [root@demo Server]# rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm

    warning: unixODBC-devel-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

    Preparing... ########################################### [100%]

    1:unixODBC-devel ########################################### [100%]

    [root@demo Server]# . /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

    Running Oracle 11g root.sh script...

    The following environment variables are set as:

    ORACLE_OWNER= oracle

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

    Finished product-specific root actions.

  • 相关阅读:
    MyEclipse 中引用包的快捷键
    php中函数 isset(), empty(), is_null() 的区别
    Mysql sql_mode设置 timestamp default 00000000 00:00:00 创建表失败处理
    20190729 将博客搬至CSDN
    Python网络爬虫精要
    PhpStorm 头部注释、类注释和函数注释的设置
    asp.net 将内容导出EXCEL文件(转)
    C#中用GDI+生成饼状图和柱状图
    企业级架构、开发在软件中的定义
    C#中的装箱与拆箱的概念
  • 原文地址:https://www.cnblogs.com/junnor/p/2886924.html
Copyright © 2020-2023  润新知