Install Oracle Database on Linux X86 10g

xiaoxiao2021-03-06  82

DBA: Linux installation of Oracle Database 10g on Linux x86: John Smiley learning the basics of a fresh install of Oracle Database 10g on RHEL 2.1, RHEL 3 or SLES 8 (only for assessment) Contents Overview Part 1: Installation LinuxRHEL 2.1RHEL 3SLES 8 Part 2: Configuring the Linux Verification System Requirements to Create Directory for Oracle Creating Oracle Groups and User Account Configuring Linux Core Parameters To set shell restrictions to Oracle users! (SLES 8) Oracle User Environment Variable Part 3: Install Oracle Installation Software Part 4: Configuring Storage File System Automatic Storage Management Conclusions Appendix

Overview This is the first part of the main component guide series of Oracle 10G Software on Linux. These articles describe all three certified English issuings of Linux (not introduced asianux) and assume that inexpensive Intel X86 hardware. At the same time, it has also gradually demonstrated the process of installing and configuring a common hardware for assessing the main Oracle 10G products. The fundamental goal of this series is to gradually demonstrate all components of how to install and configure 10G grid. Through this series, you will learn how to install and configure single instance Oracle 10G Database (this article), a dual-node Oracle RAC 10G database, Oracle application server 10G, and Oracle Enterprise Manager 10G grid control all of the main components. The method provided by this series will use the simplest way (the least steps) complete the task. This method usually means that the selected configuration will only be applied to the evaluation. Therefore, the series is neither applicable to the environment of constructing quality, nor does it reflects best practices. The following is three Linux issuings that have been introduced by Oracle 10g certifications in these articles:

Red Hat Enterprise Linux 2.1 Red Hat Enterprise Linux 3 Novell SUSE Linux Enterprise Server 8 If you are first touching Linux and / or Oracle, the first article is suitable for you. It first introduces the basic knowledge and gradually demonstrates how to install the Oracle database 10g. This article consists of four parts: Part 1 introduces how to install Linux operating system, Part 2 describes how to configure Linux in Oracle, describe the key points of Oracle database installation, Part 4 introduces how other file systems are created and It introduces the automatic storage management (ASM) (an excellent new feature in Oracle Database 10g, which significantly simplifies storage management). The appendix provides information that helps you understand the new database usage, including how to interactively access the database, how to stop and start databases and related services.

Part 1: Installing Linux This guide uses servers with the following hardware configurations:

Two 800MHz Pentium III CPU 512MB RAM Two SCSI Host Adapters (Ultra SCSI 160) Eight SCSI Disk Drivers (2 x 9GB 6 x 36GB) A 100BASE-T Ethernet Adapter A 1000BASE-T Ethernet Adapter Configuring the disk To connect each SCSI host adapter to a 9GB disk and three 36GB disks. Please note that although this is not a "powerful" setting, you can complete most of this guide. Basic Database Installation requires only one CPU, 512MB memory, and a disk drive (IDE, SCSI or FireWire) of at least 6.5GB. Now we will gradually demonstrate the process of installing the Linux operating system on the server. This article assumes a new installation (different from the upgrade) for Linux system, and assumes that the server is dedicated to Oracle, and there is no other operating system or data on the server. Red Hat Enterprise Linux 2.1 Oracle 10G is authenticated to run on Red Hat Enterprise Linux 2.1 (Update 3) or later. Red Hat Network (RHN) provides updates that can be used as an ISO file for creating a CD or update as a single package. To install application updates, the simplest, fastest way to new Linux is to perform installation using the update CD. If Linux is installed or not updated on the CD, these updates can be applied via RHN. Since this guide is for a new Linux installation, you will use the updated CD. Use the first CD set server using the update CD set.

You may need to change the BIOS settings to allow you to start from CD. When the start screen appears, the boot is displayed at the bottom :.

Select ENTER to perform graphics installation from the console. (For other installation methods and options, see the Red Hat Installation Guide.)

The installer scans the hardware, briefly displays the Red Hat flash screen, and then starts displaying a series of screen tips. Choose a language

Accept the default. Configuring the keyboard

Accept the default. Mouse

Accept the default. Installation type

Accept the default. Set disk partition

This article does not introduce the detailed method of disk partition, but assumes that you are familiar with disk partitioning methods. (Warning: Error partitioning to disk is one of the most reliable and fastest ways to delete all content on the hard disk. If you are not sure how to partition, please stop, find someone to help you, otherwise you will risk the danger of data. !) This article uses the following partitioning scheme (file system is ext3): The 9GB disk on the first controller (/ dev / sda) contains the following partitions for storing all Linux and Oracle software: - 100MB / boot partition (for RHEL 2.1, minimum is 50MB) -1, 500MB switched partition - set this partition size to twice the system RAM, but do not exceed 2GB (32-bit system does not support exaggerated exchange files greater than 2GB). If you need more than 2GB switched space, you create multiple swap partitions. -7, 150MB partition - this partition will be used in all directories, including / usr, / tmp, / var, / opt, / home, etc. This is purely to simplify the installation in order to explain this guide. More reliable partitioning solutions are divided into separate file systems. Configure the boot loader

Accept the default. Configure the startload load program port

If you want to set your password for your GRUB, please enter here. For the assessment system, this item is not required. Configuring a network Normally, it is best to use a static IP address to configure a database server. To do this, uncheck the configure using dhcp and enter the network configuration of the server. Make sure you have entered the host name and selected Activate on Boot. Configuring a firewall

For this demand, the firewall will not be configured. Select NO FireWall (security administrator, please do not be angry). Other language support

Accept the default. Select time zone

Choose Time settings for your area. Setting the system clock to UTC is usually a good practice. To do this, click System Clock Uses UTC. Configuration account

Select a password for the root user and enter it in the domain. Create an account yourself. (Do not create an Oracle account at this time; we will create it later.) Select the package group

Select GNOME or KDE (or both) The graphical user interface (default is gnome). Note: These two GUI are very popular, of which GNOME is more common in the United States. I personally prefer KDE because it can easily cut and paste it easily to copy the input to multiple connections (for example, when you configure RAC on multiple nodes, this will save typing operations) .

