oracle10g Database _php tutorial for building an LVM-based bare device on OracleLinux5.11

Source: Internet
Author: User

Build a oracle10g database of LVM-based bare devices on OracleLinux5.11


Software: Vmware11 operating system: Oraclelinux 5.11 x64 Database: Oracle 10.2.0.5 x64 Host name: Odb.test.localIP address: 192.168.223.100 #使用的是虚拟机主机网络 instance: OD B
First, the system installation process slightly, the installation process selected GNOME desktop environment, will be "development Libraries", "Development Tools", "Legacy software Development" Remember to select the installation, Others are not installed by default, such as Java, Office, and so on. Second, the system basic configuration 1. Configure the disc as a local yum installation source [Root@odb ~]# cd/etc/yum.repos.d/[root@odb yum.repos.d]# cat Local.repo[local]name= Localbaseurl=file:///media/cdrom/servergpgcheck=0enable=1
2. Disable SELinux, iptables service [root@odb ~]# sed-i ' s/=enforcing/=disabled/g '/etc/sysconfig/selinux
[Root@odb ~]# chkconfig iptables off[root@odb ~]# chkconfig ip6tables off Other system services are disabled according to the actual situation
3. Install the oracle-validated package for Oracle provisioned environment configuration [ROOT@ODB ~] #yum-y install oracle-validated.x86_64
[Root@odb ~]# Oracle-validated-verify
This command automates the environment configuration required for Oracle software installation, such as installing missing packages, adding sysctl configurations, ulimited-related, and so on, such as Oracle users, DBA groups, etc. that are automatically created when the system is installed, which is much more convenient than using CentOS [ Root@odb ~]# sed-i ' 1i\redhat 4 '/etc/redhat-release
[Root@odb ~]# sed-i ' $a \192.168.223.100 odb.test.local odb '/etc/hosts

4. Install rlwrap software (use this software can make sqlplus and so on to increase the page up and down history and other functions)
[Root@odb ~]# tar-xf rlwrap-0.42.tar.gz-c/tmp/
[Root@odb ~]# cd/tmp/rlwrap-0.42/[root@odb rlwrap-0.42]#./configure; make All;make Install
5. Install Vmware-tools, process slightly 6. Installation configuration Vncserver[oracle@odb ~]# yum-y install Vncserver
[Oracle@odb ~]# cd/etc/sysconfig/[oracle@odb sysconfig]# vim vncserversvncservers= "1:root" VNCSERVERARGS[1]= "- Geometry 1024x768-depth 24 "After the configuration is saved, [Root@odb ~]# vncserver #第一次执行会提示输入vnc的密码 and automatically generates the initial configuration in the user directory
[Root@odb ~]# CD. VNC
[Root@odb. vnc]# Vim xstartup#!/bin/sh
# Uncomment the following, lines for normal desktop:unset Session_manager EXEC/ETC/X11/XINIT/XINITRC
[-x/etc/vnc/xstartup] && exec/etc/vnc/xstartup[-R $HOME/. Xresources] && Xrdb $HOME/. Xresourcesxsetroot-solid greyvncconfig-iconic &xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" & #t WM & Gnome-session & Modification is easy, remove the comments from the last two lines of red, comment out the final line, add the use of Gnome-session & on the line
7. Set up Oracle installation directory, basic environment, etc.
[Root@odb ~]# mkdir-p/opt/oracle/
[Root@odb ~]# chown-r oracle:oinstall/opt/oracle/
[Root@odb ~]# chmod-r 775/opt/oracle/
Add Oracle environment variables [ORACLE@ODB ~]$ su-oracle
[Oracle@odb ~]$ vim. Bash_profile #添加以下内容

