1. Install the necessary packages
forPkginch 'binutils' 'Compat-libcap1' 'compat-libstdc++-33' 'GCC' 'gcc-c++' 'glibc' 'Glibc-devel' 'Ksh' 'Libaio' 'Libaio-devel' 'LIBGCC' 'libstdc++' 'Libstdc++-devel' 'Libxi' 'libxtst' ' Make' 'Sysstat' Dorpm-qa |grep$pkgif[$?-ne0] ; Then sudo Yum Install$pkg-yElse Echo$PKG \ t >>"has been installed" fi Done
2. Close Memory Transparent Large page
echo "Transparent_hugepage=never" >> sudo/etc/grub2.cfg
3. Create user groups and users
Groupadd-g54321Oinstall;groupadd-G54322Dba;groupadd-G54323Oper;groupadd-G54324Backupdba;groupadd-G54325Dgdba;groupadd-G54326Kmdba;groupadd-G54327Asmdba;groupadd-G54328Asmoper;groupadd-G54329Asmadmin;useradd-U54321-G oinstall-g dba,asmdba,backupdba,dgdba,kmdba-s/bin/bash-d/home/Oracle OracleEcho "1"|sudo passwd--stdin Oracle
4.
Chown-r Oracle:oinstall/oracle/oradata
chmod 755/oracle/oradata
5. Configure environment Variables Oracle_base oracle_home oracle_sid ld_library_path
Echo-e "Oracle_base=/oracle\noracle_home=\ $ORACLE _base/product/12.1.0/db_1\n\
Oracle_sid=zheng\npath=\ $PATH: \ $ORACLE _home/bin\n\
Ld_library_path= $ORACLE _home/lib:/usr/lib\n
Export oracle_base oracle_home oracle_sid PATH ld_library_path ">>.bash_profile
6.
Unzip oracle12c.zip-d/tmp
chmod +x/tmp/database
/tmp/database/runinstaller
CentOS7.2 using the shell to install oracle12c