Select Software Development Unresolved Related

If you see this screen, simply select Install Packages to Satisfy DependenCIES and continue. Configure a graphical interface (X)

Accept the default value unless the installer cannot identify your video card. If your video card cannot be identified, you will not be able to continue. Preparation installation

Click Next installation package

The software will be copied to the hard drive and installed. Change the disk according to the prompt, and then click Next when the installation is complete. Create a startup disk

If you want, create a boot disk or select Skip Boot Disk Creation. Configuring a monitor

If the installer correctly identifies your monitor, accept the default. Otherwise, select a compatible monitor from the list. Congratulations

Remove the installation media from the system, then click Next. The system is automatically restarted and a graphic login screen is displayed. If you are using a basic product CD instead of updating the CD execution, you must update it through the RHN application before proceeding. Verify that if your installation is completed, you should have all the packages and updates required for Oracle 10g. You can perform the following steps to verify your installation. Required core version: 2.4.9-E.25 (or higher) Check the core version by running the following command: uname -r

E.g:

# uname -r

2.4.9-E.27SMP

Other version of the package (or higher):

GCC-2.96-124 Make-3.79 binutils-2.11 openmotif-2.1.30-11 GLIBC-2.2.4-31 Which versions of these packages are installed on the system, run the following command: rpm -q gcc make binutils OpenMotif Glibc

E.g:

# rpm -q gcc make binutils OpenMotif Glibc

GCC-2.96-118.7.2

MAKE-3.79.1-8

Binutils-2.11.90.0.8-12

OpenMotiF-2.1.30-11

GLIBC-2.2.4-32.8

If any package version is missing, or the version is older than the version specified above, you can download and install updates from Red Hat Network. Red Hat Enterprise Linux 3 Oracle 10G certified can run the Basic Version of Red Hat Enterprise Linux 3 (Advanced Server and Enterprise Server) without updating. If you have an update CD, you can use the startup CD in the update version without the starting CD in the basic version to automatically apply all updates during the installation process. Oracle supports all updates for Red Hat. Use the first CD to start the server.

You may need to change the BIOS settings to allow you to start from CD. When the start screen appears, the boot is displayed at the bottom :.

Select ENTER to perform graphics installation from the console. (For other installation methods and options, see the Red Hat Installation Guide.)

The installer scans the hardware, briefly displays the Red Hat flash screen, and then starts displaying a series of screen tips. Choose a language

Accept the default. Configuring the keyboard

Accept the default. Welcome screen

Click Next. Mouse

Accept the default. Installation type

Select Custom. Set disk partition

This article does not introduce the detailed method of disk partition, but assumes that you are familiar with disk partitioning methods. (Warning: Error partitioning to disk is one of the most reliable and fastest ways to delete all content on the hard disk. If you are not sure how to partition, please stop, find someone to help you, otherwise you will risk the danger of data. !) This article uses the following partitioning scheme (file system is ext3): The 9GB disk on the first controller (/ dev / sda) contains the following partitions for storing all Linux and Oracle software: - 100MB / boot partition -1,500 MB swap partition - set this partition size to twice the system RAM, but do not exceed 2GB (32-bit system does not support a swap file greater than 2GB). If you need more than 2GB switched space, you create multiple swap partitions. -7, 150MB partition - this partition will be used in all directories, including / usr, / tmp, / var, / opt, / home, etc. This is purely to simplify the installation in order to explain this guide. More reliable partitioning solutions are divided into separate file systems. Configure the boot loader

Accept the default. Configuring the network

Typically, it is best to configure the database server using a static IP address. To do this, click Edit.

A pop-up window appears. Uncheck the Configure Using DHCP check box and enter the server's IP address and network mask. Make sure you select Activate on Boot, and then click OK.

In the Hostname box, select Manually and enter the host name.

In the Miscellaneous Settings box, enter additional network settings. Configuring a firewall

For this demand, the firewall will not be configured. Select No FireWall. Other language support

Accept the default. Select time zone

Choose Time settings for your area. Setting the system clock to UTC is usually a good practice. To do this, click System Clock Uses UTC. Set the root password

Enter the channel of the root and enter again for confirmation. Select package group

Just select the package set displayed here, other options don't choose.

Desktop - X WINDOW System - GNOME- KDE- See IPA in the rhes 2.1. About the GUI selection.

Application - Editor - Graphic Internet

Server - Do not select any options in this group.

Development - development tools

System - Management Tools

Red Hat Enterprise Linux - Do not select any options in this group. Miscellaneous - Original Software Development Click Next Continue. Preparation installation

Click Next. Installation package

The software will be copied to the hard drive and installed. Change the disk according to the prompt, and then click Next when the installation is complete. Configure a graphical interface (X)

Accept the default value unless the installer cannot identify your video card. If your video card cannot be identified, you will not be able to continue. Configuring a monitor

If the installer correctly identifies your monitor, accept the default. Otherwise, select a compatible monitor from the list. Custom graphical configuration

Accept the default. Congratulations

Remove the installation media from the system, then click Next. The system is automatically restarted and displays a new welcome screen.

Click Next. agreement

Read the license agreement. If you agree to the terms, choose Yes, i agree to the license agreement and click Next. Date and time

Set the date and time.

If you want to use the NTP server (recommended), select Enable Network Time Protocol and enter the name of the NTP server. User account

Create an account yourself.

Do not create an account for Oracle at this time. This section will show you how to create an Oracle account later. Red Hat Network

If you want to use or activate the Red Hat Network account now, accept the default value, click Next and follow the product activation instructions that follow the Red Hat product. Other CD

Click Next. Complete settings

Click Next. A graphic login screen appears. Congratulations! Your Linux software is now installed. Verify that if your installation is completed, you should have all the packages and updates required for Oracle 10g. You can perform the following steps to verify your installation. The required core version: 2.4.21-4.el (this is the core version included with the basic version of RHEL 3. The kernels of any versions provided in this kernel or update apply to Oracle 10G.) Check the kernel version by running the following command : Uname -r

E.g:

