Installing Oracle 10g Release 2 Standard Edition on Red Hat Enterprise Linux 6.0 (x86_64)
2013-04-28 19:07
866 查看
Important Information
A production usage for Oracle RDBMS products on RHEL 6.x was for a long time not recommended. Starting with Oracle 11.2.0.3.0 RHEL 6.x can host production databases since it is a certified and supported platform. We recommend to use the latest RHEL kernel.Preamble
As you see from the title this page contains a very specific installation howto. It is the one to install respectively to deploy Oracle 10g Release 2 Standard Edition on Red Hat Enterprise Linux 6.0 (x86_64). Whether you are an Oracle newbie or an experienced Database Administrator the goal to setup a production, test or development database server within 60 minutes remains the same. OraToolKit (OTK) assists you through the whole installation process and the only thing what you have to do is to copy and paste the sample commands from this howto. Occasionally you may want to do some own customisation. This is no problem since OTK tries to be open and flexible. If this howto correspondes exactly to what you are looking for you may want to continue. Otherwise click here to find one of over 500 howtos which will hopefully match your requirements.Target audience
This howto is meant for every one interested in the installation task and who might also be impatient to go through the getting started tutorial which explains the concepts. Since of its "check list" nature this howto will steer you stright forward to the goal. If there will be something unclear for you there will be links pointing to the concepts.Preparation
This guide assumes that you have installed Red Hat Enterprise Linux 6.0 as Basic Server and that you have downloaded the following software:Category | Description | Version | File name | Download site |
---|---|---|---|---|
DB | Oracle 10g R2 | 10.2.0.1.0 | 10201_database_linux_x86_64.cpio.gz | oracle.com |
DB | Oracle 10g R2 Companion CD | 10.2.0.1.0 | 10201_companion_linux_x86_64.cpio.gz | oracle.com |
DB | Oracle 10g R2 patch-set | 10.2.0.4.0 | p6810189_10204_Linux-x86-64.zip | support.oracle.com |
TOOLS | oraToolKit | 1.0.2.1.5 | oratoolkit-1.0.2.1.5-1.noarch.rpm | sourceforge.net |
OS | Red Hat Enterprise Linux | 6.0 | rhel-server-6.0-x86_64-dvd.iso | redhat.com |
Installation Process
The next few subsections describes the installation process which will end with the creation of the database. In case you enable archivelog mode you may also read "Enabling Database backups" section.Installing the Korn Shell and oraToolKit
Connect with a terminal software like putty to your server and install the Korn Shell as well as oraToolKit.# su - root # mount /dev/cdrom /mnt; # rpm -ivh /mnt/Packages/ksh-20100621-2.el6.x86_64.rpm # cd /var/tmp/oracle # ls -1 oratool* oratoolkit-1.0.2.1.5-1.noarch.rpm # rpm -ivh oratoolkit-1.0.2.1.5-1.noarch.rpm
Setting password of OS user "oracle"
# passwd oracle
Fulfilling package requirements
Run software requirement check (swReqCheck) action of installManager. If you have a virgin system you may get some warnings. Add the missing packages using yum or rpm command. Rerun swReqCheck action until no warnings are shown.# /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfgTo install the missing packages using yum command follow the steps from the next box. Note that you will need access to a yum repository.
# # Generate yum command # REQ_FILE_DIR="/opt/oracle/otk/current/conf/installManager/requirement" # REQ_FILE_PATH="$REQ_FILE_DIR/ora10gR2-redhat-6-x86_64.pkg.lst" # YUM_COMMAND=$(echo "yum install") # YUM_COMMAND+=$(egrep -v "#" $REQ_FILE_PATH | grep 32-bit | awk '{ print " "$1".i[356]86" }') # YUM_COMMAND+=$(egrep -v "#" $REQ_FILE_PATH | grep 64-bit | awk '{ print " "$1".x86_64" }') # # Display yum command # echo $YUM_COMMAND # # Execute yum command # $YUM_COMMAND # # Run swReqCheck again # /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfgAs you can see the yum command can be dynamically generated using software requirement check file from oratoolkit. If you do not have access to a yum repository install the missing packages from installation media using rpm command.
# cd /mnt/Server/Packages/ # rpm -ivh gnome-icon-theme-2.28.0-2.el6.noarch.rpm \ sgml-common-0.6.3-32.el6.noarch.rpm \ dmz-cursor-themes-0.4-4.el6.noarch.rpm \ libstdc++-devel-4.4.4-13.el6.x86_64.rpm \ kernel-headers-2.6.32-71.el6.x86_64.rpm \ elfutils-libelf-devel-0.148-1.el6.x86_64.rpm \ libgcc-4.4.4-13.el6.i686.rpm \ nss-softokn-freebl-3.12.7-1.1.el6.i686.rpm \ glibc-2.12-1.7.el6.i686.rpm \ mpfr-2.4.1-6.el6.x86_64.rpm \ libXt-1.0.7-1.el6.x86_64.rpm \ libXmu-1.0.5-1.el6.x86_64.rpm \ libXxf86misc-1.0.2-1.el6.x86_64.rpm \ libXxf86vm-1.1.0-1.el6.x86_64.rpm \ libaio-0.3.107-10.el6.i686.rpm \ libstdc++-4.4.4-13.el6.i686.rpm \ ncurses-libs-5.7-3.20090208.el6.i686.rpm \ readline-6.0-3.el6.i686.rpm \ libICE-1.0.6-1.el6.i686.rpm \ xorg-x11-xauth-1.0.2-7.1.el6.x86_64.rpm \ cpp-4.4.4-13.el6.x86_64.rpm \ libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm \ unixODBC-2.2.14-11.el6.x86_64.rpm \ ppl-0.10.2-11.el6.x86_64.rpm \ cloog-ppl-0.15.7-1.2.el6.x86_64.rpm \ libmcpp-2.7.2-4.1.el6.x86_64.rpm \ mcpp-2.7.2-4.1.el6.x86_64.rpm \ xorg-x11-server-utils-7.4-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 \ libdmx-1.1.0-1.el6.x86_64.rpm \ libXxf86dga-1.1.1-1.el6.x86_64.rpm \ libXv-1.0.5-1.el6.x86_64.rpm \ libIDL-0.8.13-2.1.el6.x86_64.rpm \ ORBit2-2.14.17-3.1.el6.x86_64.rpm \ GConf2-2.28.0-6.el6.x86_64.rpm \ libbonobo-2.24.2-4.el6.x86_64.rpm \ gtk2-engines-2.18.4-5.el6.x86_64.rpm \ shared-mime-info-0.70-4.el6.x86_64.rpm \ libdaemon-0.14-1.el6.x86_64.rpm \ avahi-0.6.25-8.el6.x86_64.rpm \ avahi-glib-0.6.25-8.el6.x86_64.rpm \ gnome-vfs2-2.24.2-6.el6.x86_64.rpm \ libtool-ltdl-2.2.6-15.5.el6.i686.rpm \ unixODBC-2.2.14-11.el6.i686.rpm \ libuuid-2.17.2-6.el6.i686.rpm \ libSM-1.1.0-7.1.el6.i686.rpm \ libXau-1.0.5-1.el6.i686.rpm \ xorg-x11-utils-7.4-8.el6.x86_64.rpm \ compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm \ celt051-0.5.1.3-0.el6.x86_64.rpm \ libXp-1.0.0-15.1.el6.x86_64.rpm \ libxcb-1.5-1.el6.i686.rpm \ libX11-1.3-2.el6.i686.rpm \ libXext-1.1-3.el6.i686.rpm \ ConsoleKit-x11-0.4.1-3.el6.x86_64.rpm \ libXi-1.3-3.el6.i686.rpm \ xorg-x11-xinit-1.0.9-13.el6.x86_64.rpm \ libXtst-1.0.99.2-3.el6.i686.rpm \ libXt-1.0.7-1.el6.i686.rpm \ compat-libstdc++-33-3.2.3-69.el6.i686.rpm \ glibc-headers-2.12-1.7.el6.x86_64.rpm \ glibc-devel-2.12-1.7.el6.x86_64.rpm \ gcc-4.4.4-13.el6.x86_64.rpm \ compat-gcc-34-3.4.6-19.el6.x86_64.rpm \ gnome-themes-2.28.1-6.el6.noarch.rpm \ system-icon-theme-6.0.0-2.el6.noarch.rpm \ system-gnome-theme-60.0.2-1.el6.noarch.rpm \ ncurses-devel-5.7-3.20090208.el6.x86_64.rpm \ libgnome-2.28.0-11.el6.x86_64.rpm \ gcc-c++-4.4.4-13.el6.x86_64.rpm \ readline-devel-6.0-3.el6.x86_64.rpm \ glibc-devel-2.12-1.7.el6.i686.rpm \ compat-db-4.6.21-15.el6.x86_64.rpm \ unixODBC-devel-2.2.14-11.el6.i686.rpm \ unixODBC-devel-2.2.14-11.el6.x86_64.rpm \ libaio-devel-0.3.107-10.el6.i686.rpm \ libaio-devel-0.3.107-10.el6.x86_64.rpm \ compat-gcc-34-c++-3.4.6-19.el6.x86_64.rpm # cd /; umount /mnt; eject # /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfg
Enhancing sql*plus
If you would like to benefit from enhanced sql*plus functionality compile and install rlwrap utility.# cd /opt/oracle/otk/current/tools/rlwrap/ # ./configure # make # make install # /usr/local/bin/rlwrap -v
Executing osSetup action of installManager
Change into /opt/oracle/otk/current/conf/installManager directory and review osSetup10gR2.cfg. It contains kernel parameters, directories to be created, ownerships and other settings you may want to change. Keep the file unchanged if you go for a default installation. Execute afterwards osSetup action of installManager.# cd /opt/oracle/otk/current/conf/installManager/ # vi osSetup10gR2.cfg # sdiff -s osSetup10gR2.cfg sample/osSetup10gR2.cfg # /opt/oracle/otk/current/bin/installManager osSetup osSetup10gR2.cfg
Move Oracle software downloads to the repository
Move the downloaded Oracle software to /var/opt/oracle/repository which is the default place where software installation (swInst) action looks for it. Extraction / unzip will be managed by the swInst action.# cd /var/tmp/oracle # chown oracle:oinstall * # mv 10201_database_linux_x86_64.cpio.gz 10201_companion_linux_x86_64.cpio.gz p6810189_10204_Linux-x86-64.zip /var/opt/oracle/repository/
Logon as oracle user and customize your PS1 variable
Logon for the first time as oracle user and customize your PS1 variable. If you are not already familiar with vi edit .profile.custom.interactive directly with WinSCP's internal editor.# su - oracle ------------------------------------------------------ oraToolKit 1.0 environment variables ------------------------------------------------------ Installation directory : /opt/oracle/otk Release : 1.0.2.1.5 $RUN directory : /opt/oracle/otk/1.0/bin $LOG_BASE directory : /var/opt/oracle/otk/1.0/log ------------------------------------------------------ <SITE|COMPANY>:oracle@stquist1p:sidNotSet$ grep ^SITE .profile.custom.interactive SITE="<SITE|COMPANY>" <SITE|COMPANY>:oracle@stquist1p:sidNotSet$ vi .profile.custom.interactive <SITE|COMPANY>:oracle@stquist1p:sidNotSet$ grep ^SITE .profile.custom.interactive SITE="Quist-LU" <SITE|COMPANY>:oracle@stquist1p:sidNotSet$ exit # su - oracle Quist-LU:oracle@stquist1p:sidNotSet$
Installing Oracle Software
Install and patch Oracle software without clicking through Oracle Universal Installer (OUI). Use instead smart swInst action of installManager which installs Oracle SW with OUI silently. Add your own reponse files if you prefer another ORACLE_HOME destination.$ bash $ cd $INSTALL_CONF $ installManager swInst swInstSeSrv10gR2-Step1-linux-x86_64.cfg $ su - # /opt/oracle/sesrv/10.2.0/db1/root.sh # exit $ installManager swInst swInstSeSrv10gR2-Step2-linux-x86_64.cfg $ installManager swInst swInstSeSrv10gR2-Step3-linux-x86_64.cfg $ su - # /opt/oracle/sesrv/10.2.0/db1/root.sh # exit
Creating database(s)
Create one or more Oracle databases using dbSetup action of installManager. Change into $INSTALL_CONF directory if you are not already there and choose one configuration file. Review it and modify at least ORACLE_HOME variable before executing installManager.$ cd $INSTALL_CONF $ ls -1 dbSetup*.cfg dbSetup-dev.cfg dbSetup-prod.cfg dbSetup-test.cfg $ vi dbSetup-prod.cfg $ sdiff -s dbSetup-prod.cfg sample/dbSetup-prod.cfg ORACLE_HOME=/opt/oracle/sesrv/10.2.0/db1 | ORACLE_HOME=/opt/oracle/sesrv/11.1.0/db1 $ installManager dbSetup dbSetup-prod.cfg
Connecting to the database
Congratulation! You have successfully installed Oracle on your server. Try connecting to the database using EZCONNECT or TNS method. See also the next sections especially then if you will use your server in production.$ bash $ sourceProdEnv $ sqlplus otk/otk@//$ORACLE_HOSTNAME:1531/PROD $ sqlplus otk/otk@PROD
Managing Oracle with appctl
If you kept APPCTL_ENABLED variable which is set to TRUE check the managebility of your main Oracle processes.$ ctl status all $ ctl stop all $ ctl start all
Enabling database backups
This sections describes how you can enable physical rman backups. Go through it if your business requires a backup strategy to be implemented.Rman backups with backupManager
Change into $BACKUP_CONF directory and see the available configuration file. Review its values before executing backupManager.$ cd $BACKUP_CONF $ vi prod.cfg $ sdiff -s prod.cfg sample/prod.cfg DISK_DEVICE_MOUNT_POINT="/" | DISK_DEVICE_MOUNT_POINT="/backup01" $ backupManager full prod.cfg
Automating backup using cron job
After a successful first backup enable nigthly backups by uncommenting the first crontab example and by setting the right configuration file name(s).$ crontab -l|head -2 # Example 1: Daily physical database backup # 0 2 * * * [ -d $HOME/../current ] && (ksh -c '. ./.profile >/dev/null; backupManager full <sid_1>.cfg <sid_2>.cfg <sid_n>.cfg >/dev/null') $ crontab -e $ crontab -l|head -2 # Example 1: Daily physical database backup 0 2 * * * [ -d $HOME/../current ] && (ksh -c '. ./.profile >/dev/null; backupManager full prod.cfg >/dev/null')
相关文章推荐
- ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit) (转)
- 从Red Hat Enterprise Linux 5.4平台删除Oracle 10g release 2 数据库软件
- Red Hat Enterprise Linux 7.0 x86_64下安装Oracle 12c R1
- 在Red Hat Enterprise Linux 7.0 x86_64下安装Oracle 11g R2
- Installing Oracle 9i on Red Hat Enterprise Linux Advanced Server 4, 3, 2.1, and on Red Hat 9, 8.0, 7.3, 7.2, 7.1 (x86)
- Installing Oracle Database 10g Express Edition on Ubuntu 9.10 (Karmic Koala) x86_64 (amd64)
- oracle 11gR2 client安装(Red Hat Enterprise Linux Server release 5.5 (Tikanga) 安装ORACLE客户端)
- Red Hat Linux Enterprise 5安装Oracle 10G及Tomcat发布
- Red Hat Enterprise Linux 4 下安装 Oracle 10g [转]
- Oracle Database 12c Release 1 Installation On Oracle Linux 6.4 x86_64
- Installing Oracle9i 32-bit on Red Hat Enterprise Linux Advanced Server 4, 3, 2.1, and on Red Hat 9, 8.0, 7.3, 7.2, 7.1 (x86)
- Deploy Oracle 10.2.0.5 on Red Hat Enterprise Linux 6.4
- 在Red Hat Enterprise Linux 5.3 x86_64 安装 mongod 1.8.1
- Red Hat Enterprise Linux 4(64位) 下安装 Oracle 10g
- Install Oracle 10g on Red Hat Linux 5.3 Step by Step
- Pre-requisite Check Error on Red Hat Enterprise Linux Server Release 6.3 or 6.4
- 01 VMware Workstation 12 + Red Hat Enterprise Linux 7.2-x86-64-bit 安装
- Red Hat Enterprise Linux 4 下安装 Oracle 10g
- Red Hat Enterprise Linux 5 下安装 Oracle 10g
- Installing Oracle Database 10g on Linux x86