Install Oracle 12C and linux7centos7 on LINUX7 (CentOS7)

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

Install Oracle 12C and linux7centos7 on LINUX7 (CentOS7)

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

 

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

chkconfig iptables offchkconfig ip6tables offchkconfig cups offchkconfig firstboot offchkconfig wpa_supplicant offchkconfig postfix offsed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/configsed -i 's/^GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_configsed -i 's/#UseDNS yes/UseDNS no/' /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:

The following packages (or later versions) must be installed:binutils-2.20.51.0.2-5.11.el6 (x86_64)compat-libcap1-1.10-1 (x86_64)compat-libstdc++-33-3.2.3-69.el6 (x86_64)gcc-4.4.4-13.el6 (x86_64)gcc-c++-4.4.4-13.el6 (x86_64)glibc-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6 (x86_64)kshlibgcc-4.4.4-13.el6 (x86_64)libstdc++-4.4.4-13.el6 (i686)libstdc++-devel-4.4.4-13.el6 (x86_64)libaio-0.3.107-10.el6 (x86_64)libaio-devel-0.3.107-10.el6 (x86_64)libXext-1.1 (x86_64)libXtst-1.0.99.2 (x86_64)libX11-1.3 (x86_64)libXau-1.0.5 (x86_64)libxcb-1.5 (x86_64)libXi-1.3 (x86_64)make-3.81-19.el6sysstat-9.0.4-11.el6 (x86_64)

Upload the package to the linux system and install it.

[Root @ hyldb package] # vi rpm. sh

rpm -ivh binutils-2.23.52.0.1-16.el7.x86_64.rpmrpm -ivh compat-libcap1-1.10-7.el7.x86_64.rpmrpm -ivh gcc-4.8.2-16.el7.x86_64.rpmrpm -ivh gcc-c++-4.8.2-16.el7.x86_64.rpmrpm -ivh glib2-devel-2.36.3-5.el7.x86_64.rpmrpm -ivh glibc-2.17-55.el7.x86_64.rpmrpm -ivh ksh-20120801-19.el7.x86_64.rpmrpm -ivh libaio-0.3.109-12.el7.x86_64.rpmrpm -ivh libaio-devel-0.3.109-12.el7.x86_64.rpmrpm -ivh libgcc-4.8.2-16.el7.x86_64.rpmrpm -ivh libstdc++-4.8.2-16.el7.x86_64.rpmrpm -ivh libstdc++-devel-4.8.2-16.el7.x86_64.rpmrpm -ivh libX11-1.6.0-2.1.el7.x86_64.rpmrpm -ivh libXau-1.0.8-2.1.el7.x86_64.rpmrpm -ivh libxcb-1.9-5.el7.x86_64.rpmrpm -ivh libXext-1.3.2-2.1.el7.x86_64.rpmrpm -ivh libXtst-1.2.2-2.1.el7.x86_64.rpmrpm -ivh make-3.82-21.el7.x86_64.rpmrpm -ivh sysstat-10.1.5-4.el7.x86_64.rpm

[Root @ hyldb package] # sh rpm. 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

# System default settings live in /usr/lib/sysctl.d/00-system.conf.# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file## For more information, see sysctl.conf(5) and sysctl.d(5).fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 4294967295kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576~

[Root @ hyldb/] # sysctl-p

fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 4294967295kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576

-- Modify System Restrictions

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

# End of fileoracle              soft    nproc   2047oracle              hard    nproc   16384oracle              soft    nofile  1024oracle              hard    nofile  65536

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

session    required     /lib/security/pam_limits.sosession    required     pam_limits.so

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

-- Add the following parameters

if [ $USER = "oracle" ]; then        if [ $SHELL = "/bin/ksh" ]; then              ulimit -p 16384              ulimit -n 65536        else              ulimit -u 16384 -n 65536        fifi
5.5 switch to oracle user and configure Environment Variables

[Root @ hyldb/] # su-oracle

[Oracle @ hyldb ~] $ Vi. bash_profile

# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programs#PATH=$PATH:$HOME/.local/bin:$HOME/bin#export PATHORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1ORACLE_SID=shenlanPATH=$PATH:$HOME/bin:$ORACLE_HOME/binLD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/libexport ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH~~".bash_profile" 18L, 430C written

[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.