CentOS5.5 command line installation Oracle10G

Source: Internet
Author: User
Rpm-qabinutilscompat-dbcontrol-centergccgcc-c ++ glibcglibc-commonlibstdc ++ libstdc ++-develmakelibaiolibXp2.

Rpm-qa binutils compat-db control-center gcc-c ++ glibc-common libstdc ++-devel make libaio libXp 2.

Generally, commands are executed as Oracle.

1. Verify that the system dependency package required by Oracle is complete.

Rpm-qa binutils compat-db control-center gcc-c ++ glibc-common libstdc ++-devel make libaio libXp

2. Verify System Requirements

The minimum RAM required by Oracle is 512 MB, and the minimum swap space required is 1 GB. For systems with RAM less than or equal to 2 GB, the swap space should be twice the number of RAM; for systems with RAM greater than 2 GB, the swap space should be one to two times the number of RAM. Oracle 10 GB software also requires 2.5 GB of available disk space, while the database requires an additional 1.2 GB of available disk space. The/tmp directory requires at least 400 MB of available space.

3. Create an Oracle user group and user

Create user groups oinstall and dba.

Create the oracle user group, which belongs to the oinstall and dba user groups, and create the oracle home Directory.

Modify the logon password of an oracle user.

$ Su-root

# Groupadd dba // Database System Management Group

# Groupadd oinstall // Group of the Oracle file owner

# Useradd-g oinstall-G dba-m-s/bin/bash oracle

# Passwd oracle

# Chown-R oracle. oinstall/home/oracle

4. Configure Kernel Parameters

# Vi/etc/sysctl. conf

Edit the/etc/sysctl. conf file and modify the following items. If not, add them by yourself.

Kernel. shmall = 2097152 # total available shared memory.

Kernel. shmmax = 2147483648 # maximum size of shared memory segments.

Kernel. shmmni = 4096 # maximum number of shared memory segments of the entire system.

Kernel. sem = 250 32000 100 128 # maximum number of signal objects in each signal object set; Maximum number of signal objects in the system range; Maximum number of operations supported by each signal object; the maximum number of signal objects in the system range.

Fs. file-max = 65536 # maximum number of file handles allowed in the system.

Net. ipv4.ip _ local_port_range = 1024 65000 # IPv4 port range available for applications.

Net. core. rmem_default = 1048576 # default value of the socket receiving buffer size

Net. core. rmem_max = 1048576 # maximum size of the socket receiving buffer

Net. core. wmem_default = 262144 # default value of the socket sending buffer size

Net. core. wmem_max = 262144 # maximum size of the socket sending Buffer

5. decompress the Installation File

Unzip 10201_database_linux32.zip

6. Modify gennttab

Decompress filegroup6.jar.

Cd database/stage/Components/oracle. network. rsf/10.2.0.1.0/1/DataFiles/

Unzip filegroup6.jar bin/gennttab

Modify the extracted gennttab file.

Vi bin/gennttab

Changed:

Change "\" next to "s // \" to "n", and delete spaces after "n". Otherwise, an error will be reported when installing the listener.

Add gennttab to filegroup6.jar.

Zip-vu filegroup6.jar bin/gennttab

7. We recommend that you set limits on the number of processes that can be used and the number of opened files for each Linux Account.

To make these changes, run the following command as the root user:

Vi/etc/security/limits. conf

Add the following content:

Oracle soft nproc 2047

Hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

8. Set Environment Variables

Log On As an oracle user.

Vi ~ /. Bash_profile

Add the following content:

Export TMP =/tmp

Export TMPDIR =/tmp

Export ORACLE_BASE =/home/oracle

Export ORACLE_SID = ora10g

Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0.1/db_1

Export PATH = $ PATH: $ ORACLE_HOME/bin

9. Modify the enterprise. rsp file. Find/database/response/enterprise. rsp in the oracle installation directory.

ORACLE_HOME = "/home/oracle/product/10.2.0.1/db_1"

ORACLE_HOME_NAME = "Oracle10g"

S_nameForDBAGrp = "dba"

S_nameForOPERGrp = "dba"

