RedHat 5 Oracle10g Installation

Source: Internet
Author: User

1Basic Requirements for oracle Installation

1.1, Operating System Selection

1.2Hardware requirements

The minimum memory size specified by Oracle Database is 512 MB. If it is not reached, various warnings will appear during installation. the recommended size is 1024 MB and the hard disk size is 40 GB.

1.2Operating System Disk Space Requirements

/Boot partition: 150 M

/Home partition: 10 GB

Swap partition: 2.5 GB (it is recommended that it be 1.5 times the memory or 2 GB, depending on the specific situation)

/Root partition: 20 GB

/Tmp temporary partition: About MB

Oracle software requires 1.5 GB

The Database requires 1.5 GB.

2Pre-Installation

2.1Disable firewall and Selinux

2.1.1,Firewall

1) takes effect after restart

Enable: chkconfig iptables on

Close: chkconfig iptables off

2) takes effect immediately and becomes invalid after restart

Enable: service iptables start

Disable: service iptables stop

2.1.2,SELinux

1) Method 1:

[Root @ czjie ~] # Vi/etc/selinux/config

# Setting: SELINUX = disabled, and then reboot to restart the system

2) Method 2:

Gui: Run system-config-securitylevel on the linux terminal to check whether the firewall and Selinux are disabled or run setup on the terminal. You can also disable firewall and Selinux. Remember to restart after the firewall is disabled.

2.2Set the hosts file and/etc/sysconfig/network

[Root @ czjie ~] # Vi/etc/hosts

# Enter the following content

192.168.1.106 czjie

[Root @ czjie ~] # Vi/etc/sysconfig/network

# Change HOSTNAME to HOSTNAME = czjie

2.3Check whether necessary software packages are installed

1) check whether the following software packages are installed:

[Root @ czjie ~] # Cd/media/Enterprise \ Linux \ dvd \ 20090908/Server/

[Root @ czjie Server] #

Rpm-Uvh make-3.81-3.el5.i386.rpm

Rpm-Uvh gcc-4.1.2-46.el5.i386.rpm

Rpm-Uvh glibc-2.5-42.i386.rpm

Rpm-Uvh compat-db-4.2.52-5.1.i386.rpm

Rpm-Uvh compat-gcc-34-3.4.6-4.i386.rpm

Rpm-Uvh compat-gcc-34-c + +-3.4.6-4. i386.rpm

Rpm-Uvh compat-libstdc ++-296-2.96-138.i386.rpm

Rpm-Uvh compat-libstdc ++-33-3.2.3-61.i386.rpm

Rpm-Uvh libXpm-3.5.5-3.i386.rpm

Rpm-Uvh libXp-1.0.0-8.1.el5.i386.rpm

Rpm-Uvh openmotif22-2.2.3-18.i386.rpm

Rpm-Uvh setarch-2.0-1.1.i386.rpm

2) Check Method:

[Root @ czjie Server] # rpm-q gcc make binutils openmotif setarch compat-db compat-gcc-c ++ compat-libstdc ++-devel libXp

# The list still shows some uninstalled items. You can skip this step. The specific cause is unknown.

Gcc-4.1.2-46.el5

Make-3.81-3.el5

Binutils-2.17.50.0.6-12.el5

Package openmotif is not installed

Setarch-2.0-1.1

Compat-db-4.2.52-5.1

Package compat-gcc is not installed

Package compat-gcc-c ++ is not installed

Package compat-libstdc ++ is not installed

Package compat-libstdc ++-devel is not installed

Package libXp is not installed

2.4, Configuration file modification (/etc/sysctl. conf)

[Root @ czjie ~] # Vi/etc/sysctl. conf

# Add the following lines:

# Kernel. shmall = 2097152

# Kernel. shmmax = 2147483648

Kernel. shmmni = 4096

# Semaphores: semmsl, semmns, semopm, semmni

Kernel. sem = 250 32000 100 128

# Fs. file-max = 65536

Net. ipv4.ip _ local_port_range = 1024 65000

Net. core. rmem_default = 262144

Net. core. rmem_max = 262144

Net. core. wmem_default = 262144

Net. core. wmen_max = 262144

2.5,Execute the following statement to make the configuration take effect

[Root @ czjie ~] #/Sbin/sysctl-p

2.6Edit the/etc/security/limits. conf file

[Root @ czjie ~] # Vi/etc/security/limits. conf

# Edit the/etc/security/limits. conf file and add the following lines at the same time:

* Soft nproc 2047

* Hard nproc 16384

* Soft nofile 1024

* Hard nofile 65536

2.7Edit the/etc/pam. d/login file

1) edit the/etc/pam. d/login file

[Root @ czjie ~] # Vi/etc/pam. d/login

# Add the following lines:

Session required/lib/security/pam_limits.so

2.8Create a user, group, and configuration and installation directory for Oracle Installation

[Root @ czjie ~] # Groupadd oinstall

[Root @ czjie ~] # Groupadd dba

[Root @ czjie ~] # Useradd-d/home/oracle-g oinstall-G dba oracle

[Root @ czjie ~] # Passwd oracle

Changing password for user oracle.

New UNIX password:

Bad password: it does not contain enough DIFFERENT characters

Retype new UNIX password:

Passwd: all authentication tokens updated successfully.

2.9Create an Oracle Installation Directory

[Root @ czjie ~] # Mkdir/opt/ora10g

[Root @ czjie ~] # Chown oracle. oinstall/opt/ora10g

