Installing Oracle Database 11g Release 1 on Enterprise Linux 5
Part I: Installing Enterprise Linux 5
Minimum hardware requirements:
- x86 compatible CPU
- 1 GB RAM
- 10 GB available disk space (3.5 GB for the Oracle software + 1.5 GB for the database + 3 GB for OEL5 + 2 GB swap)
- x86_64 compatible CPU
- 1 GB RAM
- 10.5 GB available disk space (4 GB for the Oracle software + 1.5 GB for the database + 3 GB for OEL5 + 2 GB swap)
Oracle Database 11g Release 1 is certified to run the base release of OEL5 without updates. Free copies of OEL5 are available for download.
- Boot the server using the first CD or DVD
- You may need to change your BIOS settings to allow booting from the CD/DVD.
- You may need to change your BIOS settings to allow booting from the CD/DVD.
- The boot screen appears with the boot: prompt at the bottom of the screen.
- Select Enter to continue with a graphical install on the console.
- The installer scans your hardware
- Select Enter to continue with a graphical install on the console.
- Oracle Enterprise Linux splash screen
- Click on Next
- Click on Next
- Language Selection
- Accept the default.
- Accept the default.
- Keyboard Configuration
- Accept the default.
- Accept the default.
- Install or Upgrade
- Select Install and click on Next
- Select Install and click on Next
- Disk Partitioning Setup
- A thorough treatment of disk partitioning is beyond the scope of this guide, which assumes that you are familiar with disk partitioning methods.
WARNING: Improperly partitioning a disk is one of the surest and fastest ways to wipe out everything on your hard disk. If you are unsure how to proceed, stop and get help, or you will risk losing data!) - Accept the default partition layout. Note that the default layout is sufficient for an evaluation, but would not be appropriate for other purposes. The default layout may create a swap partition that is smaller than the Oracle guidelines recommend. This is also sufficient for an evaluation.
- A thorough treatment of disk partitioning is beyond the scope of this guide, which assumes that you are familiar with disk partitioning methods.
- Network Configuration
- It is usually best to configure database servers with a static IP address. To do so, click on Edit .
- A pop-up window appears. Uncheck the Configure using DHCP box, and enter the IP Address and Netmask for the server. Be sure that Activate on boot is checked, and click on OK .
- In the Hostname box, select manually and enter the hostname.
- In the Miscellaneous Settings box, enter the remaining network settings.
- It is usually best to configure database servers with a static IP address. To do so, click on Edit .
- Time Zone Selection
- Choose the time settings that are appropriate for your area. Setting the system clock to UTC is usually a good practice for servers. To do so, select on System clock uses UTC.
- Choose the time settings that are appropriate for your area. Setting the system clock to UTC is usually a good practice for servers. To do so, select on System clock uses UTC.
- Set Root Password
- Enter a password for root, and enter it again to confirm.
- Enter a password for root, and enter it again to confirm.
- Package Installation
- This guide will follow the Oracle recommended practice of using a "default RPMs" installation. Accept the default software selection and click on Next.
- Additional RPMs are required to run Oracle Database 11g Release 1. These will be installed later.
- This guide will follow the Oracle recommended practice of using a "default RPMs" installation. Accept the default software selection and click on Next.
- Installing Packages
- Software will be copied to the hard disk and installed. Change disks as prompted.
- Software will be copied to the hard disk and installed. Change disks as prompted.
- After software installation is complete
- Remove any boot CD/DVD media.
- Click on Next.
- Remove any boot CD/DVD media.
- Welcome
- Click on Forward
- Click on Forward
- License Agreement
- Read the license agreement. If you agree to the terms, select Yes, I agree to the License Agreement and click on Forward.
- Read the license agreement. If you agree to the terms, select Yes, I agree to the License Agreement and click on Forward.
- Firewall Configuration
- For the purposes of this walk-through, no firewall is configured. Select Disabled and click on Forward.
- Click on Yes when the "Warning - No Firewall" window appears.
- For the purposes of this walk-through, no firewall is configured. Select Disabled and click on Forward.
- SELinux
- Select Disabled from the drop down bar and click on Forward.
- Select Disabled from the drop down bar and click on Forward.
- Kdump
- Do not enable Kdump. Accept the default and click on Forward.
- Do not enable Kdump. Accept the default and click on Forward.
- Date and Time
- Set the Date and Time.
- If you want to use an NTP server (recommended), select Enable Network Time Protocol and enter the name of the NTP server.
- Set the Date and Time.
- System User
- Create an account for yourself.
- Do not create an account for oracle at this time. Creating the oracle account is covered later in this section.
- Create an account for yourself.
- Sound Card
- Configure the sound card, if any, and click on Forward.
- Configure the sound card, if any, and click on Forward.
- Additional CDs
- Click on Finish.
- Click on Finish.
- The system will reboot
- A graphical login screen appears.
- Congratulations! Your OEL5 software is now installed.
Installing Required Packages
Additional Linux software packages must be installed before installing the Oracle software. The package requirements differ for 32-bit and 64-bit architectures, so this section contains separate instructions for each architecture.
32-bit (x86) Installations
Required kernel version: 2.6.18 This kernel, or any of the kernels supplied in updates, works with Oracle Database 11g Release 1 .
Check your kernel version by running the following command:
uname -r
Ex:
# uname -r
2.6.18-8.el5
Required package versions (or later):
- compat-libstdc++-33-3.2.3-61
- elfutils-libelf-0.125-3.el5
- elfutils-libelf-devel-0.125-3.el5
- glibc-2.5-12
- glibc-devel-2.5-12
- glibc-common-2.5-12
- gcc-4.1.1-52.el5
- gcc-c++-4.1.1-52.el5
- kernel-headers
- libgcc-4.1.1-52.el5
- libaio-0.3.106-3.2
- libaio-devel-0.3.106-3.2
- libstdc++-4.1.1-52.el5
- libstdc++-devel-4.1.1-52.el5
- unixODBC-2.2.11-7.1
- unixODBC-devel-2.2.11-7.1
- sysstat-7.0.0-3.el5
- binutils-2.17.50.0.6-2.el5
- make-3.81-1.1
If you've performed a "default RPMs" install as suggested by Oracle, there are still some required packages that must be installed:
- compat-libstdc++-33
- elfutils-libelf-devel
- glibc-devel-2.5
- gcc
- gcc-c++
- libaio-devel
- libstdc++-devel
- unixODBC
- unixODBC-devel
- sysstat
To install the remaining packages, mount the Oracle Enterprise Linux media and move to the directory containing the RPMs.
Some required packages are dependent upon other packages, so the dependant packages must be installed as well. Login as root and run the following commands to install the remaining required packages and their dependent packages. (Warning: packages often move from disk to disk across different releases.)
Mount CD 2
cd cd_mount_point/Server
rpm -ivh elfutils-libelf-devel* glibc-devel-2* glibc-headers-2* gcc-4* libgomp-4* gcc-c++-4* libstdc++-devel-4*
Ex:
# rpm -ivh elfutils-libelf-devel* glibc-devel-2* glibc-headers-2* gcc-4* libgomp-4* gcc-c++-4* libstdc++-devel-4*
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libgomp ########################################### [ 25%]
2:glibc-headers ########################################### [ 33%]
3:glibc-devel ########################################### [ 42%]
4:gcc ########################################### [ 50%]
5:gcc-c++ ########################################### [ 58%]
6:elfutils-libelf-devel-s########################################### [ 92%]
7:elfutils-libelf-devel ########################################### [100%]
8:libstdc++-devel-4 ########################################### [100%]
Mount CD 3
cd cd_mount_point/Server
rpm -ivh compat-libstdc++-33* libaio-devel* sysstat*
unixODBC*
Ex:
# rpm -ivh compat-libstdc++-33* libaio-devel* sysstat* unixODBC*
warning: sysstat-7.0.0-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:unixODBC ########################################### [ 8%]
2:libaio-devel ########################################### [ 75%]
3:compat-libstdc++-33 ########################################### [ 83%]
4:sysstat ########################################### [100%]
To verify that the required packages have been installed on your system, run the following command:
rpm -q compat-libstdc++-33 elfutils-libelf-devel glibc-devel-2.5 gcc gcc-c++ libaio-devel libstdc++-devel \
unixODBC unixODBC-devel sysstat binutils elfutils-libelf glibc glibc-common libaio libgcc libstdc++ make
Ex:
# rpm -q compat-libstdc++-33 elfutils-libelf-devel glibc-devel-2.5 gcc gcc-c++ libaio-devel libstdc++-devel \
> unixODBC unixODBC-devel sysstat binutils elfutils-libelf glibc glibc-common libaio libgcc libstdc++ make
compat-libstdc++-33-3.2.3-61
elfutils-libelf-devel-0.125-3.el5
glibc-devel-2.5-12
gcc-4.1.1-52.el5
gcc-c++-4.1.1-52.el5
libaio-devel-0.3.106-3.2
libstdc++-devel-4.1.1-52.el5
unixODBC-2.2.11-7.1
unixODBC-devel-2.2.11-7.1
sysstat-7.0.0-3.el5
binutils-2.17.50.0.6-2.el5
elfutils-libelf-0.125-3.el5
glibc-2.5-12
glibc-common-2.5-12
libaio-0.3.106-3.2
libgcc-4.1.1-52.el5
libstdc++-4.1.1-52.el5
make-3.81-1.1
64-bit (x86_64) Installations
Required kernel version: 2.6.18 This kernel, or any of the kernels supplied in updates, works with Oracle Database 11g Release 1 .
Check your kernel version by running the following command:
uname -rm
Ex:
# uname -rm
2.6.18-8.el5 x86_64
Required package versions (or later):
- binutils-2.17.50.0.6
- compat-libstdc++-33-3.2.3
- compat-libstdc++-33-3.2.3 (32 bit)
- elfutils-libelf-0.125
- elfutils-libelf-devel-0.125
- gcc-4.1.1
- gcc-c++-4.1.1
- glibc-2.5-12
- glibc-2.5-12 (32 bit)
- glibc-common-2.5
- glibc-devel-2.5
- glibc-devel-2.5-12 (32 bit)
- libaio-0.3.106
- libaio-0.3.106 (32 bit)
- libaio-devel-0.3.106
- libgcc-4.1.1
- libgcc-4.1.1 (32 bit)
- libstdc++-4.1.1
- libstdc++-4.1.1 (32 bit)
- libstdc++-devel 4.1.1
- make-3.81
- sysstat-7.0.0
Note that there are a number of packages where both the 64-bit and 32-bit RPMs must be installed. Fortunately, both are provided on the 64-bit Linux installation media.
If you've performed a "default RPMs" install as suggested by Oracle, there are still some required packages that must be installed:
- compat-libstdc++-33-3.2.3
- compat-libstdc++-33-3.2.3 (32 bit)
- elfutils-libelf-devel-0.125
- gcc-4.1.1
- gcc-c++-4.1.1
- glibc-devel-2.5
- glibc-devel-2.5-12 (32 bit)
- libaio-devel-0.3.106
- libstdc++-devel 4.1.1
- sysstat-7.0.0
To install the remaining packages, mount the Oracle Enterprise Linux media and move to the directory containing the RPMs.
Some required packages are dependent upon other packages, so the dependant packages must be installed as well. Login as root and run the following commands to install the remaining required packages and their dependent packages:
Mount CD 2
mount -t iso9660 -r /dev/cdrom /media
cd /media/Server
rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm
Ex:
# rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm
warning: elfutils-libelf-devel-0.125-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [ 11%]
2:glibc-devel ########################################### [ 22%]
3:libgomp ########################################### [ 33%]
4:gcc ########################################### [ 44%]
5:libstdc++-devel ########################################### [ 56%]
6:gcc-c++ ########################################### [ 67%]
7:glibc-devel ########################################### [ 78%]
8:elfutils-libelf-devel-s########################################### [ 89%]
9:elfutils-libelf-devel ########################################### [100%]
cd /
eject
Mount CD 3
mount -t iso9660 -r /dev/cdrom /media
cd /media/Server
rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm
Ex:
# rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [ 33%]
2:compat-libstdc++-33 ########################################### [ 67%]
3:compat-libstdc++-33 ########################################### [100%]
cd /
eject
Mount CD 4
mount -t iso9660 -r /dev/cdrom /media
cd /media/Server
rpm -ivh sysstat*
Ex:
# rpm -ivh sysstat*
warning: sysstat-7.0.0-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:sysstat ########################################### [100%]
To verify that the required packages have been installed on your system, run the following command:
rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \
compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
make sysstat
Ex:
# rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \
> compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
> glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
> make sysstat
binutils-2.17.50.0.6-2.el5 (x86_64)
compat-libstdc++-33-3.2.3-61 (i386)
compat-libstdc++-33-3.2.3-61 (x86_64)
elfutils-libelf-0.125-3.el5 (x86_64)
elfutils-libelf-devel-0.125-3.el5 (x86_64)
gcc-4.1.1-52.el5 (x86_64)
gcc-c++-4.1.1-52.el5 (x86_64)
glibc-2.5-12 (i686)
glibc-2.5-12 (x86_64)
glibc-common-2.5-12 (x86_64)
glibc-devel-2.5-12 (x86_64)
glibc-devel-2.5-12 (i386)
libaio-0.3.106-3.2 (x86_64)
libaio-0.3.106-3.2 (i386)
libaio-devel-0.3.106-3.2 (x86_64)
libgcc-4.1.1-52.el5 (x86_64)
libgcc-4.1.1-52.el5 (i386)
libstdc++-4.1.1-52.el5 (x86_64)
libstdc++-4.1.1-52.el5 (i386)
libstdc++-devel-4.1.1-52.el5 (x86_64)
make-3.81-1.1 (x86_64)
sysstat-7.0.0-3.el5 (x86_64)
Part II: Configuring Linux for Oracle
Create the Oracle Groups and User Account
Set the password on the oracle account:
Now create directories to store the Oracle Database 11g Release 1 software and the database files. This guide adheres to the Optimal Flexible Architecture (OFA) for the naming conventions used in creating the directory structure. For more information on OFA standards, see Appendix D of the Oracle Database Installation Guide 11g Release 1 (11.1) for Linux.
The following assumes that the directories are being created in the root filesystem. This is done for the sake of simplicity and is not recommended as a general practice. These directories would normally be created as separate filesystems.
Issue the following commands as root:
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app
Configuring the Linux Kernel Parameters
/sbin/sysctl -p
Ex:
# cat >> /etc/sysctl.conf <<EOF
net.ipv4.ip_local_port_range = 1024 65000
> kernel.sem = 250 32000 100 128
> net.ipv4.ip_local_port_range = 1024 65000
> net.core.rmem_default=4194304
> net.core.wmem_default=262144
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.shmmax = 4294967295 begin_of_the_skype_highlighting 4294967295 end_of_the_skype_highlighting
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
Run the following commands as root to verify your settings:
Setting shell limits for the oracle user
Change the default profile for bash and ksh as well as the default login script for cshell.
Oracle Database 11g Release 1 can be downloaded from OTN. Oracle offers a development and testing license free of charge. However, no support is provided and the license does not permit production use. A full description of the license agreement is available on OTN.
The easiest way to make the Oracle Database 11g Release 1 distribution media available on your server is to download them directly to the server.
Use the graphical login to log in as oracle.
Create a directory to contain the Oracle Database 11g Release 1 distribution:
mkdir 11gR1_db
To download Oracle Database 11g Release 1 from OTN, point your browser to the Oracle Database Download Page. Read the OTN License agreement. If you agree with the restrictions and the license agreement, click on Accept License Agreement.
Click on the Linux x86 link (32-bit) or Linux x86-64 link (64-bit) and save the file in the directory you created for this purpose (11gR1_db)—if you have not already logged in to OTN, you may be prompted to do so at this point.
Unzip and extract the file.
cd 11gR1_db
For 32-bit
unzip linux_11gR1_database.zip
For 64-bit
unzip linux.x64_11gR1_database.zip
Install the Software and Create a Database
Log in using the oracle account.
Change directory to the directory containing the Oracle Database 11g Release 1 software.
Ex:
$ cd $HOME/11gR1_db/database
Start the Oracle Universal Installer.
- Select Basic Installation
- Oracle Base Location: /u01/app/oracle
- Oracle Home Location: /u01/app/oracle/product/11.1.0/db_1
- Installation Type: Enterprise Edition (3.3GB)
- UNIX DBA Group: dba
- Make sure Create Starter Database is checked
- Global Database Name: demo1
- Enter the Database Password and Confirm Password
- Click on Next
- Select Basic Installation
- If you've been following the steps in this guide, all the checks should pass without difficulty. You may receive a warning related to swap file size if the default partition layout was used during OEL5 installation. This may be safely ignored . If one or more checks fail, correct the problem before proceeding.
- Click on Next
- If you've been following the steps in this guide, all the checks should pass without difficulty. You may receive a warning related to swap file size if the default partition layout was used during OEL5 installation. This may be safely ignored . If one or more checks fail, correct the problem before proceeding.
- Congratulations! Your new Oracle Database 11g Release 1 database is up and ready for use.
The number of cylinders for this disk is set to 30401.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
First cylinder (1-30401, default 1):
Last cylinder or +size or +sizeM or +sizeK (1-30401, default 30401):
The partition table has been altered!
Calling ioctl() to re-read partition table.
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 83 Linux
30539776 inodes, 61049000 blocks
3052450 blocks (5.00%) reserved for the super user
32768 blocks per group, 32768 fragments per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
A filesystem must have a mount point, which is simply an empty directory where the new filesystem "attaches" to the system's directory tree. Mount points should be given names consistent with the Oracle Flexible Architecture (OFA) standard. For more information on OFA standards, see Appendix D of the Oracle Database Installation Guide 11g Release 1 (11.1) for Linux.
Because the /u01 directory was created in Part I, this example uses /u02.
Ex:
# mkdir /u02
Add the New Filesystem to /etc/fstab
So that the new filesystem will be mounted automatically when the system boots, you need to add a line to the /etc/fstab file that describes the new filesystem and where to mount it. Add a line similar to the one below to /etc/fstab, using a text editor.
/dev/sda1 /u02 ext3 defaults 1 2
Mount the New Filesystem
Mounting the filesystem makes it available for use. Until the filesystem is mounted, files cannot be stored in it. Use the following commands to mount the filesystem and verify that it is available.
mount /u02
df -h /u02
Ex:
# mount /u02
# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 230G 188M 218G 1% /u02
Create Oracle Directories and Set Permissions
Now create a directory to store your Oracle database files. The directory name used in the example follows the OFA standard naming convention for a database with ORACLE_SID=demo1.
mkdir -p /u02/app/oracle/oradata/demo1
chown -R oracle:oinstall /u02/app
chmod -R 775 /u02/app
Create a New Tablespace in the New Filesystem
The new filesystem is ready for use. Next you create a new tablespace in the filesystem to store your database objects. Connect to the database as the SYSTEM user, and execute the CREATE TABLESPACE statement, specifying the data file in the new filesystem.
Ex:
$ sqlplus
SQL*Plus: Release 11.1.0.6.0 - Production on Sun Nov 4 15:19:00 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter user-name: system
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create tablespace data1
2 datafile '/u01/app/oracle/oradata/demo1/data1_01.dbf' size 100m
3 extent management local
4 segment space management auto;
Tablespace created.
Now you can use the new tablespace to store database objects such as tables and indexes.
Ex:
SQL> create table demotab (id number(5) not null primary key,
2 name varchar2(50) not null,
3 amount number(9,2))
4 tablespace data1;
Table created.
Automatic Storage Management (ASM)
ASM can use a variety of storage types including raw partitions, RAID LUNs, and NFS files. For Linux systems, Oracle provides a custom device driver known as ASMLib, which is recommended for most ASM installations on Linux. ASMLib is available for free download from OTN. This section walks through the process of configuring a simple ASM instance using ASMLib 2.0 and building a database that uses ASM for disk storage.
Determine Which Version of ASMLib You Need
ASMLib 2.0 is delivered as a set of three RPM packages.
- oracleasmlib-2.0 - the ASM libraries
- oracleasm-support-2.0 - utilities needed to administer ASMLib
- oracleasm - a kernel module for the ASM library that is specific to each kernel
Each Linux distribution has its own set of ASMLib 2.0 packages (OEL 5 uses the same RPMs as Red Hat Enterprise Linux 5 AS). Within each distribution, each kernel version has a corresponding oracleasm package. The following paragraphs describe how to determine which set of packages you need.
First, determine which kernel you are using by logging in as root and running the following command:
uname -rm
Ex:
# uname -rm
2.6.18-8.el5 i686
The example shows that this is a 2.6.18 kernel, patch level 8, for Enterprise Linux 5 on 32-bit x86 compatible hardware (i686).
Use this information to find the correct ASMLib packages on OTN:
- Point your Web browser to http://www.oracle.com/technology/tech/linux/asmlib/index.html
- Select the link for your version of Linux (OEL5 users may use the Red Hat Enterprise Linux 5 AS link).
- Download the oracleasmlib and oracleasm-support packages for your version of Linux. The files are grouped by architecture (AMD64 / Intel em64t for x86_64, IA64 for Itanium, and IA32 for x86). At the top of each section is a Library and Tools heading. Download both of the files under this heading - these are the support utilities and ASM libraries (oracleasm-support and oracleasmlib, respectively).
- Next, download the oracleasm package corresponding to your kernel. In the example above, the oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm package was used. Note that there are two or three drivers listed under most of the kernel versions. For example:
Drivers for kernel 2.6.18-8.el5
* oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686.rpm
* oracleasm-2.6.18-8.el5PAE-2.0.4-1.el5.i686.rpm
* oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm
Choose only one of these. In this example, there are drivers for Xen (virtual machine architecture), PAE (for 32-bit systems with more than 4GB RAM), and the "standard" 32-bit kernel.Next, install the packages by executing the following command as root:
rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
oracleasmlib-asmlib_version.cpu_type.rpm \
oracleasm-support-asmlib_version.cpu_type.rpm
Ex:
# rpm -Uvh oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm \> oracleasm-support-2.0.4-1.el5.i386.rpm \
oracleasmlib-2.0.3-1.el5.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.18-8.el5 ########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
Configuring ASMLib
Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below.
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
Next you tell the ASM driver which disks you want it to use. Oracle recommends that each disk contain a single partition for the entire disk. See Partitioning the Disks at the beginning of this section for an example of creating disk partitions.
Mark disks for use by ASMLib by running the following command as root:
/etc/init.d/oracleasm createdisk DISK_NAME device_name
Tip: Enter the DISK_NAME in UPPERCASE letters.
Ex:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sda1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
Verify that ASMLib has marked the disks:
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
Create the ASM Instance
ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer. Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance.
Log in as oracle and start runInstaller:
$ ./runInstaller
- Select Installation Method
- Select Advanced Installation
- Click on Next
- Select Advanced Installation
- Specify Inventory Directory and Credentials
- Inventory Directory: /u01/app/oraInventory
- Operating System group name: oinstall
- Click on Next
- Inventory Directory: /u01/app/oraInventory
- Select Installation Type
- Select Enterprise Edition
- Click on Next
- Select Enterprise Edition
- Install Location
- Oracle Base: /u01/app/oracle
- Name: OraDB11gASM
- Path: /u01/app/oracle/product/11.1.0/asm
Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration. - Click on Next
- Oracle Base: /u01/app/oracle
- Product-specific Prerequisite Checks
- If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
- Click on Next
- If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
- Select Configuration Option
- Select Configure Automatic Storage Management (ASM)
- Enter the ASM SYS password and confirm
- Click on Next
- Select Configure Automatic Storage Management (ASM)
- Configure Automatic Storage Management
- Disk Group Name: DATA
- Redundancy
- High mirrors data twice.
- Normal mirrors data once. This is the default.
- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy. - Add Disks
The disks you configured for use with ASMLib are listed as Candidate Disks. Select each disk you wish to include in the disk group. - Click on Next
- Disk Group Name: DATA
- Privileged Operating System Groups
- Database Administrator (OSDBA) Group: dba
- Database Operator (OSOPER) Group: dba
- ASM administrator (OSASM) Group: dba
- Click on Next
- Database Administrator (OSDBA) Group: dba
- Oracle Configuration Manager Registration
- Leave this disabled for the demo
- Click on Next
- Leave this disabled for the demo
- Summary
- A summary of the products being installed is presented.
- Click on Install.
- A summary of the products being installed is presented.
- Install
- Installation progress is displayed
- Installation progress is displayed
- Execute Configuration Scripts
- At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
- Click on OK when finished.
- At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
- Configuration Assistants
- The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
- The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
- End of Installation
- Cick on Exit
- Cick on Exit
- Congratulations! Your new Oracle ASM Instance is up and ready for use.
Create the Database
Once the ASM instance has been created, create a database that uses ASM for storage:
Log in as oracle and start runInstaller:
$ ./runInstaller
- Select Installation Method
- Select Advanced Installation
- Click on Next
- Select Advanced Installation
- Select Installation Type
- Select Enterprise Edition
- Click on Next
- Select Enterprise Edition
- Install Location
- Oracle Base: /u01/app/oracle
- Name: OraDb11g_home1
- Path: /u01/app/oracle/product/11.1.0/db_1
Note:Oracle recommends using a different ORACLE_HOME for the database than the ORACLE_HOME used for ASM. - Click on Next
- Oracle Base: /u01/app/oracle
- Product-specific Prerequisite Checks
- If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
- Click on Next
- If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
- Select Configuration Option
- Select Create a Database
- Click on Next
- Select Create a Database
- Select Database Configuration
- Select General Purpose
- Click on Next
- Select General Purpose
- Specify Database Configuration Options
- Enter the Global Database Name and SID
- Click on Next
- Enter the Global Database Name and SID
- Specify Database Config Options
- Accept the defaults or change as desired
- Click on Next
- Accept the defaults or change as desired
- Select Database Management Option
- Select Use Database Control for Database Management
- Click on Next
- Select Use Database Control for Database Management
- Specify Database Storage Option
- Select Automatic Storage Management (ASM)
- Click on Next
- Select Automatic Storage Management (ASM)
- Specify Backup and Recovery Options
- Select Do not enable Automated backups
- Click on Next
- Select Do not enable Automated backups
- Select ASM Disk Group
- Select the DATA disk group created in the previous section
- Click on Next
- Select the DATA disk group created in the previous section
- Specify Database Schema Passwords
- Select Use the same password for all the accounts
- Enter the password and confirm
- Click on Next
- Select Use the same password for all the accounts
- Privileged Operating System Groups
- Database Administrator (OSDBA) Group: dba
- Database Operator (OSOPER) Group: dba
- ASM administrator (OSASM) Group: dba
- Click on Next
- Database Administrator (OSDBA) Group: dba
- Oracle Configuration Manager Registration
- Leave this disabled for the demo
- Click on Next
- Leave this disabled for the demo
- Summary
- A summary of the products being installed is presented.
- Click on Install.
- A summary of the products being installed is presented.
- Configuration Assistants
- The Oracle configuration assistants will run automatically
- When the configuration is complete, a pop-up window will appear with information about the database. Make note of the URL and click on OK when ready.
- The Oracle configuration assistants will run automatically
- Execute Configuration Scripts
- At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
- Click on OK when finished.
- At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
- End of Installation
- Click on Exit
- Click on Exit
- Congratulations! Your new Oracle Database is up and ready for use.
Accessing the Database with SQL*Plus
Log into Linux as oracle. Set the environment.
Set the Oracle environment variables:
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle
SQL*Plus: Release 11.1.0.6.0 - Production on Sun Nov 4 23:56:47 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Using Oracle Enterprise Manager 11g Database Control
In a Web browser, connect to the URL provided during the installation.
User Name: SYSTEM
Password: <The password you chose during installation>
Connect As: Normal
Welcome to Oracle Enterprise Manager 11g Database Control.
Starting and Stopping Oracle Enterprise Manager Database Control:
$ emctl start dbconsole
$ emctl stop dbconsole
Starting and Stopping the Listener:
Starting and Stopping the Database:
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Nov 5 00:00:31 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Database Buffers 465567744 bytes
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Nov 5 00:00:31 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Comments
Post a Comment