N_configurationOption = 3

Note:

The Home Directory of the ORACLE_HOME Oracle server must be an absolute path.

The name of the ORACLE_HOME_NAME Oracle Server, which must start with a letter.

S_nameForDBAGrp is the linux User Group name used for Oracle System Management. Users in this group have the permission to manage Oracle servers.

S_nameForOPERGrp is the name of the linux User Group used for routine Oracle database operations. Users in this group have the permissions to perform routine Oracle database operations.

N_configurationOption installation type (1 is to create a database after installation, 2 is to create an Automatic Storage Management instance after installation, 3 is to install only the server software ).

10. Modify the OS release version

Since oracle has not released an installation package that supports CentOS, You need to modify the release version to check whether the release version file is located in/etc/RedHat-release.

Run CentOS release 5 (Final)

Modify

Red Hat Enterprise Linux AS release 3 (Taroon)

After the installation is complete, change it back.

11. Disable SELINUX Working Mode

The SELINUX attribute configuration file is located at/etc/selinux/config.

# Set SELINUX to disabled

SELINUX = disabled

12. Start Installation

./RunInstaller-ignoreSysPrereqs-silent-responseFile/home/oracle/database/response/enterprise. rsp

Note:

IgnoreSysPrereqs allows Oracle to ignore system checks. Because Oracle officially declares that only Linux Server products are supported, this parameter must be specified for installation on non-Server Linux products.

Silent allows the installer to run in silent mode.

ResponseFile specifies a response file.

Note: If the ORACLE_HOME and ORACLE_BASE directories are located in the same location, or the ORACLE_HOME directory is not empty, the following error occurs:

SEVERE: OUI-10029: You have specified a non-empty directory to install this product. it is recommended to specify either an empty or a non-existent directory. you may, however, choose to ignore this message if the directory contains Operating System generated files or subdirectories like lost + found.

If you still want to install with the current configuration, add the-force parameter during installation to force installation.

13. oracle system initialization

Run $ ORACLE_HOME/root. sh as the root administrator to initialize the Oracle system. Generally, you only need to use the default value for returning the vehicle.

14. Install the network listener

Edit the netca. rsp response file in the oracle installation directory at/database/response/netca. rsp. Check the following parameter configurations:

INSTALL_TYPE = "" custom "" installation type

LISTENER_NUMBER = 1 listener count

LISTENER_NAMES = {"LISTENER"} LISTENER Name List

LISTENER_PROTOCOLS = {"TCP; 1521"} communication protocol list used by the listener

LISTENER_START = "" LISTENER "" LISTENER startup name

Run the installation command:

$ ORACLE_HOME/bin/netca/silent/responseFile/home/oracle/database/response/netca. rsp

Note: Here there may be errors where the software packages required by oracle are incomplete. Make sure that all software packages are correctly installed Based on the software packages listed in 1 (2) 6. The modification to the gennttab file is incorrect, this error is caused by the absence of spaces after n.

15. Modify dbstart

Vi $ ORACLE_HOME/bin/dbstart

ORACLE_HOME_LISTNER =/ade/vikrkuma_new/oracle

Changed:

ORACLE_HOME_LISTNER = $ ORACLE_HOME

Make sure that the network listener starts at the same time when the database is started.

16. Install a database instance

Edit the dbca. rsp response file under the response directory of the Oracle Installation source folder:

Vi/home/oracle/database/response/dbca. rsp

Modify the following parameters as needed:

GDBNAME = "orcl10g" # Global Database Name

SID = "ora" # Database SID

SYSPASSWORD = "sys" # SYS user's initial password

SYSTEMPASSWORD = "sys" # SYSTEM user's initial password

CHARACTERSET = "ZHS16GBK" # database character set (Chinese: ZHS16GBK)

NATIONALCHARACTERSET = "ZHS16GBK" # database country Character Set

Run the installation command:

$ ORACLE_HOME/bin/dbca-silent-responseFile/home/oracle/database/response/dbca. rsp-cloneTemplate

After the database is created successfully, you need to modify the following information:

Vi/etc/oratab

