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

Detailed description of oracle database installation

2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Introduction: Overview of oracle12c

Oracle12c database is a relational database, which adopts Cpact S mode and supports SQL language. It is superior to others in stability, high performance and security.

Official website: https://www.oracle.com/cn

Oracle12c optimization

Oracle12c adds the concepts of CDB and PDB.

The full name of CDB is Container Database, the Chinese translation is database container, and the full name of PDB is Pluggable Database. You can plug and unplug the database.

Before ORACLE 12C, the instance and database had an one-to-one or many-to-one relationship (RAC): that is, an instance could only be associated with one database, and the database could be loaded by multiple instances. It is impossible for an instance to have an one-to-many relationship with a database. When entering ORACLE 12C, the instance can have an one-to-many relationship with the database.

In other words, multiple PDB are created under CDB in 12c, each PDB is similar to the instance in 11g, and then the PDB under one CDB is isolated from each other.

Preparatory work

One CentOS7: 4G physical memory

New disk partition (40G): swap partition 8G (sdb1); 32G partition available for mount (sdb2)

Download the completed oracle12c packet: database

# download address: https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Installation process

I. deployment environment

1. Disable firewall, SeLinux and security features.

Systemctl stop firewalld.service

Systemctl disable firewalld.service

Setenforce 0

2. Format the disk and set the mount directory

Mkfs-t xfs / dev/sdb2

Mkdir / orc

3. Change the hostname oracle, resolve the name, and mount the disk after restart.

Add HOSTNAME=oracle vim / etc/hosts # at the end of vim / etc/hostname # add 192.168.37.133 oracle mount / dev/sdb1 / orc # mount

4. Install the environment package

Yum install-y binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstatunixODBC unixODBC-devel

Second, adjust kernel parameters

Vim / etc/sysctl.conf fs.aio-max-nr = 1048576 # number of asynchronous IO requests recommended: 1048576 is actually equal to 1024024, that is, 1024K fs.file-max = 6815744 # the maximum number of file handles opened, to prevent file descriptor depletion problem kernel.shmall = 2097152 # total shared memory page Memory divided by 4K gives kernel.shmmax = 4294967295 # maximum memory kernel.shmmni = 4096 # minimum memory kernel.sem = 250 32000 100 128#SEMMSL: maximum number of signals per signal set SEMMNS: used to control the maximum number of signals in the entire Linux system; SEMOPM: kernel parameters are used to control the number of signal operations that can be performed by each semop system call SEMMNI: the kernel parameter is used to control the maximum number of signal sets in the Linux system net.ipv4.ip_local_port_range = 9000 65500 # Port range for outgoing connections net.core.rmem_default = 262144 # default value for socket receive buffer size net.core.rmem_max = 4194304 # socket receive buffer Maximum zone size net.core.wmem_default = 262144 # default value of socket send buffer size net.core.wmem_max = 1048576 # maximum socket send buffer size / / reload configuration file sysctl-p

III. Configuration of user environment

1. Create an oracle user and set the password

Groupadd oinstall

Groupadd dba

Useradd-g oinstall-G dba oracle #-G additional group-g private group

Passwd oracle

123123

2. Create an oracle working directory

Mkdir-p / orc/app/oracle

Chown-R oracle:oinstall / orc/app

Chmod-R 755 / orc/app/oracle/

3. Set oracle's own environment variables

Delete the last 4 lines from the vim / home/oracle/.bash_profile # configuration file umask 022 # create file permissions ORACLE_BASE=/orc/app/oracle # installation path ORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/ # specify the installation product ORACLE_SID=orcl # instance NLS_LANG= "SIMPLIFIED CHINESE_CHINA" .UTF8 # language is simplified Chinese PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin # oracle command is imported into environment variable LANG=zh_CN.UTF-8 # Character set export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID # declares global Easy for system identification

IV. Restrictions on oracle user resources

1. Use pam_limits authentication module

Vim / etc/pam.d/login# add the following to pam_selinux.so close should be the first session rule: session required / lib/security/pam_limits.so session required pam_limits.so

2. Configure the restriction file

Add oracle soft nproc 2047 # at the end of vim / etc/security/limits.conf # single user can use the process oracle hard nproc 16384 oracle soft nofile 1024 # number of files that users can open oracle hard nofile 65536 oracle Soft stack 10240 # Stack Settings

3. Load environment variables

Vim / etc/profile if [$USER = "oracle"] then if [$SHELL = "/ bin/ksh"] then ulimit-p 16384 # buffer size ulimit-n 65536 # number of files else ulimit-u 16384-n 65536 # number of processes fi fi

5. Oracle installation

1. Share database files to this machine

Mkdir / abc

Mount.cifs / / 192.168.37.1/oracle / abc

Ls / abc/oracledatabase/

2. Graphical interface operation of virtual machine (login root user)

Xhost +

Su-oracle

Export DISPLAY=:0.0

Cd / abc/adatbase

. / runInstaller

3. After the oracle12c installation interface appears, do the following

Operate under root user:

At this point, the latest version of the database of oracle12c has been installed and can be logged in!

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

Database

Wechat

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

12
Report