oracle_11.2.0.1 Silent Installation Deployment under CentOS 7.5

Production and Construction Environment:
Operating System: CentOS 7.5
Memory size: 32GB
Hard disk: 1T
Note: The optimization of the kernel parameters in the text is modified according to the actual environment.
1. Software preparation for installation
1.1 Software preparation

  1. jdk-8u161-linux-x64
    http://www.oracle.com
  2. ORACLE
    linux.x64_11gR2_database_1of2,linux.x64_11gR2_database_2of2
    http://www.oracle.com
    1.2 Notes
    Installation process path, password as far as possible do not appear in Chinese, special characters, spaces, less than 8 passwords.
    2 Oracle database installation
    2.1 Dependent Package Installation
  # yum install -y binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl sysstat libXp unixODBC unixODBC-devel

2.2 Create User and Set Password

# groupadd oinstall
    # groupadd dba
    # useradd -m -g oinstall -G dba oracle
    # passwd oracle

2.3 Configure System Kernel Parameters

# vi /etc/sysctl.com

kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 15728640
kernel.sem = 1010 32000 1010 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744

# sysctl -p

2.4 Modify System Resource Limitation

# vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

2.5 Modifying environmental variables

# 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

# source /etc/profile

2.6 Create oracle installation paths and permissions

# mkdir -p /u01/oracle
# chown -R oracle:oinstall /u01
# chmod 755 /u01/oracle

2.7 Unzip Installation File

# cd /opt/software
# unzip linux.x64_11gR2_database_1of2.zip -d /u01/oracle/
# unzip linux.x64_11gR2_database_2of2.zip -d /u01/oracle/
# chmod -R 700 /u01/oracle/database
# chown -R oracle:oinstall /u01/oracle/database

2.8 Setting oracle user environment variables

$ su -l oracle 
$ vi /home/oracle/.bash_profile

ORACLE_BASE=/u01/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
ORACLE_SID=srment
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

$ source /home/oracle/.bash_profile

2.9 Silent Installation

$ mkdir /u01/oracle/rsp/
$cp /u01/oracle/database/response/* /u01/oracle/rsp/
$ vi /u01/oracle/rsp/db_install.rsp

# Only install database software
oracle.install.option=INSTALL_DB_SWONLY
# Configure host name
ORACLE_HOSTNAME = host name
# - Specify the owner of the oracle inventory directory
UNIX_GROUP_NAME=oinstall
# - Specify the path to the oracle inventory directory of the product list
INVENTORY_LOCATION=/u01/oraInventory
# Designated Language
SELECTED_LANGUAGES=en,zh_CN
# Setting the path of ORALCE_HOME
ORACLE_HOME=/u01/oracle/product/11.2.0/dbhome_1
# - Specify ORALCE_BASE paths
ORACLE_BASE=/u01/oracle/
# Install database software version, enterprise version
oracle.install.db.InstallEdition=EE
# - Specify a user group with DBA, usually a DBA group
oracle.install.db.DBA_GROUP=dba
# - Specify oper user groups
oracle.install.db.OPER_GROUP=oinstall
# - Specify GlobalName
oracle.install.db.config.starterdb.globalDBName=zabbix
# - The SID you designated
oracle.install.db.config.starterdb.SID=zabbix
# Setting up database coding
oracle.install.db.config.starterdb.characterSet=AL32UTF8
# Password for all user names
oracle.install.db.config.starterdb.password.ALL = password
# Installation Safety Update Check
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
# Installation does not update
DECLINE_SECURITY_UPDATES=true

Configure dbca silent installation:

$ vi /u01/oracle/rsp/dbca.rsp

# Global database name of database
GDBNAME = "zabbix"
# Instance name of database
SID = "zabbix"
# - Specify the sys user password
SYSPASSWORD = Password
# - Specify system user password
SYSTEMPASSWORD = Password
# - Specify the directory where the data files are stored, default $ORACLE_BASE/oradata
DATAFILEDESTINATION =
# Designated Character Set
CHARACTERSET = "AL32UTF8"
# Designated country character set
NATIONALCHARACTERSET= "UTF8"
# Specify the size of memory used, in MB. 60-70% of physical memory.
TOTALMEMORY = "8192"

$cd  /u01/oracle/database
$ ./runInstaller -silent -ignorePrereq -responseFile /u01/oracle/rsp/db_install.rsp

Using root to execute scripts

# /u01/oraInventory/orainstRoot.sh
    # /u01/oracle/product/11.2.0/dbhome_1/root.sh

Configuration listener

$ cd $ORACLE_HOME/bin/
$ netca /silent /responsefile /u01/oracle/rsp/netca.rsp

Configuration and database building

$ cd $ORACLE_HOME/bin/
$dbca -silent -responseFile /u01/oracle/rsp/dbca.rsp

2.10 Configure database startup parameters

$vi /etc/oratab

zabbix:/u01/oracle/product/11.2.0/dbhome_1:Y

$ vi  /u01/oracle/product/11.2.0/dbhome_1/bin/dbshut

ORACLE_HOME_LISTNER=$ORACLE_HOME

$ vi /u01/oracle/product/11.2.0/dbhome_1/bin/dbstart

ORACLE_HOME_LISTNER=$ORACLE_HOME

Start and stop database commands

$dbshut
$dbstart

2.11 Firewall Open Database Port (root user)
Edit firewall to open related ports: (- permanent permanent permanent permanent valid, invalid after restart without this parameter)

# firewall-cmd --zone=public --add-port=1521/tcp --permanent

Reload

 # firewall-cmd --reload

2.12 Data Import

# su -l oracle

$ mkdir /u01/oracle/backup

SQL> conn system/Password@zabbix;

SQL> create temporary tablespace zabbix_temp tempfile '/u01/oracle/oradata/zabbix/zabbix_temp.dbf' size 64m autoextend on next 64m maxsize unlimited extent management local;

SQL> create tablespace zabbix_data logging datafile '/u01/oracle/oradata/zabbix/zabbix_data.dbf' size 64m autoextend on next 64m maxsize unlimited extent management local;

SQL> create user user identified by Password default tablespace zabbix_data temporary tablespace zabbix_temp;

SQL> grant connect,resource to user;

SQL> grant create view to user;

SQL> grant create public synonym to user;

SQL> grant drop public synonym to user;

SQL> grant unlimited tablespace to user;

SQL> create or replace directory dir_dump  as  '/u01/oracle/backup';

SQL> grant read,write on directory dir_dump to user;

SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

SQL> alter system set processes=500 scope=spfile;

SQL> alter system set sessions=555 scope=spfile;

    SQL> exit

 $ impdp User name/Password@Library name DUMPFILE=zabbix.dmp DIRECTORY=dir_dump remap_schema=(dmp Library name:Current username) remap_tablespace=(dmp Library table space:Current user table space) )

//There are some shortcomings in parameters and deployment process, please give more advice!!

Keywords: Big Data Oracle SQL Database Zabbix

Added by phonydream on Fri, 11 Oct 2019 03:13:06 +0300