Ora10g:/opt/oracle/product/10.2.0.1/db_1: N

Changed:

Ora10g:/opt/oracle/product/10.2.0.1/db_1: Y

Ensure that the database instance can be started automatically.

17. Start the database instance

$ ORACLE_HOME/bin/dbstart

18. Test

Sqlplus "/as sysdba"

19. Configure the EM database. Both the database and the listener must be started and work properly.

Configure dbcontrol

[Oracle @ oracle10 ~] $ Emca-config dbcontrol db

Started emca at Oct 27,200 7 9:33:48 AM

EM Configuration Assistant, Version 10.2.0.1.0 Production

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

Enter the following information:

Database SID: orcl

Database Control is already configured for the database orcl

You have chosen to configure Database Control for managing the database orcl

This will remove the existing configuration and the default settings and perform a fresh configuration

Do you wish to continue? [Yes (Y)/no (N)]: Y

Listener port number: 1521

Password for SYS user:

Password for DBSNMP user:

Password for SYSMAN user:

Email address for communications (optional ):

Outgoing Mail (SMTP) server for communications (optional ):

-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ....../opt/oracle/product/10.2.0/Database

Database hostname ...... oracle10

Listener port number... 1521

Database SID ...... orcl

Email address for communications ...............

Outgoing Mail (SMTP) server for communications ...............

-----------------------------------------------------------------

Do you wish to continue? [Yes (Y)/no (N)]: Y

Oct 27,200 7 9:35:12 AM oracle. sysman. emcp. EMConfig perform

INFO: This operation is being logged at/opt/oracle/product/10.2.0/Database/export toollogs/emca/orcl/emca_2007-10-27_09-33-46-AM.log.

Oct 27,200 7 9:35:33 AM oracle. sysman. emcp. util. DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while )...

Oct 27,200 7 9:36:39 AM oracle. sysman. emcp. ParamsManager getLocalListener

WARNING: Error retrieving listener for oracle10

Oct 27,200 7 9:36:54 AM oracle. sysman. emcp. util. DBControlUtil startOMS

INFO: Starting Database Control (this may take a while )...

Oct 27,200 7 9:39:51 AM oracle. sysman. emcp. EMDBPostConfig configure mconfiguration

INFO: Database Control started successfully

Oct 27,200 7 9:39:53 AM oracle. sysman. emcp. EMDBPostConfig configure mconfiguration

INFO: >>>>>>>>>>> The Database Control URL is: 5500/em <

Enterprise Manager configuration completed successfully

Finished emca at Oct 27,200 7 9:39:53 AM

[Oracle @ oracle10 ~] $

Delete Database Control Configuration of a Database

[Oracle @ oracle10 ~] $ Emca-deconfig dbcontrol db

Started emca at Oct 27,200 7 10:44:24 AM

EM Configuration Assistant, Version 10.2.0.1.0 Production

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

Enter the following information:

Database SID: orcl

Do you wish to continue? [Yes (Y)/no (N)]: Y

Oct 27,200 7 10:44:47 AM oracle. sysman. emcp. EMConfig perform

INFO: This operation is being logged at/opt/oracle/product/10.2.0/Database/export toollogs/emca/orcl/emca_2007-10-27_10-44-22-AM.log.

Oct 27,200 7 10:44:52 AM oracle. sysman. emcp. util. DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while )...

Oct 27,200 7 10:48:13 AM oracle. sysman. emcp. EMReposConfig stopDBMSJobs

WARNING: Error initializing SQL connection. SQL operations cannot be specified med

Oct 27,200 7 10:48:13 AM oracle. sysman. emcp. EMReposConfig invoke

WARNING: Unable to remove DBMS jobs.

Enterprise Manager configuration completed successfully

Finished emca at Oct 27,200 7 10:51:01 AM

[Oracle @ oracle10 ~] $

20. uninstall oracle if you want:

./RunInstaller-silent-deinstall-removeallfiles-removeAllPatches "REMOVE_HOMES = {$ ORACLE_HOME}"-responseFile ~ Oracle/database/response/enterprise. rsp

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.