How to install Oracle (centos-oracle 12c) under Linux _linux

Source: Internet
Author: User
Tags dba mkdir zip centos

The first step: network connection, in my last blog has introduced, no longer said.

Purpose of network connection: In order to be able to use the yum command, download files directly on the Internet.

Step two: Go to Oracle website to download 12c

Database server-Side two files: (Installed in Linux)

Linuxamd64_12102_database_1of2.zip

Linuxamd64_12102_database_2of2.zip

Put these two files in the Linux TMP directory and use the unzip command to extract them.

A file for the client of the database: (Installed in Windows)

32-bit Oracle 11g client Windows version

Win32_11gr2_client.zip

1.

Add users, groups, related directories

Groupadd Oinstall
Groupadd dba
USERADD-G oinstall-g dba Oracle

Change the owner of the ORACLE12C media

Chown-r oracle:oinstall/tmp

2.

---Create the Install Oracle installation directory

Mkdir-p/u01/app/oracle/product/12.1.0/db_1
Mkdir-p/u01/app/orainventory
Chown-r oracle:oinstall/u01
Chmod-r 777/u01

3.

Installation verification for system-dependent packages

Yum-y Install Binutils
Yum-y Install COMPAT-LIBCAPL
Yum-y Install gcc-
Yum-y Install gcc-c++-
Yum-y Install Glib2-devel
Yum-y Install glibc
Yum-y Install Ksh
Yum-y Install Libaio
Yum-y Install Libaio-devel
Yum-y Install libgcc-
Yum-y Install libstdc++-
Yum-y Install Libstdc++-devel
Yum-y Install libX11
Yum-y Install Libxau
Yum-y Install LIBXCB
Yum-y Install Libxext
Yum-y Install LIBXTST
Yum-y Install make
Yum-y Install Sysstat
Yum-y Install compat-libstdc++
Yum-y Install libstdc++
Yum-y Install compat-c++
Yum-y Install Compat-libcap
Yum-y Install gcc-c++
Yum-y Install UNIXODBC
Yum-y Install Unixodbc-devel
Yum-y Install Xterm
Yum-y Install Elfutils-libelf
Yum-y Install Libaio-devel
Yum-y Install LIBGCC
Yum-y Install Pdksh
Yum-y Install compat-libstdc++

Of course, when all of these commands are replicated, there is often a lack of downloads. You need to go to the "RPM Search" site to download. (The completion of these tasks will be validated when Oracle is installed)

4.

Modifying the Linux core configuration file

Vi/etc/sysctl.conf

Add content (about kernel these four parameters and your memory settings are related, there may be a problem)

FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 4294967295
Kernel.shmmni = 4096
Kernel.sem = 250 32000 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 = 1048576

Execute the order to make the above entry into force:

Su Root
Sysctl-p

5.

--Modifying system limits
Vi/etc/security/limits.conf

Add Content:

Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536

6.

Vi/etc/pam.d/login

Add Content:

Session required/lib/security/pam_limits.so
Session Required Pam_limits.so

7.

modifying system environment variables

Vi/etc/profile

Add Content:

if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi

8.

Add an environment variable to the newly added user Oracle

Su Oracle
VI ~/.bash_profile

Add Content:

Oracle_base=/u01/app/oracle
Oracle_home= $ORACLE _base/product/12.1.0/db_1 (here's a pit)
Oracle_sid=test
Path= $PATH: $HOME/bin: $ORACLE _home/bin
Ld_library_path= $ORACLE _home/lib:/usr/lib
Export oracle_base oracle_home oracle_sid PATH Ld_library_path
--Use the Oracle user itself to execute the commands below
SOURCE ~/.bash_profile

9.

This is a graphical interface for installation, access to the interface

Su Root
Chown-r Oracle:oinstall/tmp/database
Export display=:0.0
Xhost +
Su Oracle
Cd/tmp/database
SH runinstaller.sh (Run command, open graphical installation interface)

10.

Graphics installation interface is not much said, the installation steps to resolve the error. Anyway, a lot of pits, lots.

In this step, I just installed Oracle and did not create a database.

11.

Creating a Database

Dbca

(There is a hole here, and there may be a hint that the command does not exist, because when Oracle is installed, the directory installed in Dbhome_1 is not in our db_1, so change the 8-step red value to dbhome_1.)

Command will also open a graphical interface to create a database.

12.

Creating listeners
The NETCA command, like the one above, opens a graphical interface to create a listener.

13.

Start the Oracle service.

Sqlplus/as SYSDBA
Sql-> Startup (start service)

14.

Install client under Windows: 32-bit Oracle 11g client Windows version.

NET Manager tool to add a new "service naming"

15.

At this point, we can test to see if Linux can be connected to Windows.

Open cmd, enter: tnsping [the service name just set]

If not successful, it may be a Linux firewall problem, shut down the Linux firewall

Systemctl Stop Firewalld.service #停止防火墙
Systemctl Disable Firewalld.service #禁止防火墙开机启动
Systemctl Start Firewalld.service #启动防火墙
Systemctl Status Firewalld.service #查看防火墙状态

After you close the firewall, test again.

16.

Install Toad for Oracle to operate Oracle.

Login.

The above is a small set of Linux to introduce the installation of Oracle (Centos-oracle 12c) method, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.