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

CentOS 7 installs Oracle 11.2.0.4

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

Share

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

This article is from: https://www.cnblogs.com/xqzt/p/5456401.html

However, combined with the actual situation, the content has been slightly changed.

I. installation environment

CentOS Linux release 7.2.1511 (Core)

Oracle Database 11g Release 2 (11.2.0.4)

II. Preparation for installation

2.1 modify hostname

Modify the HOSTNAME variable in the / etc/sysconfig/network configuration file

[root@xqzt ~] # hostnamectl set-hostname oracledb

# permanent modification

[root@xqzt ~] # vi / etc/sysconfig/network

NETWORKING=yes

HOSTNAME= oracledb

[root@xqzt ~] # hostname oracledb

2.2 add a record corresponding to hostname and IP

[root@xqzt ~] # vi / etc/hosts 172.17.22.70 oracledb

2.3 turn off Selinux

[root@oracledb ~] # sed-I "s/SELINUX=enforcing/SELINUX=disabled/" / etc/selinux/config [root@oracledb ~] # setenforce 0

2.4 firewall opens port 1521

[root@sdba] # firewall-cmd-- permanent-- zone=public-- add-port=1521/tcp success [root@sdba] # firewall-cmd-- reload success

Download Oracle 11g

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

2.6 check hardware configuration requirements

Minimum memory 1 GB of RAM

Virtual memory capacity

Available RAM

Swap Space Required

Between 1 GB and 2 GB

1.5 times the size of RAM

Between 2 GB and 16 GB

Equal to the size of RAM

More than 16 GB

16 GB

Hard disk space requirement

Hard disk space requirements for database software:

Installation Type

Requirement for Software Files (GB)

Enterprise Edition

3.95

Standard Edition

3.88

Data file hard disk space requirements:

Installation Type

Requirement for Data Files (GB)

Enterprise Edition

1.7

Standard Edition

1.5

Command to check

# memory grep MemTotal / proc/meminfo

# swap space grep SwapTotal / proc/meminfo

# disk space df-ah

2.7 install the required software packages

You can view the packages you need on different platforms by looking at the Package Requirements listed in the Oracle installation documentation.

Packages for Oracle Linux 7

Binutils-2.23.52.0.1-12.el7.x86_64

Compat-libcap1-1.10-3.el7.x86_64

Gcc-4.8.2-3.el7.x86_64

Gcc-c++-4.8.2-3.el7.x86_64

Glibc-2.17-36.el7.i686

Glibc-2.17-36.el7.x86_64

Glibc-devel-2.17-36.el7.i686

Glibc-devel-2.17-36.el7.x86_64

Ksh libaio-0.3.109-9.el7.i686 libaio-0.3.109-9.el7.x86_64

Libaio-devel-0.3.109-9.el7.i686 libaio-devel-0.3.109-9.el7.x86_64

Libgcc-4.8.2-3.el7.i686 libgcc-4.8.2-3.el7.x86_64

Libstdc++-4.8.2-3.el7.i686 libstdc++-4.8.2-3.el7.x86_64

Libstdc++-devel-4.8.2-3.el7.i686 libstdc++-devel-4.8.2-3.el7.x86_64

LibXi-1.7.2-1.el7.i686 libXi-1.7.2-1.el7.x86_64

LibXtst-1.2.2-1.el7.i686 libXtst-1.2.2-1.el7.x86_64

Make-3.82-19.el7.x86_64 sysstat-10.1.5-1.el7.x86_64

Oracle ODBC Drivers

On Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4:

UnixODBC-2.3.1-6.el7.x86_64 or later unixODBC-2.3.1-6.el7.i686 or later unixODBC-devel-2.3.1-6.el7.x86_64 or later unixODBC-devel-2.3.1-6.el7.i686 or later

Install the package

Yum-y install binutils

Yum-y install compat-libcap1

Yum install-y gcc gcc-c++ glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64

Yum install-y libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64

