Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Oracle Database 12c on CentOS 7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to install Oracle database 12c on CentOS 7". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install Oracle database 12c on CentOS 7.

Introduction this guide describes how to deploy Oracle database 12c (12.1.0.2.0) with quick installation features on CentOS 7.1 (64 bits).

Reference system:

[root@centos7] # hostnamectl Static hostname: centos7.example.com Icon name: computer Chassis: n Machine ID a Machine ID: 583b4d69eaea465ea4bb96ac3b891e15 Boot ID: 931ed1af622046ebbde071a87844a7d5 Virtualization: kvm Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-229.11.1.el7.x86_64 Architecture: x86 * 64 2. Prerequisites after successfully installing the operating system, please confirm the host name and register it on your DNS. You can also choose to add your host name / IP to / etc/hosts.

[root@centos7 ~] # cat / etc/hostname centos7.example.com maintains SELinux in enforcing mode and enables firewall

[root@centos7 ~] # sestatus SELinux status: enabled SELinuxfs mount: / sys/fs/selinux SELinux root directory: / etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28

[root@centos7] # firewall-cmd-- state running updates the CentOS system to the latest components

[root@centos7 ~] # yum update-y download Linux x86-64 version of Oracle Database 12c:

Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

The installation steps create the necessary operating system users and groups for the Oracle database.

[root@centos7 ~] # groupadd oinstall [root@centos7 ~] # groupadd dba [root@centos7 ~] # useradd-g oinstall-G dba oracle [root@centos7 ~] # passwd oracle adds the following kernel parameters to / etc/sysctl.conf

Fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1987162112 kernel.shmmni = 4096 kernel.sem = 25032000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 check and apply the new value.

[root@centos7 ~] # sysctl-p [root@centos7 ~] # sysctl-a sets the upper limit for oracle users in / etc/security/limits.conf

Oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 unpack the zip files (linuxamd64_12102_database_1of2.zip, linuxamd64_12102_database_2of2.zip) of the Oracle database software to the / stage directory.

[root@centos7 ~] # yum install-y zip unzip [root@centos7 ~] # unzip linuxamd64_12102_database_1of2.zip-d / stage/ [root@centos7 ~] # unzip linuxamd64_12102_database_2of2.zip-d / stage/ modify / stage permission

[root@centos7 ~] # chown-R oracle:oinstall / stage/ creates / U01 directory for Oracle software and / U02 directory for database files.

[root@centos7 ~] # mkdir / U01 [root@centos7 ~] # mkdir / U02 [root@centos7 ~] # chown-R oracle:oinstall / U01 [root@centos7 ~] # chown-R oracle:oinstall / U02 [root@centos7 ~] # chmod-R 775 / U01 [root@centos7] # chmod-R 775 / U02 [root@centos7 ~] # chmod gears / U01 [root@centos7 ~] # chmod gears / U02 components required for installation:

[root@centos7 ~] # yum install-y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64

Glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64

Libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64

LibXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 also installs groups of X Window System components.

[root@centos7] # yum groupinstall-y "X Window System" since the installation of Oracle uses an image interface, you can do it in the following two simple ways.

Option 1

Log in remotely from a pictorial Linux computer via SSH.

Ssh-X oracle@centos7.example.com Scheme 2

Take advantage of a Microsoft Windows desktop with SSH client (PuTTY) and X-Windows terminal emulator (Xming).

The following documents describe how to install Xming on a Windows system.

Xming-- X-Windows Terminal Emulator under Microsoft Windows computer

Log in as an oracle user using the above scenario, and then execute the Oracle installer:

[oracle@centos7 ~] $/ stage/database/runInstaller Starting Oracle Universal Installer... 4. The first step of Oracle installer screen-- Security update

If you do not want to receive an email from Oracle support, please uncheck the item and press Next.

Press YES in the newly opened window.

Step 2-installation options

Select Create and configure a database and press Next

Step 3-system level

Select Desktop Class for the default simple Oracle database installation.

Step 4-typical installation

In the Typical Install Configuration screen, set the following functions.

Oracle base

/ u01/app/oracle

Software location

/ u01/app/oracle/product/12.1.0/dbhome_1

Database file location

/ u02

Global database name

Orcl.example.com

In addition, please set the appropriate Database edition (database version) and Character set (character set). Please set a secure password for database management, and finally uncheck the Create as Container database project.

Step 5-create inventory

Accept the default / u01/app/oraInventory and press Next.

Step 6-check prerequisites

The installer automatically checks all necessary operating system components and kernel settings.

Step 7-Summary

This is the last chance to edit the installation features. Please press Install.

Step 8-execute the setup script

When the query window appears, log in to root and execute two scripts:

[root@centos7] # / 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@centos7] # / u01/app/oracle/product/12.1.0/dbhome_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= / u01/app/oracle/product/12.1.0/dbhome_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 by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. You can follow the installation in a separated window. Both scripts must be executed as root.

Step 9-installation progress

A window showing the progress of the installation will appear. Please do not close this window.

Step 10-successfully complete the installation

The last screen will inform you that the installation has been completed and display the URL of the Oracle enterprise administrator.

Https://localhost:5500/em

Press OK to close the installer.

Task 5.1 after installation. Firewall, please log in as root and check the booted local

[root@centos7 ~] # firewall-cmd-- get-active-zones public interfaces: eth0 opens the relevant port

[root@centos7] # firewall-cmd-zone=public-add-port=1521/tcp-add-port=5500/tcp-add-port=5520/tcp-add-port=3938/tcp\-permanent success

[root@centos7] # firewall-cmd-- reload success

[root@centos7] # firewall-cmd-- list-ports 1521/tcp 3938/tcp 5500/tcp 5520/tcp 5.2. For Oracle work environment, please log in as an oracle user and add the following values in / home/oracle/.bash_profile

TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME ORACLE_SID=orcl; export ORACLE_SID PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH reloads bash_profile to apply the new setting values:

[oracle@centos7] $. .bash _ profile 5.3. Log in to the database. Finally, log in to the database:

[oracle@centos7] $sqlplus system@orcl... Output omitted... Oracle Database 12c Enterprise Edition Release 12.1.0.2.0-64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL > Please use Oracle enterprise administrator to manage the database:

Https://:5500/em

At this point, I believe you have a deeper understanding of "how to install Oracle database 12c on CentOS 7". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report