2.10Set the. bash_profile file for the Oracle user

The installation directory must be changed during oracle Installation. Therefore, the ORACLE_HOME file does not exist. Therefore, set the sid, home, and base files of oracle.

[Root @ czjie ~] # Vi/home/oracle/. bash_profile

# Add the following content:

# Oracle Settings

Export TMP =/tmp;

Export TMPDIR = $ TMP;

Export ORACLE_BASE =/opt/ora10g;

Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1;

Export ORACLE_SID = ORCL;

Export ORACLE_TERM = xterm;

Export PATH =/usr/sbin: $ PATH;

Export PATH = $ ORACLE_HOME/bin: $ PATH;

Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib;

Export CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib;

If [$ USER = "oracle"]; then

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

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

The check command is as follows:

# Source. bash_profile

2.11Copy the Oracle Installation File and decompress it to the specified file.

1) There are many ways to copy Oracle installation files to the system. You can use ftp server and samba server. Here, you can use the original method to copy the files through a USB flash disk or a mobile hard disk.

[Oracle @ czjie ~] $ Unzip 10201_database_linux32.zip

2) After decompression, a database folder is displayed, which contains the Oracle Installation File, as shown in:

2.12About Oracle version

Because the Redhat kernel inse linux 5.4 does not support Oracle 10 Gb by default, You need to modify the version information.

Method 1:

When executing the installation command, add the parameter ignoreSysPreReqs to skip Oracle version verification, for example:

[Oracle @ czjie database] $./runInstaller-ignoreSysPreReqs

Method 2:

Edit the/etc/redhat-release file and make the following changes:

Modify RedHat Enterprise Linux Server release 5.1 (Tikanga) to RedHat Enterprise Linux Server release 4 (Tikanga)

Method 3Edit # vi install/oraparam. ini
Add redhat-5 in the Certified Versions Section
# [Certified Versions]
Linux = redhat-3, SuSE-9, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1]
Add more
Linux-redhat-5.0-optional
TEMP_SPACE = 80
SWAP_SPACE = 150
MIN_DISPLAY_COLORS = 256

Note: After installing oracle, remember to change the version back. To avoid the trouble, we recommend that you use the first method.

3,OracleDatabase Installation

3.1 Log On As an Oracle user, switch to the database directory, and switch to the running file directory:

[Oracle @ czjie ~] $ Cd database/

# Change the language environment to English to avoid Chinese garbled characters:

[Oracle @ czjie database] $ export LANG = C; export LC_ALL = C

[Oracle @ czjie database] $./runInstaller-ignoreSysPreReqs

3.2 run the preceding command and enter the following interface:

Here, select Advanced installation, that is, Advanced installation:

3.3 set the correct installation path:

3.4 select the Enterprise version for installation:

3.5 set the correct installation path:

3.6. Check the environment of the OUI Installer. In addition to the faild, you can check the following items:

3.7 select to create a database:

3.8 select General Perpose to continue:

3.9 enter the correct database user name and SID:

It indicates that the Oracle database is being installed:

Note: If the two commands appear, enter these two commands under the root user, and then click OK. Otherwise, an error occurs.

[Oracle @ czjie ~] $ Su root

[Root @ czjie oracle] # sh/opt/ora10g/oraInventory/orainstRoot. sh

Changing permissions of/opt/ora10g/oraInventory to 770.

Changing groupname of/opt/ora10g/oraInventory to oinstall.

The execution of the script is complete

[Root @ czjie oracle] # sh/opt/ora10g/product/10.2.0/db_1/root. sh

Running Oracle10 root. sh script...

The following environment variables are set:

ORACLE_OWNER = oracle

ORACLE_HOME =/opt/ora10g/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

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

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

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

Creating/etc/oratab file...

Entries will be added to the/etc/oratab file as needed

Database Configuration Assistant when a database is created

Finished running generic part of root. sh script.

Now product-specific root actions will be saved med.

After the database installation is complete, click exit to exit the database installation:

4To test whether the Oracle database is successfully installed.

4.1, Test and start the database

Log on with an Oracle user and enter sqlplus "/as sysdba" and startup under the terminal to enable the database, as shown in:

The above startup command is used to enable the database. Of course, it is also disabled.

Showdown: Shut down. Wait until each user exits the system or closes the database after cancellation.

Shutdown transactional: transaction-based Shutdown. Wait for each user to submit or roll back to the current user. Then, oracle cancels the dialog and closes all users when they exit the system.

Shutdown immediate: Close the program directly, cancel all user conversations (prompting for rejection), and run the program normally.

Shutdown abort: Stop Shutdown. When the database is shut down, there is no automatic checkpoint or log switch.

4.2Remote database management

Start em of oracle to remotely log on to emctl start dbconsole and close the command emctl stop dbconsole.

And check the dbconsole status Command emctl status dbconsole

[Oracle @ czjie ~] $ Emctl start dbconsole

[Oracle @ czjie ~] $ Emctl stop dbconsole

[Oracle @ czjie ~] $ Emctl status dbconsole

[Oracle @ czjie ~] $ Emctl start dbconsole

TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0

Copyright (c) 1996,200 5 Oracle Corporation. All rights reserved.

Http: // czjie: 1158/em/console/aboutApplication

-An instance of Oracle Enterprise Manager 10g Database Control is already running.

Note that this process is quite long.
Then run the lsnrctl start command to enable the oracle listener.

The database has been successfully installed.

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.