Yum install-y libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64

Yum install-y libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64

Yum install-y make

Yum install-y sysstat

Yum install-y unixODBC.i686 unixODBC.x86_64 unixODBC-devel.i686 unixODBC-devel.x86_64

Ksh useless yum install-y ksh requires pdksh to be installed and elfutils-libelf-devel to be installed

Wget-O / tmp/pdksh-5.2.14-37.el5_8.1.x86_64.rpm http://vault.centos.org/5.11/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm cd / tmp rpm-ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm

Yum install-y elfutils-libelf-devel

Otherwise, it will indicate that package is missing.

2.8Create users and user groups required to install oracle

Root users: create Oracle installation group oinstall, database administrator group dba, and oracle users

[root@oracledb ~] # groupadd-g 200 oinstall

[root@oracledb] # groupadd-g 201 dba

[root@oracledb] # useradd-u 440-g oinstall-G dba-d / home/oracle oracle

[root@oracledb ~] # passwd oracle

2.9 change kernel parameters

[root@oracledb ~] # vi / etc/sysctl.conf

# add the following at the end

Net.ipv4.ip_local_port_range= 9000 65500

Fs.file-max = 6815744 kernel.shmall = 10523004

Kernel.shmmax = 6465333657

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.core.rmem_default=262144

Net.core.wmem_default=262144

Net.core.rmem_max=4194304

Net.core.wmem_max=1048576

Fs.aio-max-nr = 1048576

Execute the following command to make the changes take effect

[root@oracledb] # sysctl-p

2.10 modify system resource limits

[root@oracledb ~] # vi / etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536

[root@oracledb ~] # vi / etc/profile

If [$USER = "oracle"]; then if [$SHELL = "/ bin/ksh"]; then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fi fi

Add a pam_limits.so session required pam_limits.so under [root@oracledb ~] # vi / etc/pam.d/login #

2.11 create installation directory and set permissions

Create the following directory

[oracle@oracledb /] $tree / u01 / / u01 / └── oracle ├── app └── oradata

Root creation

[root@oracledb ~] # mkdir-p / u01/oracle [root@oracledb ~] # chown-R oracle:oinstall / U01

Oracle creation

[root@localhost ~] # su-oracle

[oracle@localhost ~] $chmod 755 / u01/oracle

[oracle@localhost ~] $mkdir / u01/oracle/app

[oracle@localhost ~] $chmod 755 / u01/oracle/app/

[oracle@localhost ~] $mkdir / u01/oracle/oradata

[oracle@localhost ~] $chmod 755 / u01/oracle/oradata/

[oracle@localhost ~] $vi. / .bash _ profile

# add at the end of the file

Umask 022

Export ORACLE_BASE=/u01/oracle/app

2.12 set the oracle environment variable

[oracle@oracledb] $vi ~ / .bash_profile

Export ORACLE_BASE=/u01/oracle/app

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

Export PATH=$PATH:$ORACLE_HOME/bin

Export ORACLE_SID=orcl

[oracle@oracledb ~] $source .bash _ profile # effective immediately

Third, install database

[1] upload oracle installation files to CentOS

Using putty's pscp tool under windows

I:\ > pscp-r "oracle database 11.2.0.4" oracle@ server IP:/u01

Oracle@172.17.84.83's password:

P13390677_112040_Linux-x8 | 1362873 kB | 25714.6 kB/s | ETA: 00:00:00 |

P13390677_112040_Linux-x8 | 1124320 kB | 26769.5 kB/s | ETA: 00:00:00 |

P13390677_112040_Linux-x8 | 1177003 kB | 27372.2 kB/s | ETA: 00:00:00 |

P13390677_112040_Linux-x8 | 640651 kB | 27854.4 kB/s | ETA: 00:00:00 |

P13390677_112040_Linux-x8 | 585127 kB | 27863.2 kB/s | ETA: 00:00:00 |

