Install Oracle 12C on CentOS7

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox

Install Oracle 12C on CentOS7

Lab environment: Oracle VM VirtualBox 4.2.12

Operating System: CentOS 7 (LINUX7) 64bit

Database: Oracle 12C 64bit

Objective: To install Oracle12C in LINUX7

Operation Demonstration:

(1) install the Linux 7 Operating System

Omitted

(2) download the oracle software package from the official website

Omitted

(3) download the official oracle12C documents

Omitted

(4) Upload the oracle software package to the linux operating system

Omitted

(5) install oracle5.1 Host Configuration

-- Disable some useless services based on experience; otherwise, some errors may occur during installation.

# Vi serverstop. sh

-- Write a script to close the service

[Plain] view plaincopy
  1. Chkconfigiptablesoff
  2. Chkconfigip6tablesoff
  3. Chkconfigcupsoff
  4. Chkconfigfirstbootoff
  5. Chkconfigwpa_supplicantoff
  6. Chkconfigpostfixoff
  7. Sed-I's/SELINUX = enforcing/SELINUX = disabled/'/etc/selinux/config
  8. Sed-I's/^ GSSAPIAuthenticationyes $/GSSAPIAuthenticationno/'/etc/ssh/sshd_config
  9. Sed-I's/# UseDNSyes/UseDNSno/'/etc/ssh/sshd_config
# Sh serverstop. sh

-- Execute the script to close the service

5.2 installation package

Decompress the installation package

[Root @ hyldb/] # cd/software

[Root @ hyldb software] # ls

Linuxamd64_12c_database_1of2.zip linuxamd64_12c_databasesilicate f2.zip

[Root @ hyldb software] # unzip linuxamd64_12c_database_1of2.zip

[Root @ hyldb software] # unzip linuxamd64_12c_databasesilicate f2.zip

Check the official documentation. The installation package for LINUX7 is not found. Find the package to be installed for LINUX6 and use LINUX6 as a reference. The steps are as follows:

Find the required package on the system disk as required. The 64-bit package required in this document is as follows:

[Plain] view plaincopy
  1. Thefollowingpackages (orlaterversions) mustbeinstalled:
  2. Binutils-2.20.51.0.2-5.11.el6 (x86_64)
  3. Compat-libcap1-1.10-1 (x86_64)
  4. Compat-libstdc ++-33-3.2.3-69.el6 (x86_64)
  5. Gcc-4.4.4-13.el6 (x86_64)
  6. Gcc-c ++-4.4.4-13. el6 (x86_64)
  7. Glibc-2.12-1.7.el6 (x86_64)
  8. Glibc-devel-2.12-1.7.el6 (x86_64)
  9. Ksh
  10. Libgcc-4.4.4-13.el6 (x86_64)
  11. Libstdc ++-4.4.4-13. el6 (i686)
  12. Libstdc ++-devel-4.4.4-13.el6 (x86_64)
  13. Libaio-0.3.107-10.el6 (x86_64)
  14. Libaio-devel-0.3.107-10.el6 (x86_64)
  15. LibXext-1.1 (x86_64)
  16. LibXtst-1.0.99.2 (x86_64)
  17. LibX11-1.3 (x86_64)
  18. LibXau-1.0.5 (x86_64)
  19. Libxcb-1.5 (x86_64)
  20. LibXi-1.3 (x86_64)
  21. Make-3.81-19.el6
  22. Sysstat-9.0.4-11.el6 (x86_64)

Upload the package to the linux system and install it.

[Root @ hyldb package] # vi rpm. sh