# uname -r

2.4.21-4.0.1.elsmp

Other version of the package (or higher):

GCC-3.2.3-2 Make-3.79 binutils-2.11 openmotif-2.2.2-16 setarch-1.3-1 Compat-GCC-7.3-2.96.122 COMPAT-GCC-C - 7.3-2.96.122 Compat-libstDC - 7.3 -2.96.122 Compat-libstDC - DEVEL-7.3-2.96.122 Compat-DB-4.0.14.5 (Oracle 10G Database Installation Guide lists it as required, but not required) To view the system installed Which versions of these packages, run the following command as root user: rpm -q gcc make binutils openmotif setarch compat-db compat-gcc /

Compat-GCC-C Compat-LibSTDC Compat-LibSTDC - Devel

E.g:

# rpm -q gcc make binutils openmotif setarch compat-db compat-GCC /

> OpenMotif Compat-GCC-C Compat-LibSTDC Compat-LibSTDC - Devel

GCC-3.2.3-20

MAKE-3.79.1-17

Binutils-2.14.90.0.4-26

OpenMotiF-2.2.2-16

Setarch-1.3-1

Package Compat-DB Is Not Installed

Compat-GCC-7.3-2.96.122

COMPAT-GCC-C - 7.3-2.96.122

Compat-libstdc - 7.3-2.96.122

Compat-libstdc - DEVEL-7.3-2.96.122

Please note that there is no COMPAT-DB package. Any package group available during the installation process does not include this package, so you must install it in separate steps. If any other package version is missing, or the version is older than the version of the version specified above (except for Compat-DB), you can download and install and install updates from Red Hat Network. Install the COMPAT-DB insertion of the second CD of the original Red Hat Enterprise Linux media. (The package is not included in Update 2, which is only in the original medium.) This CD is automatically mounted. Run the following command as root user: rpm -ivh /mnt/cdrom/redhat/rpms/compat-db-4.0.14-5.i386.rpm

E.g:

# rpm -ivh /mnt/cdrom/redhat/rpms/compat-db-4.0.14-5.i386.rpm

Preparing ... #################################################### ]

1: compat-db ######################################### %]

SUSE Linux Enterprise Server 8 Oracle 10G is certified to run on Novell Suse Linux Enterprise Server (SLES) 8. Novell provides service packs and package updates through CD or through its support portal. In this guide, we will install SLES 8 from the CD (Service Pack 3).

Use the SLES 8 CD to start the server.

You may need to change the BIOS settings to allow you to start from CD. The SUSE Linux Enterprise Server installation screen appears.

Select Installation.

The installer scans your hardware and displays the YaST interface. Choose a language

Accept the license agreement.

Accept the default ENGLISH (US). Installation settings

Select New Installation. Partition

This article does not introduce the detailed method of disk partition, but assumes that you are familiar with disk partitioning methods. (Warning: Error partitioning to disk is one of the most reliable and fastest ways to delete all content on the hard disk. If you are not sure how to partition, please stop, find someone to help you, otherwise you will risk the danger of data. !) This article uses the following partitioning scheme (file system is ext3): The 9GB disk on the first controller (/ dev / sda) contains the following partitions for storing all Linux and Oracle software: - 100MB / boot partition -1,500 MB swap partition - set this partition size to twice the system RAM, but do not exceed 2GB (32-bit system does not support a swap file greater than 2GB). If you need more than 2GB switched space, you create multiple swap partitions. -7, 150MB partition - this partition will be used in all directories, including / usr, / tmp, / var, / opt, / home, etc. This is purely to simplify the installation in order to explain this guide. More reliable partitioning solutions are divided into separate file systems. Software Click Software's link.

The Software Selection screen appears.

Click Detailed Selection.

The left window displays the software selection list. Click the checkbox next to each option to select / uncheck it.

Choose the following software (this is recommended for software sets; do not select other software): - C / C compiler and tool - KDE (or gnome) - LSB Runtime Environment - Help and Support Document - Graphic Basic System - YaST2 Configuration Module SLES management tool

It is recommended not to install the following because they may conflict with Oracle product provided by the same service: - Simple Web Server - Authentication Server (NIS, LDAP, Kerberos) Time Zone

Set your time zone. Click Accept. A warning dialog appears. When you are ready to continue, click Yes, Install. Replace the CD according to the prompt of the installer. After installing this software, a window will appear, prompt the basic system to be successful.

Take the installation CD and click OK. The system is restarted. Enter the password of the root user and enter again to confirm. Create an account yourself. Don't create an Oracle account at this time; we will create it later. Desktop settings

Accept the default. A warning window for automatically detecting a local printer appears.

Click Skip Detection. Configure the network interface and click Next after Ready to continue.

It is recommended to set a static IP address for the server.

Building a database does not need to configure a printer, a modem, an ISDN adapter or a sound card. A graphic login screen appears. Now you need to install Service Pack 3. Log in with your own identity. Insert Update CD and click Patch CD Update. Start YaST2 (SUSE System Management Tool).

Select SUSE> SYSTEM> YAST2. (SUSE is a green circular button on the lower left of the screen. It is equivalent to "start".)

A window appears, prompt to enter the root user password. Enter the password, and then click OK.

Yast Control Center appears. The YaST Online Update window appears.

Accept the default value and click Next. A window appears to display a patch update list.

YaST needs to update itself before updating the rest of the system. The required package has been selected. Do not select any other packages at this time.

Click Accept. A window appears, prompt to restart online updates.

Click OK. A window appears, prompt installation has been successful. Click OK. In the YaST Online Update window, click Finish. In the YaST Control Center window, click Close. Repeat steps 21 and 22. A window appears to display a patch update list.

Click Accept to accept the default value.