P13390677_112040_Linux-x8 | 476926 kB | 28054.5 kB/s | ETA: 00:00:00 |

P13390677_112040_Linux-x8 | 116719 kB | 29180.0 kB/s | ETA: 00:00:00 |

[2] extract the installation file

Unzip p13390677_112040_Linux-x86-64_1of7.zip

Unzip p13390677_112040_Linux-x86-64_2of7.zip

Unzip p13390677_112040_Linux-x86-64_3of7.zip

Unzip p13390677_112040_Linux-x86-64_4of7.zip

Unzip p13390677_112040_Linux-x86-64_5of7.zip

Unzip p13390677_112040_Linux-x86-64_6of7.zip

Unzip p13390677_112040_Linux-x86-64_7of7.zip

[3] Log in as oracle user VNC and run the following command

Install VNC

Yum install tigervnc-server

Open the port

[root@oracledb] # firewall-cmd-- permanent-- zone=public-- add-port=5901/tcp success [root@oracledb] # firewall-cmd-- reload success

Run the installer

/ u01/11.2.0.4/database/runInstaller

[4] enter email address and password (oracle user) to receive information such as security updates from oralce

[5] choose to install the database software and create the data, or choose the second option to install only the database software

[6] Select the server version

[7] choose to install single instance database in this example

[8] Advanced mode installation

[9] Select language

[10] Select the version to install, select "Enterprise Edition" here

[11] specify Oracle Base and Software Location. We have set this environment variable in the profile file of oracle users, which remains the default here.

[12] specify Inventory Directory, this example remains the default

[13] Select database usage

[14] Database name and service name

[15] enable automatic memory management

[16] set the default encoding to UTF8

[17] sample scheme

[18] enable Oracle Enterprise Management console OEM

[19] Select the database file directory

[20] automatic backup settin

[21] set database username and password [Note: password should not start with a number, otherwise an error will be reported later: ORA-00922: the option is missing or invalid]

[22] specify the oralce privileged user group, which remains the default in this example

[23] next, the oralce installer checks the installation environment

After installing the missing package, check again

[24] the installation information is displayed as follows. Directly Finish, start the installation.

[25] wait for oracle installation

[26] when the following window appears, open another terminal, log in as root user, and execute the following command. When you are finished, click OK

[root@oracledb oracle] # / usr/oracle/oraInventory/orainstRoot.sh

[root@oracledb oracle] # / usr/oracle/app/product/11.2.0/dbhome_1/root.sh

[27] at this point, the oracle 11g R2 database is installed.

[28] configuration of environment variables

[oracle@oracledb oracle] $vi ~ / .bash_profile # add export ORACLE_BASE=/usr/oracle/app export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID=orcl at the end of the file

[29] Open console port

Set up boot self-startup according to Oracle11gR2 under CentOS 6

Unlock scott account method

VI. Problems encountered

Problem 1: the swap space is too small

Install Oracle to change the size of swap swap space

Install oracle to check that the swap space is too small

Question 2: prerequisites check missing package

Oracle 11gR2 installation with few packages

Problem 3: installation of oracle 11g and solution of netca,dbca garbled code

Reason: the font used for Oracle installation is not installed on Linux

Method 1: upload the character library

Font library download address http://download.csdn.net/detail/lidongtang/4182819

Then execute the following command under Linux to install the font library to the appropriate location

Mkdir-p / usr/share/fonts/zh_CN/TrueType cp zysong.ttf / usr/share/fonts/zh_CN/TrueType/

So at the time of installation. Oracle will prompt for Chinese instead of garbled code.

Method 2: install in English

Export.utf-8

Or

# vi / etc/sysconfig/i18n (no garbled code)

Problem 4: cannot use command / usr/bin/xdpyinfo to automatically check monitor color

Reference cannot use the command / usr/bin/xdpyinfo to automatically check the monitor color. Check to see if the DISPLAY variable is set. Failed to pass

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

Wechat

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

12
Report