Linux7 installs oracle 19c rac
one。 Preparatory work
1.1 system hardware and software environment
Physical memory:
Swap: if the physical memory is in the range of 4-16GB, the configuration is equal to the physical memory, and if the physical memory is greater than 16GB, it is configured as 16GB (Note: if HugePages is started in linux, the allocated part should be deducted before calculating swap)
/ tmp: at least the remaining space of 1GB
Software space: 100GB (Note: oracle software needs at least 7.2GB standalone server) at least 6.5GB 12GB grid home, that is, simply installing a simple rac environment, the software directory must be at least 192GB; taking into account the later log growth, patching and other requirements, oracle officials suggest that you can assign 100GB to the oracle home directory)
Kernel: as shown below
Turn off the firewall and selinux:
Turn off the firewall and disable its automatic startup:
Systemctl stop firewalld
Systemctl disable firewalld
Turn off selinux:
The following is a list of dependent packages to install for minimum requirements:
ODBC driver support: unixODBC-2.3.4 or later
In addition, you need to check whether development kits such as gcc are installed.
1.2 configure hosts file, the following is an example:
Vi / etc/hosts
10.100.1.11 rac19c1
192.168.169.11 rac19c1-priv
10.100.1.12 rac19c2
192.168.169.12 rac19c2-priv
10.100.1.13 rac19c1-vip
10.100.1.14 rac19c2-vip
10.100.1.15 rac19c-scan
1.3 configuration / etc/pam.d/login
Add the following configuration at the end of the file:
Session required pam_limits.so
1.4 configuration / etc/security/limits.conf
# add the following configuration
# modify for oracle
Oracle soft nproc 16384
Oracle hard nproc 16384
Oracle soft nofile 65536
Oracle hard nofile 65536
# modify for grid
Grid soft nproc 16384
Grid hard nproc 16384
Grid soft nofile 65536
Grid hard nofile 65536
1.5 create users and groups and authorize
# create a user group:
Groupadd-g 501 oinstall
Groupadd-g 502 dba
Groupadd-g 503 oper
Groupadd-g 504 asmadmin
Groupadd-g 505 asmdba
Groupadd-g 506 asmoper
# create a user:
Useradd-u 501-g oinstall-G asmadmin,asmdba,asmoper grid
Useradd-u 502-g oinstall-G dba,oper,asmdba oracle
# modify user password
Passwd oracle
Passwd grid
1.6 configure oracle and grid user environment variables
Node-grid user environment variable ($HOME/.bash_profile)
Export ORACLE_SID=+ASM1
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/app/19.0.0/grid/product/db_1
Export PATH=$PATH:$ORACLE_HOME/bin
Node-oracle user environment variable ($HOME/.bash_profile)
Export ORACLE_SID=rac1
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib
Export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$HOME/dba
Umask 022
Export TNS_ADMIN=/u01/app/19.0.0/grid/product/db_1/network/admin
Node 2 grid user environment variable ($HOME/.bash_profile)
Export ORACLE_SID=+ASM2
Export ORACLE_BASE=/u01/app/grid
Export ORACLE_HOME=/u01/app/19.0.0/grid/product/db_1
Export PATH=$PATH:$ORACLE_HOME/bin
Node two oracle user environment variable ($HOME/.bash_profile)
Export ORACLE_SID=rac2
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
Export LD_LIBRARY_PATH=$ORACLE_HOME/lib
Export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$HOME/dba
Umask 022
Export TNS_ADMIN=/u01/app/19.0.0/grid/product/db_1/network/admin
1.7 create the necessary directories
Mkdir-p / u01/app/grid
Mkdir-p / U01 / app/19.0.0/grid/ product/db_1
Mkdir-p / U01 / app/oracle
Mkdir-p / U01 / app/oracle/product/19.0.0/db_1
Mkdir-p / U01 / app/oraInventory
Chown-R grid:oinstall / U01 / app
Chown-R oracle:oinstall / U01 / app/oracle
Chmod-R 775 / U01 / app
1.8 configure multipathing and udev
Get disk wwid: sdc / queue/scheduler
Temporary adjustment:
Echo deadline > / sys/block/ sdc / queue/scheduler
All disks are adjusted permanently:
1.11 configure mutual trust
Can be configured directly through the graphical interface
You can also execute the following script to configure
. / sshUserSetup.sh-user-hosts ""-advanced-noPromptPassphrase
The script path is: under the decompressed oui/prov/resources/scripts
1.12 shut down Transparent HugePages
View current configuration
Cat / sys/kernel/mm/transparent_hugepage/enabled
Modify the file: / etc/default/grub
Add: transparent_hugepage=never to the GRUB_CMDLINE_LINUX parameter, for example:
RUB_TIMEOUT=5
GRUB_DISTRIBUTOR= "$(sed's, release. * $, g' / etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT= "console"
GRUB_CMDLINE_LINUX= "crashkernel=auto rhgb quiet numa=off transparent_hugepage=never"
GRUB_DISABLE_RECOVERY= "true"
Then save and exit
Run the grub2-mkconfig command to regenerate the grub.cfg file.
Grub2-mkconfig-o / boot/grub2/grub.cfg
Restart the operating system and verify that the configuration is in effect.
II. Graphical interface installation
1. Decompress and start installing grid software
Unzip LINUX.X64_193000_grid_home.zip-d $ORACLE_HOME
Cd $ORACLE_HOME
. / grid Setup.sh
two。 Decompress and install database software
Unzip LINUX.X64_193000_db_home.zip-d $ORACLE_HOME
Cd $ORACLE_HOME
. / run Install er
3. Execute DBCA to create a database instance