A small popbox containing various tips (such as "make you update sendmail" may occur. Click OK to close them.

This step takes some time. Hover the cursor on the Next button. If the update is still running, a clock icon is displayed. A window appears, prompt installation has been successful.

Click OK. On your YaST Online Update screen, click Next.

Install the program write system configuration. In YaST Control Center, click Close. Log out.

SUSE> LOGOUT. Remove the update CD. Restart the system.

On the Graphics login screen, click Menu.

Choose Shutdown.

Select RESTART Computer.

Enter the root password.

Click OK. Congratulations! Your Linux software is now installed. Verify that if your installation is completed, you should have all the packages and updates required for Oracle 10g. You can perform the following steps to verify your installation. Required Nuclear Version: 2.4.21-138 (or higher) Check the core version by running the following command: uname -r

E.g:

# uname -r

K_SMP-2.4.21-138

Other version of the package (or higher):

GCC-3.2.2-38 Make-3.79 Binutils-2.12 OpenMotiF-2.2.2-124 Which versions of these packages are installed on the system, run the following command as root user: rpm -q gcc make binutils OpenMotif

E.g:

# rpm rpm -q gcc make binutils OpenMotif

GCC-3.2.2-38

MAKE-3.79.1-407

Binutils-2.12.90.0.15-50

OpenMotiF-2.2.2-124

If any package version is missing, or the version is older than the version specified above, you can download and install updates from SUSE Linux Portal.

Part 2: Configuring Linux Linux software for Oracle is now installed, you need to configure it for Oracle. This section will gradually explain the process of configuring Linux for Oracle Database 10g. Verify that the system requires that the system meets the minimum requirements of the Oracle 10G database, log in as root, and runs the following command. To see the available RAM and swap space size, run the following command: grep memtotal / proc / meminfo

GREP SWAPTOTAL / PROC / MEMINFO

E.g:

# GREP MEMTOTAL / Proc / Meminfo

Memtotal: 512236 KB

# Grep swaptotal / proc / meminfo

Swaptotal: 1574360 KB

The minimum RAM required is 512MB, while the minimum switching space required is 1GB. For systems that are less than or equal to 2GB, the switching space should be twice the number of RAMs; for the system of RAM greater than 2GB, the switching space should be one to twice the number of RAMs. Oracle 10G software also requires 2.5GB of available disk space, while the database requires a 1.2GB available disk space. The / TMP directory requires at least 400MB of available space. To check the available disk space on your system, run the following command: DF -H, for example:

# df -h

FileSystem size used avail use% mounted ON

/ DEV / SDA3 6.8G 1.3G 5.2g 20% ​​/

/ DEV / SDA1 99M 17M 77M 18% / boot

This example shows that the / TMP directory does not have its own file system. (For this guide, it is part of the root file system.) The root file system is available in 5.2 GB, except for the installation (2.5 1.2 0.4 = 4.1GB), there is still a small surplus. Create an Oracle group and a user account Next, create a Linux group and a user account for installing and maintaining Oracle 10G software. The user account will be called Oracle, and the group will be called Oinstall and DBA. Perform the following command as root user: / usr / sbin / groupadd oinstall

/ usr / sbin / groupadd dba

/ usr / sbin / useradd -m -m oinstall -g dba oracle

ID Oracle

E.g:

# / usr / sbin / groupadd oinstall

# / usr / sbin / groupadd dba

# / usr / sbin / useradd -m -g oinstall -g dba oracle

# id oracle

UID = 501 (ORACLE) GID = 501 (OINSTALL) Groups = 501 (OinsTall), 502 (DBA)

Set the password for the Oracle account: Passwd Oracle

E.g:

# Passwd Oracle

CHANGING Password for user oracle.

New Password:

Retype New Password:

Passwd: All Authentication Token Updated SuccessFully.

Create a directory now, create a directory for the storage Oracle 10g software and database files. This guide is in the best flexible structure (OFA) specification when creating a directory structure. For more information on the OFA standard, see Appendix D for the Oracle Database 10g Installation Guide for UNIX systems. The following assumptions create a directory in the root file system. This is for the sake of simplicity, it is not recommended to use it as a general practice. These directories are typically created as separate file systems. Execute the following command as root user: MKDIR -P / U01 / App / Oracle

MKDIR -P / U02 / ORADATA

Chown -r Oracle: OINSTALL / U01 / App / Oracle / U02 / ORADATA

CHMOD -R 775 / U01 / APP / ORACLE / U02 / ORADATA

E.g:

# mkdir -p / u01 / app / oracle

# MKDIR -P / U02 / ORADATA

# chown -r oracle: OINSTALL / U01 / App / Oracle / U02 / ORADATA

# chmod -r 775 / u01 / app / oracle / u02 / oradata Configuration Linux kernel parameter Linux kernel is very good. Unlike most other * NIX systems, Linux allows most of the core parameters to be modified when system startup and runtime. Do not need to restart the system after completing the kernel parameters. Oracle Database 10g requires the following kernel parameter settings. The minimum is given, so if your system is used, don't change it. 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

If you follow the instructions to install Linux, and the kernel parameters use the default value, simply log in as a root user to execute the command. CAT >> /etc/sysctl.conf << EOF

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

EOF

/ SBIN / SYSCTL -P

E.g:

# cat >> /etc/sysctl.conf << EOF

> 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

> EOF

# / sbin / sysctl -p

Net.IPv4.ip_forward = 0

Net.IPv4.conf.default.rp_filter = 1

Kernel.sysrq = 0

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

Run the following command as root user to verify your settings: / sbin / sysctl -a | grep shm

/ SBIN / SYSCTL -A | GREP SEM

/ SBIN / SYSCTL -A | GREP file-max

/ SBIN / SYSCTL -A | GREP ip_local_port_range

E.g:

# / sbin / sysctl -a | GREP SHM

Kernel.shmmni = 4096

Kernel.shmall = 2097152

Kernel.shmmax = 2147483648

Kernel.Shm-use-bigpages = 0

# / sbin / sysctl -a | grep sem

Kernel.sem = 250 32000 100 128

# / sbin / sysctl -a | grep file-maxfs.file-max = 65536

# / sbin / sysctl -a | GREP ip_local_port_range

Net.IPv4.ip_local_port_range = 1024 65000

If the system's parameter setting is smaller than the above parameter value, edit the /etc/sysctl.conf file, add or change these parameters. After completing, run the following command to activate the changes: / sbin / sysctl -p

For SLES 8, run the following command after completing the steps. / sbin / chkconfig boot.sysctl on

Setting the shell Limit Oracle suggestion for Oracle User Settings Limits to the number of processes that can be used by each Linux account. To do these changes, perform the following commands as root users: cat >> /etc/security/limits.conf << EOF

Oracle Soft NPROC 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

EOF

CAT >> /etc/pam.d/login << EOF

Session Required /LIB/Security/Pam_Limits.so

EOF

For RHEL 2.1 and RHEL 3, use the following command: cat >> / etc / profile << EOF

IF [/ $ user = "oracle"]; then

IF [/ $ shell = "/ bin / ksh"]; then

Ulimit -P 16384

Ulimit -n 65536

Else

Ulimit -u 16384-N 65536

Fi

Umask 022

Fi

EOF

CAT >> /etc/csh.login << EOF

IF (/ $ user == "oracle") THEN

Limit maxProc 16384

Limit Descriptors 65536

Umask 022

ENDIF

EOF

For SLES 8, use the following command: cat >> /etc/profile.local << EOF

IF [/ $ user = "oracle"]; then

IF [/ $ shell = "/ bin / ksh"]; then

Ulimit -P 16384

Ulimit -n 65536

Else

Ulimit -u 16384-N 65536

Fi

Umask 022

Fi

EOF

CAT >> /etc/csh.login.local << EOF

IF (/ $ user == "oracle") THEN

Limit maxProc 16384

Limit Descriptors 65536

Umask 022

ENDIF

EOF

avoid mistakes! (SLES 8 only) There is an error while installing Oracle Enterprise Manager 10g on SLES 8 - due to the required ports, the installation fails to be installed because the desired port is reserved. OEM DBCONSOLLE requires port 1830, and in the SLES8 environment, this port has been preserved for / etc / services. This error is 3513603 on Metalink. To avoid problems during the installation, log in as root user and release the line 1830 to 1849 in the / etc / service file before installing Oracle 10G software. (Note: At this point, you'd better restart the server to make sure the above changes take effect.) Oracle users' environment variables should use Oracle products, should or must set several environment variables. For database servers, it is recommended to set the following environment variables: Oracle_baseoracle_homeracle_sidPath If you have multiple Oracle products or databases on the same server, Oracle_Home, Oracle_SID, and PATH variables may change. Oracle_base variables should not be changed and set it in your login profile when needed. Oracle provides a utility called Oraenv to set other variables. Log in as Oracle and add Oracle_base to the login profile by adding in .bash_profile or .profile (Bash or KSH): Oracle_base = / u01 / app / oracle; export oracle_base or in .login (csh) Add to download: setENV ORACLE_BASE / U01 / App / Oracle

This change will take effect when you log in to an Oracle account next time. To make changes to the current session as active, simply run this command from the command line.

Part 3: Installing Oracle You can download the Oracle Database 10g from OTN. Oracle provides a free development and test license. But not supported, and this license is not allowed for production purposes. OTN provides a complete license agreement. To make the Oracle 10G issuance kit media can be used on the server, the easiest way is to download it directly to the server. Use graphic to log in to log in as Oracle. Create a directory to store Oracle 10g issuings: MKDIR 10g_db

To download the Oracle Database 10g from OTN, use the browser (Mozilla) to point to http://www.oracle.com/technology/software/products/Database/oracle10g/htdocs/linuxSoft.html. Fill in the Eligibility Export Restrictions page and read the OTN License Agreement. If you accept restrictions and license agreements, click I Accept. Click Ship.db.cpio.gz link and save the file in the directory (10G_DB) created for this purpose - if you have not logged in to OTN, you may be prompted to log in. Unzip this file: CD 10g_db

Gunzip ship.db.cpio.gz

CPIO -IDMV

Install the software to log in with an Oracle account. Specify the database name (Oracle_SID). This name is usually not more than five characters. Use DEMO1 to this. Set environment variables:

Borne Shell and Korn shelloracle_base = / u01 / app / oracle; export oracle_baseoracle_sid = demo1; export oracle_sid

C shellsetenv oracle_base / u01 / app / oracle

SetENV Oracle_sid Demo1

Change the directory to the location of Oracle 10G software to decompress. E.g:

$ cd $ home / 10g_db

Change the directory to Disk1. E.g:

$ CD Disk1

Start Oracle Universal Setup. $ ./runinstaller

welcome

Click Next. Specify inventory directory and certificate

If you have been in accordance with the steps in this guide, you can use the default. Otherwise, edit the path of the list of list to point to the correct directory.

The operating system group name should be Oinstall. If this is the first time to install Oracle on this machine, you will receive a pop-up window, prompt to run an ORAINSTROOT.SH script as root user. Log in as root user, change to the directory specified in the window, execute the script, then proceed. Specify file location

If you have been in accordance with the steps in this guide, you can use the default. Otherwise, ensure that the source path and the target path are correct before continuing operation. Select the installation type

Accept the default Enterprise Edition. Prerequisites related to specific products

If you have been in accordance with the steps in this guide, all inspections should pass smoothly. If one or more check fails, correct the problem before proceeding. Select database configuration

Accept the default Create a Starter Database and General Purpose. Specify database configuration options

Enter the global database name of the database. This name should contain Oracle_SID and server domain names (for example, demo1.orademo.org, where Demo1 is Oracle_SID, ORADEMO.ORG is a domain name).

When you enter the global database name, the SID box will automatically populate.

Accept the default database character set.

Select Create Database with Sample Schemas. Select Database Management Options

Select Use Database Control for Database Management. Specify database file storage options

Select File System and enter the path name to use in the database file (in this case / u02 / oradata). Specify backup and recovery options

Select DO NOT Enable Automated Backups. Specify database mode password

Select Use The Same Password for All the Accounts.

Select a password and enter twice to confirm. Summary

Displays a summary of the installed product.

Click Install. installation

This screen has been installed and links several phases of Oracle software.

A window displays configuration information at the end of the installation process. Make a note of the Enterprise Manager URL and click OK to close the window.

A "setup privileges" window is popped, prompts to run the configuration script as root user. Log in as root user, switch to the directory indicated in this window, and then execute the root.sh script. This script prompts to enter the location of the local bin directory. Press the ENTER key to accept the default. When the script is complete, return to the Setup Privileges window and click OK. (As follows.)

End of installation

Make a note of the URL shown in the summary and click Exit when you are ready. Congratulations! Your new Oracle 10G database has been started and can be used. Part 4: Configuring Storage We use a single file system (/ U02 / ORADATA) to use a single file system (/ U02 / ORADATA). But there are many ways to configure storage for Oracle databases. Part 4 describes other methods for configuring disk storage for this database. In particular, it describes how to create additional file systems and how to use Auto Storage Management (ASM). How to use the original device and Oracle Cluster File System (OCFS) will introduce in another article in this series, this article describes how to create a cluster database using the Oracle Real Application Cluster (RAC). The file system file system is the most commonly used method for Oracle data fix data files, redo logs, and control files. The file system is easy to implement and does not require third-party software to manage. In most cases, the file system is created during the initial installation of Linux. But sometimes you must create a new file system after initial installation (such as after installing a new disk drive). This section describes how to build a new file system and how to use it in the Oracle database. Unless otherwise stated, all commands must be run as root user. Partitioning to disk must use an empty disk partition to create a file system. If there is an empty available disk partition, jump to the next step. The following is an example of creating a new partition for a Linux file system. (Warning: Error partitioning to disk is one of the most reliable and fastest ways to delete all content on the hard disk. If you are not sure how to partition, please stop, find someone to help you, otherwise you will risk the danger of data. This example uses / dev / sdb (an empty SCSI disk without partition) to create a single partition throughout the disk (36 GB). E.g:

# fdisk / dev / sdb

Device Contains Neither a Valid Dos Partition Table, Nor Sun, SGI OR OSF Disklabel

Building a new dos disklabel.changes will remain in membrate only,

Until You Decide to Write Them.After That, of Course, The Previous

Content Won't Be Recoverable.

The Number of Cylinders for this disk is set to 4427.

There Is Nothing Wrong with That, But this is larger Than 1024,

And CALD 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 od

(E.G., DOS FDISK, OS / 2 fdisk)

Command (M for Help): P

Disk / dev / sdb: 255 Heads, 63 Sectors, 4427 Cylinders

Units = cylinders of 16065 * 512 BYTES

Device Boot Start End Blocks ID SYSTEM

Command (M for Help): N

Command action

e extended

p Primary Partition (1-4)

p

Partition Number (1-4): 1

First Cylinder (1-4427, default 1):

USING Default Value 1

Last Cylinder OR SIZE OR SIZEM OR SIZEK (1-4427, Default 4427):

USING Default Value 4427

Command (M for Help): w

The partition Table Has Been Altered!

Calling ioctl () to re-read partition table.

WARNING: if you have created or modified any dos 6.x

Partitions, please see the fdisk manual page for additional

Information.

Syncing disks.

Now verify the new partition: for example:

# fdisk / dev / sdb

The Number of Cylinders for this disk is set to 4427.

There Is Nothing Wrong with That, But this is larger Than 1024,

And CALD 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 od

(E.G., DOS FDISK, OS / 2 fdisk)

Command (M for Help): P

Disk / dev / sdb: 255 Heads, 63 Sectors, 4427 Cylinders

Units = cylinders of 16065 * 512 BYTES

Device Boot Start End Blocks ID SYSTEM

/ DEV / SDB1 1 4427 35559846 83 Linux

Command (M for Help): Q

Creating a file system uses EXT3 to create this new file system. Other file systems can also be used, but EXT3 provides the fastest recovery when the system crashes. E.g:

# MKE2FS -J / DEV / SDB1

MKE2FS 1.26 (3-Feb-2002)

FileSystem label =

OS Type: Linux

Block size = 4096 (log = 2)

FRAGMENT SIZE = 4096 (LOG = 2)

4447744 Inodes, 8889961 Blocks

444498 Blocks (5.00%) reserved for the super user

First Data Block = 0

272 Block Groups

32768 Blocks Per Group, 32768 Fragments Per Group

16352 inodes per group

Superblock Backups Stored On Blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,

2654208, 4096000, 7962624

Writing Inode Tables: DONE

Creating Journal (8192 BLOCks): DONE

Writing Superblocks and FileSystem Accounting Information: DONE

This File consisted.

Creating a mount point file system must have a mount point, it is just an empty directory, the new file system is here "connected" with the system directory tree. Naming of mount points should follow the Oracle Flexible Structure (OFA) standard. For more information on the OFA standard, see Appendix D of the Oracle 10G Database Installation Guide. Since you have used the / U01 and / U02 directory names in Part 1, use / u03 in this example. E.g:

# MKDIR / U03

Add a new file system to / etc / fstab So the new file system will automatically mount when the system is started, you need to add a line to the / etc / fstab file description new file system and its installation location. Use the text editor to add a line as shown below to / etc / fstab. / DEV / SDB1 / U03 EXT3 Defaults 1 1

Mounting a new file system file system can be used after mount. Only the file system is mounted to store the file. Use the following command to mount the file system and verify that it is available. Mount / U03

DF -H / U03

E.g:

# mount / u03

# df -h / u03

FileSystem size used avail use% mounted ON

/ DEV / SDB1 33G 33M 31G 1% / U03

Create an Oracle directory and set permissions now, create a directory for storing Oracle files. The directory name used in this example follows the OFA standard naming convention in the database, ie Oracle_SID = DEMO1. MKDIR -P / U03 / ORADATA / DEMO1

Chown -r Oracle: OINSTALL / U03 / ORADATA

CHMOD -R 775 / U03 / ORADATA

Creating a new table space in the new file system New file system is already available. Next, create a new table space for storing the database object in the file system. Connect to the database as a System user, then execute the CREATE TABLESPACE statement and specify a data file in the new file system. E.g:

$ SQLPLUS

SQL * Plus: Release 10.1.0.2.0 - Production on Sun Jun 13 15:01:08 2004

Copyright (C) 1982, 2004, Oracle.all Rights Reserved.

ENTER User-name: system

ENTER Password:

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production

With the partitioning, Olap and Data Mining Options

SQL> CREATE TABLESPACE DATA1

2 DataFile '/u03/oradata/demo1/data1_01.dbf' size 100m

3 Extent Management Local

4 Segment Space Management Auto;

TableSpace created.

Now you can use this new table space to store database objects, such as tables and indexes. E.g:

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) I left the most important content in the end. ASM is a very good new feature in Oracle Database 10g, which provides services such as file system, logical volume manager, and software RAID in a platform-independent way. ASM can strip and mirror disks, thereby implementing adding or removing disks and automatic balancing I / O to delete "hotspots" in the case where the database is loaded. It also supports direct and asynchronous I / O and use Oracle Data Manager APIs introduced in Oracle9i (Simplified I / O System Call Interface). ASM is not a universal file system and can only be used for Oracle data files, redo logs, and control files. The files in the ASM can be created and named by the database (by using Oracle Manage File Features), can also be manually created and named by DBA. Since the operating system cannot access files stored in the ASM, the only way to perform backup and recovery operations for databases using ASM files is to pass the Recovery Manager (RMAN). Asm implemented as a separate Oracle instance, only it can access it at runtime. On Linux, only the OCSSD service is run (installed by the Oracle Universal Setup) to use ASM. There are not many memory required for ASM: for most systems, only 64 MB. Installing ASM On the Linux platform, ASM can use the original device or managed by the ASMLIB interface. Oracle recommends using ASMLIB on the original devices for easy-to-use and performance reasons. Asmlib can now download from OTN. This section gradually explains the use of ASMLIB to configure a simple ASM instance and build a database of a database that uses ASM to store. Determine the required ASMLIB version ASMLIB is provided with a package set consisting of three Linux packages:

OracleAsMlib - ASM Library OracleAsm-Support - Used Utility OracleAsm - ASM library's kernel modules have their own ASMLIB package sets. In each release suite, each kernel version has a corresponding OracleAsM package. The following sections describe how to determine the desired package set. First, log in as a root user and run the following command to determine the kernel used: uname -rm

E.g:

# uname -rm

2.4.9-E.27SMP i686

This example shows that this is a 2.4.9 kernel using the Intel i686 CPU's SMP (multiprocessor) system. Use this information to find the appropriate ASMLIB package on OTN:

Point a web browser to http://www.oracle.com/global/cn/technology/tech/linux/ASMLIB Select the link for your Linux version. Downloading OracleAsMlib and OracleAsm-Support packages for your Linux version Download OracleAsM package corresponding to your kernel. For the above example, OracleAsM-2.4.9-E-SMP-1.0.0-1.i686.rpm package is downloaded. Next, the package is installed by performing the following command as a root user: rpm -uveliasm-kernel_version-asmlib_version.cpu_type.rpm /

OracleAsMlib-asmlib_version.cpu_type.rpm /

Oracleasm-support-asmlib_version.cpu_type.rpm, for example:

# rpm -uvh /

> OracleAsM-2.4.9-E-SMP-1.0.0-1.i686.rpm /

> OracleAsMlib-1.0.0-1.i386.rpm /

> Oracleasm-Support-1.0.0-1.i386.rpm

Preparing ... ###########################################

1: OracleAsm-support ############################ [33%]

2: OracleAsm-2.4.9-e-SMP ################################################## ]

Linking Module OracleAsm.o Into The Module Path [OK]

3: OracleAsMlib ############################> before configuring the ASMLIB before using ASMLIB Run the configuration script to prepare the driver. Run the following command as root user and respond to the prompts shown in the following example. # /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 value

Will Be Shown in Brackets ('[]'). Hitting 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 ORACLE ASM Disks on Boot (Y / N) [Y]: Y

Writing Oracle ASM Library Driver Configuration [OK]

Creating / dev / oracleasm mount point [ok]

Loading Module "Oracleasm" [OK]

Mounting Asmlib Driver FileSystem [OK]

Scanning System for ASM Disks [OK]

The ASMLIB driver is now enabled as shown below. # /etc/init.d/oracleasm enable

Writing Oracle ASM Library Driver Configuration [OK]

Scanning System for ASM Disks [OK] Configure Disk for ASM Next, tell the ASM driver you want to use. Note that these disks are empty disks that do not contain any content (or even partition). You can use disk partition for ASM, but you recommend that you don't do this. Tag Disk Used by ASMLIB by running the following command as a root user: /etc/init.d/oracleasm createdisk disk_name device_name

(Tip: Disk_name should be composed of uppercase letters. The current version has an error, that is, if a lowercase letter is used, the ASM instance will not be able to identify the disk.) For example:

# /etc/init.d/oracleasm createDisk VOL1 / DEV / SDB

Marking Disk "/ dev / sdb" as an asm disk [ok]

# /etc/init.d/oracleasm createDisk Vol2 / dev / sdc

Marking Disk "/ dev / sdc" as an asm disk [ok]

# /etc/init.d/oracleasm createDisk Vol3 / DEV / SDD

Marking Disk "/ dev / sdd" as an asm disk [ok]

# /etc/init.d/oracleasm createDisk Vol4 / DEV / SDF

Marking Disk "/ dev / sdf" as an asm disk [ok]

# /etc/init.d/oracleasm createDisk Vol5 / DEV / SDG

Marking Disk "/ dev / sdg" as an asm disk [ok]

# /etc/init.d/oracleasm createDisk VOL6 / DEV / SDH

Marking Disk "/ dev / sdh" as an asm disk [ok]

The following example demonstrates how to list all disks marked as used by ASMLIB. # /etc/init.d/oracleasm listdisks

Vol1

Vol2

Vol3

Vol4

Vol5

Vol6

Since the ASMLIB has been installed, the disk is marked as available, below, you can create an ASM instance and build a database that uses ASM to store. The easiest way is to use the Database Configuration Assistant (DBCA) to do this. Log in as Oracle and start DBCA: $ dbca

welcome

Click Next. operating

Select CREATE A DATABASE. Database template

Select General Purpose. Database logo

Enter the global database name. Management option

Select Configure The Database with Enterprise Manager.

Select Use Database Control for Database Management. Database certificate

Select Use Same Password for All Accounts.

Enter the password and confirm. Storage option

Select Automatic Storage Management (ASM). Create an ASM instance

Enter the password of the ASM instance and confirm. Pop up a window, prompt DBCA to create and launch an ASM instance immediately. Click OK. A gear box window pops up when you create an ASM instance. ASM disk group

Since this is a new ASM instance and you have not created any ASM instance, the window does not display the available disk group.

Click Create New. Create a disk group

Disk Group Name - Enter disk group name, such as DATA1.

Redundant - High image data twice. - Normal image data. - External is not mirror data in ASM. This option is usually used if the external RAID array provides redundancy. Select a member disk - you must manually indicate the ASM to find the ASMLIB disk, so click Change Disk Discovery Path- pop up a window, prompt to enter the disk discovery path. Change the disk discovery path as shown below to "ORCL: *". - Click OK to continue.

You will return to the SELECT MEMBER Disks window. All of your ASMLIB disks should now be displayed in this window. Click the box starting in this line, select the disk that is added to the disk group. Click OK after completion.

ASM disk group

You will return to the ASM DISK Groups window. At this point, the disk group created in the previous step appears.

Select this disk group when you click on the end. (Use a single disk group in this example.)

Click Next. Database file location

Select Use Oracle-Managed Files.

Make sure Database Area is set to your disk group you created. It contains a leading plus number - for example, Data1. Recovery configuration

Select Specify Flash Recovery Area. - Quick Recovery Zone - Enter the ASM disk group you want to quickly recover. - Fast recovery zone size - accepts the default value 2048.

If you want to use an archive log mode, select Enable Archiving. For the evaluation database, you can not choose this. Database content

Select Sample Schemas.

We don't use custom scripts, so click Next. Initialization parameters

Accept the default value and click Next. Database storage

Accept the default value and click Next. Create an option

Select CREATE DATABASE (the default) and click Finish. confirm

After checking the database details, click OK. DBCA displays an operation list and a progress bar. Depending on the hardware, the database creation may take a few minutes to hours. When the database creation is complete, a display summary window is displayed. Make a note of Enterprise Manager URL and click Exit.

Conclusion Now, your database has been started and run, and you can start using many new features available in Oracle 10G. It is best to start using Oracle Enterprise Manager, because it is thoroughly rewritten, using a web-based interface. If you are not sure where, Oracle Concept Guide and DBA Second Day Express Guide will help you familiarize yourself with the new database. OTN also offers articles designed to help you take full use of 10G. My favorite is a series of articles written by Arup Nanda, "Oracle Database 10g: 20 of the 20 most important features provided by DBA." In the next article, we will gradually explain how to install and configure a fully fully equipped two-node Oracle RAC 10G database.

Appendix uses SQL * Plus access to the database to LINUX as Oracle. Set the environment. Set Oracle Environment Variables: $ export oracle_base = / u01 / app / oracle

$ export oracle_sid = DEMO1

$ export oracle_home = $ oracle_base / product / 10.1.0 / db_1 $ export path = $ PATH: $ oracle_home / bin

Run SQL * Plus: $ SQLPLUS

SQL * Plus: Release 10.1.0.2.0 - Production on sat Jun 5 16:59:21 2004

Copyright (C) 1982, 2004, Oracle.all Rights Reserved.

ENTER User-name: / as sysdba

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production

With the partitioning, Olap and Data Mining Options

SQL>

Using Oracle Enterprise Manager 10g database Control In a web browser, connect to the URL provided during the installation process. For example: http: //ds1.orademo.org: 5500 / em (If the server is not in DNS, you must use the IP address instead of the host name.) Username: SYS password: Click < Login>. Enter the SQL command in the Workspace box, and then click Execute.

Start and stop ISQL * Plus: $ isqlplusctl Start

$ Isqlplusctl Stop

Start and stop the listener: The listener accepts the client's connection request and creates a database connection after verifying the certificate. To use OEM or ISQL * Plus, you must first start the listener. $ LSNRCTL START

$ LSNRCTL STOP

Start and stop the database: The easiest way to start and stop the database is to start and stop from the OEM console. To do this from the command line, use SQL * Plus as shown in Oracle as follows: Start: $ SQLPLUS

SQL * Plus: Release 10.1.0.2.0 - Production on sun jun 13 22:27:48 2004

Copyright (C) 1982, 2004, Oracle.all Rights Reserved.

ENTER User-name: / as sysdba

Connected to an iDLE Instance.

SQL> Startup

Oracle Instance Started.Total System Global Area 188743680 Bytes

Fixed Size 778036 bytes

Variable size 162275532 bytes

Database buffers 25165824 BYTES

Redo buffers 524288 BYTES

Database mounted.

Database opened.

SQL> EXIT

Shutdown: $ SQLPLUS

SQL * Plus: Release 10.1.0.2.0 - Production on Sun Jun 13 22:25:55 2004

Copyright (C) 1982, 2004, Oracle.all Rights Reserved.

ENTER User-name: / as sysdba

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production

With the partitioning, Olap and Data Mining Options

SQL> Shutdown Immediate

Database closed.

Database dismount.

Oracle Instance Shut Down.

SQL> EXIT

List Oracle processes: $ PS A € "Fuoracle

What is an OCSSD.BIN process? Oracle Cluster Synchronization Services (OCSSD) is a component of Oracle Cluster Ready Services (CRS) for RAC and a single instance database using ASM. It is installed by default, using few system resources, and configures in / etc / inittab. These processes are automatically launched each time the system starts. Oracle recommends do not disable OCSSD, even if you don't run ASM.

John Smiley (Smileyj@tusc.com) is a technical management consultant for TUSC INC. As a DBA, developers and project managers, he has 18 years of experience in Oracle system. He specializes in advanced performance adjustments, Oracle real application clusters, PL / SQL programming, capacity planning, and logical and physical database designs related to UNIX.