Linux-install Oracle (CentOS-Oracle 12c) and centos7 install oracle12c

Source: Internet
Author: User

Linux-install Oracle (CentOS-Oracle 12c) and centos7 install oracle12c

Step 1: network connection, which is described in my previous blog.

Purpose of network connection: to use the yum command, download the file directly online.

Step 2: Go to the oracle official website to download 12c

Two files on the database server: (installed in Linux)

Linuxamd64_12102_database_1of2.zip

Linuxamd64_12102_databasesilicate f2.zip

Place the two files in the tmp directory of Linux and decompress them using the unzip command.

A file of the database client: (installed on Windows)

32-bit oracle 11g client for windows

Win32_11gR2_client.zip

1.

Add users, groups, and related directories
Groupadd oinstall
Groupadd dba
Useradd-g oinstall-G dba oracle

Change the owner of oracle12c Media

Chown-R oracle: oinstall/tmp

2.

--- Create and install the 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.
Install and verify the system dependency package

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 the commands are copied and executed, some undownloaded commands are often exposed. Go to the [RPM Search] website for download. (Whether these tasks are completed will be verified during Oracle Installation)

4.

Modify the linux core configuration file

Vi/etc/sysctl. conf

Add content (the four Kernel parameters are related to your memory settings, and problems may occur here)

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 command to make the above take effect:

Su root

Sysctl-p

5.

-- Modify System Restrictions
Vi/etc/security/limits. conf

Add content:
Oracle soft nproc 2047
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.

Modify 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 environment variables for newly added Oracle users

Su oracle

Vi ~ /. Bash_profile

Add content:

ORACLE_BASE =/u01/app/oracle
ORACLE_HOME = $ ORACLE_BASE/product/12.1.0/Db_1(There is a pitfall here)
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

-- Execute the following command as an oracle user to take effect

Source ~ /. Bash_profile

9.

Install the tool on a graphical interface.

Su root

Chown-R oracle: oinstall/tmp/database

Export DISPLAY =: 0.0

Xhost +

Su oracle

Cd/tmp/database

Sh runInstaller. sh (run the command to open the graphical installation Interface)

10.

The graphic installation interface is not mentioned much. The installation steps are as follows, and an error will be solved. There are many pitfalls.

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

11.

Create a database
Dbca

(There is a pitfall here, and there may be a prompt that the command does not exist because the installed directory is in dbhome_1 during Oracle Installation and is not in db_1, so change the red value of Step 8 to dbhome_1)

The command also opens a graphical interface like above to create a database.

12.
Create listener
The netca command opens a graphical interface like above to create a listener.

13.

Start the Oracle service.

Sqlplus/as sysdba

SQL-> startup (start the service)

14.

Install the client in Windows: 32-bit oracle 11g client for windows.

Net manager tool to add a new service name]

15.

At this time, we can test to see if we can connect to Linux in Windows.

Open CMD and enter tnsping [name of the service you just set]

If it fails, it may be a problem with the Linux firewall. Disable the Linux firewall.

Systemctl stop firewalld. service # stop Firewall

Systemctl disable firewalld. service # disable firewall startup

Systemctl start firewalld. service # start Firewall

Systemctl status firewalld. service # view the Firewall status

Shut down the firewall and try again.

16.

Install toad for oracle to operate Oracle.

Log on.

If everything succeeds, I wish you luck.

 

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.