[Plain] view plaincopy
  1. Rpm-ivhbinutils-2.23.52.0.1-16.el7.x86_64.rpm
  2. Rpm-ivhcompat-libcap1-1.10-7.el7.x86_64.rpm
  3. Rpm-ivhgcc-4.8.2-16.el7.x86_64.rpm
  4. Rpm-ivhgcc-c ++-4.8.2-16. el7.x86 _ 64.rpm
  5. Rpm-ivhglib2-devel-2.36.3-5.el7.x86_64.rpm
  6. Rpm-ivhglibc-2.17-55.el7.x86_64.rpm
  7. Rpm-ivhksh-20120801-19.el7.x86_64.rpm
  8. Rpm-ivhlibaio-0.3.109-12.el7.x86_64.rpm
  9. Rpm-ivhlibaio-devel-0.3.109-12.el7.x86_64.rpm
  10. Rpm-ivhlibgcc-4.8.2-16.el7.x86_64.rpm
  11. Rpm-ivhlibstdc ++-4.8.2-16. el7.x86 _ 64.rpm
  12. Rpm-ivhlibstdc ++ devel-4.8.2-16.el7.x86_64.rpm
  13. Rpm-ivhlibX11-1.6.0-2.1.el7.x86_64.rpm
  14. Rpm-ivhlibXau-1.0.8-2.1.el7.x86_64.rpm
  15. Rpm-ivhlibxcb-1.9-5.el7.x86_64.rpm
  16. Rpm-ivhlibXext-1.3.2-2.1.el7.x86_64.rpm
  17. Rpm-ivhlibXtst-1.2.2-2.1.el7.x86_64.rpm
  18. Rpm-ivhmake-3.82-21.el7.x86_64.rpm
  19. Rpm-ivhsysstat-10.1.5-4.el7.x86_64.rpm

[Root @ hyldb package] # shrpm. sh

Install the package required for calling the graphical interface, and use yum to install the following package

[Root @ hyldb yum. repos. d] # yum-y install unixODBC

[Root @ hyldb yum. repos. d] # yum-y install unixODBC-devel

[Root @ hyldb scripts] # yum install-y xterm

-- Xterm: This is a graphical package.

5.3 add users and related directories

[Root @ hyldb/] # groupadd oinstall

[Root @ hyldb/] # groupadd dba

[Root @ hyldb/] # useradd-g oinstall-G dba oracle

[Root @ hyldb/] # passwd oracle

Changing password for user oracle.

New password:

Bad password: The password is shorter than 8 characters

Retype new password:

Passwd: all authentication tokens updated successfully.

[Root @ hyldb/] # id oracle

Uid = 1001 (oracle) gid = 1001 (oinstall) groups = 1001 (oinstall), 1002 (dba)

[Root @ hyldb/] # mkdir-p/u01/app/oracle/product/12.1.0/db_1

[Root @ hyldb/] # mkdir-p/u01/app/oraInventory

[Root @ hyldb/] # chown-R oracle: oinstall/u01/app

[Root @ hyldb/] # chmod-R 775/u01/app

5.4 configure Kernel Parameters



[Root @ hyldb/] # vi/etc/sysctl. conf

[Plain] view plaincopy
  1. # Systemdefaultsettingslivein/usr/lib/sysctl. d/00-system.conf.
  2. # Tooverridethosesettings, enternewsettingshere, orinan/etc/sysctl. d/<name>. conffile
  3. #
  4. # Formoreinformation, seesysctl. conf (5) andsysctl. d (5 ).
  5. Fs. aio-max-nr = 1048576
  6. Fs. file-max = 6815744
  7. Kernel. shmall = 2097152
  8. Kernel. shmmax = 4294967295
  9. Kernel. shmmni = 4096
  10. Kernel. sem = 25032000100128
  11. Net. ipv4.ip _ local_port_range = 900065500
  12. Net. core. rmem_default = 262144
  13. Net. core. rmem_max = 4194304
  14. Net. core. wmem_default = 262144
  15. Net. core. wmem_max = 1048576
  16. ~

[Root @ hyldb/] # sysctl-p