Export Oracle_sid=odbexport oracle_base=/opt/oracleexport oracle_home= $ORACLE _base/product/10.2.0/db_1export PATH= $PATH: $ORACLE _home/binexport oracle_term=xtermexport ld_library_path= $LD _library_path: $ORACLE _home/libexport Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlibalias sqlplus= ' Rlwrap sqlplus '
Alias rman= ' Rlwrap Rman '
Third, the Oracle database software installation of the previous work done, ready to formally install the Oracle database, using a VNC client to connect to the server (how to connect this can not teach, self-check Information Bar), after connecting, open a new Terminal[root@odb ~]# Xhost +access control disabled, clients can connect from any Host[root@odb ~]# export Display=:1[root@odb ~]# su-oracle[ Oracle@odb ~] $cpio-IDMV </mnt/hgfs/oracle/oracle10g/linux.x64/10201_database_linux_x86_64.cpio [Oracle@odb ~]$ CD Database/[oracle@odb database]$./runinstaller behind is the graphical installation process, also do not bother to say, if there are some in the environmental inspection but, according to the prompt modification can be installed, select only install software can.
After installation, the patch installation [Oracle@odb ~] $unzip/mnt/hgfs/oracle/oracle10g/linux.x64/p8202632_10205_linux-x86-64.zip-d. [Oracle@odb ~]$ cd Disk1/[oracle@odb disk1]$./runinstaller is also a graphical interface, the process is too lazy to say
Four, the bare equipment Environment configuration 1. Add a SCSI virtual hard disk online and use the following method to recognize when the system is not rebooted
[Root@odb ~] #echo "---" >/sys/class/scsi_host/host0/scan
2. Creating volume groups and related logical volumes [Root@odb ~]# fdisk/dev/sdb #创建一个单独的分区即可
[Root@odb ~]# PVCREATE/DEV/SDB1
[Root@odb ~]# vgcreate ORADATA/DEV/SDB1
Then create the LVM logical volume required by the Oracle database lvcreate-l 8m-n lv_spfile oradata lvcreate-l 20m-n lv_control01 oradata lvcreate-l 20m-n Lv_co Ntrol02 oradata lvcreate-l 20m-n lv_control03 oradata lvcreate-l 100m-n lv_redo01 oradata lvcreate-l 100m-n lv_redo0 2 oradata lvcreate-l 100m-n lv_redo03 oradata lvcreate-l 1g-n lv_system01 oradata lvcreate-l 1g-n lv_sysaux01 oradat A lvcreate-l 1g-n lv_users01 oradata lvcreate-l 1g-n lv_undo01 oradata lvcreate-l 1g-n lv_temp01 oradata using LVSC after successful creation An browse [Root@odb ~]# lvscan/dev/hdc:open failed:no medium found active '/dev/oradata/lv_spfile ' [8.00 MB] Inherit ACTIVE '/dev/oradata/lv_control01 ' [20.00 MB] Inherit active '/dev/oradata/lv_control02 ' [20.00 MB] Inherit ACTIVE '/dev/oradat A/lv_control03 ' [20.00 MB] Inherit active '/dev/oradata/lv_redo01 ' [100.00 MB] Inherit ACTIVE '/dev/oradata/lv_redo02 ' [1 00.00 MB] Inherit active '/dev/oradata/lv_redo03 ' [100.00 MB] Inherit active '/DEV/ORADATA/LV_SYSTEM01 ' [1.00 GB] Inherit ACTIVE '/dev/oradata/lv_sySAUX01 ' [1.00 GB] inherit active '/DEV/ORADATA/LV_USERS01 ' [1.00 GB] inherit ACTIVE '/dev/oradata/lv_undo01 ' [1.00 GB] Inh Erit active '/DEV/ORADATA/LV_TEMP01 ' [1.00 GB] inherit active '/dev/volgroup00/logvol00 ' [14.06 GB] Inherit ACTIVE '/dev/v Olgroup00/logvol01 ' [5.81 GB] inherit3. Bind the bare device and set the boot auto-load [root@odb ~]# vim/etc/sysconfig/rawdevices
/dev/raw/raw1/dev/oradata/lv_spfile/dev/raw/raw2/dev/oradata/lv_control01/dev/raw/raw3/dev/oradata/lv_ Control02/dev/raw/raw4/dev/oradata/lv_control03/dev/raw/raw5/dev/oradata/lv_redo01/dev/raw/raw6/dev/oradata/lv _redo02/dev/raw/raw7/dev/oradata/lv_redo03/dev/raw/raw8/dev/oradata/lv_sysaux01/dev/raw/raw9/dev/oradata/lv_ System01/dev/raw/raw10/dev/oradata/lv_users01/dev/raw/raw11/dev/oradata/lv_undo01/dev/raw/raw12/dev/oradata/lv _temp01[root@odb ~] #chkconfig rawdevices on
[Root@odb ~]#/etc/init.d/rawdevices start
[Root@odb ~]# ll/dev/raw*
Total 0cr--r-----1 root root 162, 1 Jan 21:52 raw1cr--r-----1 root root 162, Jan 21:52 raw10cr--r-----1 root R Oot 162, Jan 21:52 raw11cr--r-----1 root root 162, Jan 21:52 raw12cr--r-----1 root root 162, 2 Jan 18 21:52 Raw2cr--r-----1 root root 162, 3 Jan 21:52 raw3cr--r-----1 root root 162, 4 Jan 21:52 raw4cr--r-----1 root root 1 5 Jan 21:52 raw5cr--r-----1 root root 162, 6 Jan 21:52 raw6cr--r-----1 root root 162, 7 Jan 21:52 raw7cr--r -----1 root Root 162, 8 Jan 21:52 raw8cr--r-----1 root root 162, 9 Jan 21:52 Raw9
4. Set the group and access rights of the bare device (direct modification is useless, the root group will be restored automatically after restarting) [Root@odb ~]# Vim/etc/udev/rules.d/60-raw.rules
action== "Add", kernel== "raw*", owner= "Oracle", group= "DBA", mode= "0660"
[Root@odb ~]# start_udevstarting udev: [OK][root@odb ~]# LL/DEV/RAW*CRW-RW----1 Oracle DBA 162, 0 Jan 21:52/dev/ra Wctl
/dev/raw:total 0CRW-RW----1 Oracle DBA 162, 1 Jan 21:52 RAW1CRW-RW----1 Oracle DBA 162, Jan 21:52 raw10crw-rw-- --1 Oracle DBA 162, Jan 21:52 RAW11CRW-RW----1 Oracle DBA 162, Jan 21:52 RAW12CRW-RW----1 Oracle DBA 162, 2 Jan 21:52 RAW2CRW-RW----1 Oracle DBA 162, 3 Jan 21:52 RAW3CRW-RW----1 Oracle DBA 162, 4 Jan 21:52 raw4crw-rw-- --1 Oracle DBA 162, 5 Jan 21:52 RAW5CRW-RW----1 Oracle DBA 162, 6 Jan 21:52 RAW6CRW-RW----1 Oracle DBA 162, 7 Jan 21:52 RAW7CRW-RW----1 Oracle DBA 162, 8 Jan 21:52 RAW8CRW-RW----1 Oracle DBA 162, 9 Jan 21:52 Raw9
5. Create a data file to point to a soft connection to a bare device [Root@odb ~]# mkdir-p/opt/oracle/oradata/odb
Ln-s/dev/raw/raw1/opt/oracle/oradata/odb/spfileln-s/dev/raw/raw2/opt/oracle/oradata/odb/control01ln-s/dev/raw/ Raw3/opt/oracle/oradata/odb/control02ln-s/dev/raw/raw4/opt/oracle/oradata/odb/control03ln-s/dev/raw/raw5/opt/ Oracle/oradata/odb/redo01ln-s/dev/raw/raw6/opt/oracle/oradata/odb/redo02ln-s/dev/raw/raw7/opt/oracle/oradata/ Odb/redo03ln-s/dev/raw/raw8/opt/oracle/oradata/odb/sysaux01ln-s/dev/raw/raw9/opt/oracle/oradata/odb/system01ln -s/dev/raw/raw10/opt/oracle/oradata/odb/users01ln-s/dev/raw/raw11/opt/oracle/oradata/odb/undo01ln-s/dev/raw/ RAW12/OPT/ORACLE/ORADATA/ODB/TEMP01 After you create a soft connection, we recommend that you also change the group and permissions for these linked files [root@odb ~]# chown-r oracle:oinstall/opt/oracle/ oradata/odb/
[Root@odb ~]# chmod-r 775/opt/oracle/oradata/odb/

