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

Install Oracle 12c under CentOS7

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Oracle introduction

Oracle Database, also known as Oracle RDBMS, or Oracle for short. It is a relational database management system of Oracle. It is a leading product in the field of database. It can be said that Oracle database system is a popular relational database management system in the world at present. The system has good portability, easy to use and strong function, and is suitable for all kinds of large, medium, small and microcomputer environments. It is a database solution with high efficiency and good reliability, which adapts to high throughput.

Experimental environment

CentOS7 system

Memory: 4GB and above swap: 8GB (twice as much as physical memory) cpu: preparation before dual-core experiment

Oracle installation package (download address: https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-linux-12201-3608234.html)

Flash installation package

Experimental steps: turn off firewall self-startup, and related functions and enhanced security features systemctl stop firewalld.service systemctl disable firewalld.service setenforce 0 add a hard disk to do Oracle installation disk, not less than 15g, and format it into xfs format

Fdisk / dev/sdb

Press n to create a new partition

Mkfs-t xfs / dev/sdb1

Format to xfs format

And create a / orc folder to use as the mount point

Mkdir / orc

Mount / dev/sdb1 / orc # is mounted temporarily, and the host needs to be remounted when restarting.

Modify the hostname vim / etc/hostname oracle # modify vim / etc/hosts # add a 192.168.26.152 oracle # set the native IP hostname to oracle # and then restart to make it effective init 6

Note that it needs to be remounted after reboot.

Mount / dev/sdb1 / orc

The environment installation package yum-y install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel# that needs to be prepared before installing oracle adjusts the kernel parameters vim / etc/sysctl.conffs.aio-max-nr = 1048576 # number of asynchronous IO requests through the yum installation environment package. The recommended value is: 1048576 actually, it is equal to 1024 fs.file-max = 6815744. # maximum number of open file handles Problem preventing file descriptor exhaustion kernel.shmall = 2097152 # Total shared memory pages Memory divided by 4K kernel.shmmax = 4294967295 kernel.shmmni = 4096kernel.sem = 250100128 # SEMMSL: maximum number of signals per signal set SEMMNS: maximum number of signals used to control the entire Linux system SEMOPM: kernel parameters are used to control the number of signal operations that can be performed per semop system call SEMMNI: kernel parameters are used to control the maximum number of signal sets in the entire 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 # maximum socket receive buffer size net.core.wmem_default = 262144 # default value for socket send buffer size net.core.wmem_max = 1048576 # maximum socket send buffer size sysctl-p # reload configuration file

`

Create Oracle users and groups groupadd oinstall # create basic group oinstallgroupadd dba # create additional group dbauseradd-g oinstall-G dba oracle # create user passwd oracle # configure password create Oracle installation directory mkdir-p / orc/app/oracle # create oracle installation directory chown-R oracle:oinstall / orc/app/ # assign group master chmod-R 755 / orc/app/oracle/ # assign permissions Oracle user environment configuration vim / home/oracle/.bash_profile # oracle user environment configuration umask 022 # Anti-mask ORACLE_BASE=/orc/app/oracle # oracle basic directory ORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/ # oracle home directory ORACLE_SID=orcl # instance name NLS_LANG= "SIMPLIFIED CHINESE_CHINA" .UTF8 # set the language to Chinese PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_ HOME/bin # set up the system environment LANG=zh_CN.UTF-8export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID # to make the environment effective

Oracle user resource limit

Use pam_limits authentication module

# to control oracle by modifying pam vim / etc/pam.d/login# add session required / lib/security/pam_limits.sosession required pam_limits.so to it

Memory limit and file limit

Vim / etc/security/limits.conf# adds oracle soft nproc 2047 # number of processes available to a single user oracle hard nproc 16384oracle soft nofile 1024 # number of files user can open oracle hard nofile 65536oracle soft stack 10240 # stack setting

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

Install oracle

Mount the extracted database package in / abc

Mkdir / abcmount.cifs / / 192.168.26.128/linuxtools / abc

Operate with root users in the graphical interface

Xhost +

Perform oracle installation

Su-oracle # switch to oracle user export DISPLAY=:0.0cd / abc/Oracle/database # change to oracle installation package directory. / runInstaller # enter the graphical installation interface

The next step is to install the interface.

Pop-up window treatment during installation

# switch root users and execute the following command / orc/app/oraInventory/orainstRoot.sh/orc/app/oracle/product/12.2.0/dbhome_1/root.sh

After the installation is complete, you will see the web management address in the completion interface.

Oracle Web interface

Install the flash plug-in

Rpm-ivh flash-player-npapi-26.0.0.131-release.x86_64.rpm

Oracle command line interface

Switch oracle user

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