[Plain] view plaincopy
  1. Fs. aio-max-nr = 1048576
  2. Fs. file-max = 6815744
  3. Kernel. shmall = 2097152
  4. Kernel. shmmax = 4294967295
  5. Kernel. shmmni = 4096
  6. Kernel. sem = 25032000100128
  7. Net. ipv4.ip _ local_port_range = 900065500
  8. Net. core. rmem_default = 262144
  9. Net. core. rmem_max = 4194304
  10. Net. core. wmem_default = 262144
  11. Net. core. wmem_max = 1048576

-- Modify System Restrictions

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

[Plain] view plaincopy
  1. # Endoffile
  2. Oraclesoftnproc2047
  3. Oraclehardnproc16384
  4. Oraclesoftnofile1024
  5. Oraclehardnofile65536

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

[Plain] view plaincopy
  1. Sessionrequired/lib/security/pam_limits.so
  2. Sessionrequiredpam_limits.so

[Root @ hyldb ~] # Vi/etc/profile

-- Add the following parameters

[Plain] view plaincopy
  1. If [$ USER = "oracle"]; then
  2. If [$ SHELL = "/bin/ksh"]; then
  3. Ulimit-p16384
  4. Ulimit-n65536
  5. Else
  6. Ulimit-u16384-n65536
  7. Fi
  8. Fi
5.5 switch to oracle user and configure Environment Variables

[Root @ hyldb/] # su-oracle

[Oracle @ hyldb ~] $ Vi. bash_profile

[Plain] view plaincopy
  1. #. Bash_profile
  2. # Getthealiasesandfunctions
  3. If [-f ~ /. Bashrc]; then
  4. .~ /. Bashrc
  5. Fi
  6. # Userspecificenvironmentandstartupprograms
  7. # PATH = $ PATH: $ HOME/. local/bin: $ HOME/bin
  8. # ExportPATH
  9. ORACLE_BASE =/u01/app/oracle
  10. ORACLE_HOME = $ ORACLE_BASE/product/12.1.0/db_1
  11. ORACLE_SID = shenlan
  12. PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
  13. LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
  14. ExportORACLE_BASEORACLE_HOMEORACLE_SIDPATHLD_LIBRARY_PATH
  15. ~
  16. ~
  17. ". Bash_profile" 18L, 430 Cwritten

[Oracle @ hyldb ~] $ Source. bash_profile

5.6 install oracle software

Install oracle software by remotely calling graphics

X-manager software used here

Ignore the following errors !!!

The reason for this problem is that the first version of 12c does not support linux7, so you need to solve this problem manually.

[Root @ hyldb stubs] # cd/u01/app/oracle/product/12.1.0/db_1/lib/stubs

[Root @ hyldb stubs] # cp */bak

[Root @ hyldb bak] # rm-rf/u01/app/oracle/product/12.1.0/db_1/lib/stubs /*

[Root @ hyldb bak] # cp/u01/app/oracle/product/12.1.0/db_1/rdbms/lib/env_rdbms.mk/u01/app/oracle/product/12.1.0/db_1/rdbms /lib/env_rdbms.mk.orig

[Root @ hyldb bak] # vi/u01/app/oracle/product/12.1.0/db_1/rdbms/lib/env_rdbms.mk

176 rows

Before modification:

LINKTTLIBS = $ (LLIBCLNTSH) $ (ORACLETTLIBS) $ (LINKLDLIBS)

After modification:

LINKTTLIBS = $ (LLIBCLNTSH) $ (ORACLETTLIBS) $ (LINKLDLIBS)-lons

Lines 279-280

Before modification:

LINK = $ (FORT_CMD) $ (PURECMDS) $ (ORALD) $ (LDFLAGS) $ (COMPSOBJS)

LINK32 = $ (FORT_CMD) $ (PURECMDS) $ (ORALD) $ (LDFLAGS32) $ (COMPSOBJS)

After modification:

LINK = $ (FORT_CMD) $ (PURECMDS) $ (ORALD) $ (LDFLAGS) $ (COMPSOBJS)-Wl, -- no-as-needed

LINK32 = $ (FORT_CMD) $ (PURECMDS) $ (ORALD) $ (LDFLAGS32) $ (COMPSOBJS)-Wl, -- no-as-needed

Lines 3041-3042

Before modification:

TG4PWD_LINKLINE = $ (LINK) $ (OPT) $ (TG4PWDMAI )\

$ (LLIBTHREAD) $ (LLIBCLNTSH) $ (LINKLDLIBS)

After modification:

TG4PWD_LINKLINE = $ (LINK) $ (OPT) $ (TG4PWDMAI )\

$ (LLIBTHREAD) $ (LLIBCLNTSH) $(LINKLDLIBS)-lnnz12

After modification, click Retry as follows:

After manual correction, continue the installation.

[Root @ hyldb bak] #/u01/app/oraInventory/orainstRoot. sh

Changing permissions of/u01/app/oraInventory.

Adding read, write permissions for group.

Removing read, write, execute permissions for world.

Changing groupname of/u01/app/oraInventory to oinstall.

The execution of the script is complete.

[Root @ hyldb bak] #/u01/app/oracle/product/12.1.0/db_1/root. sh

Padding Ming root user operation for Oracle 12c

The following environment variables are set:

ORACLE_OWNER = oracle

ORACLE_HOME =/u01/app/oracle/product/12.1.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 script.

Now product-specific root actions will be saved med.

So far, the oracle software installation is complete.

5.7 dbca database creation

Use X-manager to call the graphical interface.

[Oracle @ hyldb ~] $ Xhost +

Access control disabled, clients can connect from any host

[Oracle @ hyldb ~] $ Dbca

5.8 configure a listener

[Oracle @ hyldb ~] $ Netca

Verify the listening status as follows:

[Oracle @ hyldb ~] $ Lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0-Production on 12-APR-2015 17:12:03

Copyright (c) 1991,201 3, Oracle. All rights reserved.

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = hyldb) (PORT = 1521 )))

STATUS of the LISTENER

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

Alias LISTENER

Version TNSLSNR for Linux: Version 12.1.0.1.0-Production

Start Date 12-APR-2015 17:03:10

Uptime 0 days 0 hr. 8 min. 54 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File/u01/app/oracle/product/12.1.0/db_1/network/admin/listener. ora

Listener Log File/u01/app/oracle/diag/tnslsnr/hyldb/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = hyldb) (PORT = 1521 )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = tcps) (HOST = hyldb) (PORT = 5500 )) (Security = (my_wallet_directory =/u01/app/oracle/admin/shenlan/xdb_wallet) (Presentation = HTTP) (Session = RAW ))

Services Summary...

Service "shenlan" has 1 instance (s ).

Instance "shenlan", status READY, has 1 handler (s) for this service...

Service "shenlanXDB" has 1 instance (s ).

Instance "shenlan", status READY, has 1 handler (s) for this service...

The command completed successfully

5.9 configure Net Configuration Assistant

[Oracle @ hyldb ~] $ Netca

Simple Demonstration:

[Oracle @ hyldb ~] $ Sqlplus scott/tiger @ localdb

SQL * Plus: Release 12.1.0.1.0 Production on Sun Apr 12 17:14:44 2015

Copyright (c) 1982,201 3, Oracle. All rights reserved.

Last Successful login time: Sun Apr 12 2015 17:10:20 +

Connected:

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>

The Configuration of Net Configuration Assistant is generally configured on the client. This is only used as a demonstration.

So far, the installation of Oracle12C in LINUX7 is complete.

Original Works are from the blog of "Deep Blue blog". You are welcome to reprint them. Please note the following source when reprinting them. Otherwise, you will be held legally liable for copyright.

Deep Blue blog: http://blog.csdn.net/huangyanlong/article/details/45021171

Related Article

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.