6. Create a bare device mapping file Dbca_raw_config.txt[root@odb ~]# su-oracle[oracle@odb ~]$ vim dbca_raw_config.txtspfile=/opt/oracle/ oradata/spfilecontrol1=/opt/oracle/oradata/odb/control01control2=/opt/oracle/oradata/odb/control02control3=/ opt/oracle/oradata/odb/control03redo1_1=/opt/oracle/oradata/odb/redo01redo2_1=/opt/oracle/oradata/odb/ redo02redo3_1=/opt/oracle/oradata/odb/redo03sysaux=/opt/oracle/oradata/odb/sysaux01system=/opt/oracle/oradata/ odb/system01users=/opt/oracle/oradata/odb/users01undotbs1=/opt/oracle/oradata/odb/undo01temp=/opt/oracle/ Oradata/odb/temp01
7. Run NETCA first to create Listenter and TNSNames, and the process is slightly 8. Run DBCA CREATE DATABASE [oracle@odb ~]$ export Dbca_raw_config=/home/oracle/dbca_raw_ CONFIG.txt
[Oracle@odb ~]$ DBCA
After the installation process is slightly, it is recommended to choose a custom installation, the installation process of bare device files if not, you can manually specify the file location of the soft link
These are the methods for installing an Oracle database on an LVM-based bare device.










http://www.bkjia.com/PHPjc/1092983.html www.bkjia.com true http://www.bkjia.com/PHPjc/1092983.html techarticle build an LVM-based bare device oracle10g database software on OracleLinux5.11: Vmware11 operating system: Oraclelinux 5.11 x64 Database: Oracle 10.2.0.5 x64 Host name: Odb.test.lo ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.