Centos7_minimal silent installation of Oracle 12c version

Source: Internet
Author: User
Tags dba sqlplus

centos7_minimal silent installation of Oracle 12c version


1. Check the system version

[Email protected] ~]# cat/etc/redhat-release CentOS Linux release 7.4.1708 (Core)


2. Turn off SELinux

[Email protected] ~]# sed-i ' s/selinux=enforcing/selinux=disabled/g '/etc/selinux/config[[email protected] ~]# Getenforce Disabled


3. Turn off the firewall

[Email protected] ~]# Systemctl stop Firewalld


4. Modify host name and Hosts file

[Email protected] ~]# cat/etc/hostname oracle[[email protected] ~]# cat/etc/hostsoracle 172.18.135.72


5. Upgrading the System

[email protected] ~]# Yum update-y


6. Installing the dependency package and the Java environment

[[Email protected] ~] #yum-y install binutils compat-libstdc++ compat-libstdc++-33 elfutils-libelf-devel gcc gcc-c++ glib C-devel glibc-headers ksh libaio-devel libstdc++-devel make Sysstat unixodbc-devel binutils-* compat-libstdc++* elfutils-libelf* glibc* gcc-* libaio* libgcc* libstdc++* make* sysstat* unixodbc* wget unzip[[email protected] ~]# yum-y Install java-1.8.0-openjdk*


7. Create USER, Group

[[email protected] ~]# groupadd oinstall[[email protected] ~]# groupadd dba[[email protected] ~]# useradd-g oinstall-g D BA Oracle[[email protected] ~]# passwd oraclechanging password for user Oracle. New Password:bad password:the password is shorter than 8 Charactersretype new Password:passwd:all Authentication token s updated successfully. [[email protected] ~]# ID oracleuid=1004 (Oracle) gid=1005 (oinstall) groups=1005 (Oinstall), 1006 (DBA)


8. Create the Software installation directory and assign permissions

[Email protected] ~]# mkdir-p/opt/oracle$oracle_base[[email protected] ~]# mkdir-p/opt/oracle/12c$oracle_home[[ Email protected] ~]# mkdir/opt/oracle/oradata data storage directory [[email protected] ~]# mkdir/opt/oracle/inventory Inventory directory [[email] Protected] ~]# mkdir/opt/oracle/flash_recovery_area Data Recovery directory [[email protected] ~]# chown-r oracle:oinstall/opt/oracle[[ Email protected] ~]# chmod-r 775/opt/oracle


9. Modifying system parameters

[Email protected] ~]# vim/etc/sysctl.conf

Fs.file-max = 6815744kernel.sem = 32000 128kernel.shmmni = 4096kernel.shmall = 1073741824kernel.shmmax = 439804651 1104net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048576FS.AIO-MAX-NR = 1048576net.ipv4.ip_local_port_range = 9000 65500

[[email protected] ~]# sysctl-p (start effective)


10. Modify User restriction files

[Email protected] ~]# vim/etc/security/limits.conf

Oracle Soft Nofile 1024oracle hard nofile 65536oracle soft nproc 2047oracle hard Nproc 16384orac Le soft stack 10240oracle hard stack 32768


11. Association Settings

[Email protected] ~]# Vi/etc/pam.d/login

Session Required/lib64/security/pam_limits.sosession Required Pam_limits.so


12. Setting Environment variables

[Email protected] ~]# Vim/etc/profile

if [$USER = "Oracle"]; Then if [$SHELL = "/bin/ksh"];        Then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 Fifi

[[email protected] ~]# source/etc/profile (execution)


13. Configure Oracle User Environment variables (toggle Oracle user)

[[email protected] ~]$ vim. Bash_profile

# for oracleexport oracle_base=/opt/oracleexport oracle_home=/opt/oracle/12cexport  Oracle_sid=orclexport path= $PATH: $HOME/bin: $ORACLE _home/binexport ld_library_path= $ORACLE _home/lib:/ usr/libif [  $USER  =  "Oracle"  ]; then         if [  $SHELL  =  "/bin/ksh"  ]; then                 ulimit -p 16384                 ulimit -n 65536         else                 ulimit -u 16384 -n 65536         fi                umask  022fi

[[email protected] ~]$ source. bash_profile


14. Download the Oracle 12c version of the installation package and upload it to the/opt/oracle directory.

[Email protected] oracle]$ pwd/opt/oracle[[email protected] oracle]$ ls12c Flash_recovery_area inventory linuxamd64_1 2102_database_1of2.zip Linuxamd64_12102_database_2of2.zip Oradata


15. Next Extract with Oracle user

[Email protected] oracle]$ unzip linuxamd64_12102_database_1of2.zip [[email protected] oracle]$ Unzip linuxamd64_12102 _database_2of2.zip


16. When the decompression is complete, you can see that the directory/opt/oracle/database/response has 3 answer files

Separate database installation files, establish database instances, and listen for configuration installation files

[[email protected] oracle]$ ll/opt/oracle/database/response/total 112-rwxrwxr-x 1 Oracle oinstall 74822 APR 4 DBCA . rsp-rw-rw-r--1 Oracle Oinstall 25036 Jul 7 db_install.rsp-rwxrwxr-x 1 Oracle oinstall 6038 Jan netca.rs P[[email protected] oracle]$


17. Modify the database installation file DB_INSTALL.RSP

[Email protected] oracle]$ VIM/OPT/ORACLE/DATABASE/RESPONSE/DB_INSTALL.RSP

oracle.install.option=install_db_swonly    #安装类型ORACLE_HOSTNAME =oracle  #主机名称UNIX_GROUP_NAME =oinstall  #安装组INVENTORY_LOCATION =/opt/oracle/inventory  #清单目录SELECTED_LANGUAGES =en,zh_cn # Select language oracle_home=/opt/oracle/12c/  # oracle_homeoracle_base=/opt/oracle   #oracle_ baseoracle.install.db.installedition=ee   #oracle版本oracle. install.db.dba_group=dba  # The DBA user group oracle.install.db.oper_group=oinstall   #oper用户组oracle. install.db.backupdba_group= Dbaoracle.install.db.dgdba_group=dbaoracle.install.db.kmdba_group=dbaoracle.install.db.config.starterdb.type= general_purpose   #数据库类型oracle. install.db.config.starterdb.globaldbname=orcl # globaldbnameoracle.install.db.config.starterdb.sid=orcl # sidoracle.install.db.config.starterdb.memorylimit=81920    #自动管理内存的最小内存 (M) oracle.install.db.config.starterdb.password.all=oracle   #设定所有数据库用户使用同一个密码DECLINE_SECURITY_UPDATES = true   #设置安全Update 


18. Start the installation, wait a bit long, you can view the background log installation process, Tail-f log, the installation process has a warning can be ignored, such as the installation is successful, according to the diagram operation

[Email protected] ~]$ Cd/opt/oracle/database/[[email protected] database]$./runinstaller-silent-responsefile/opt/ Oracle/database/response/db_install.rsp-ignoreprereq


19. Switch the root user to execute the script, then go back to the Oracle user press ENTER to


20. View the default listening file and install the listening answer file

[Email protected] ~]$ VIM/OPT/ORACLE/DATABASE/RESPONSE/NETCA.RSP

Install_type= "Custom" "Installed type Listener_number=1 listener number listener_names={" LISTENER "} Listener Name list listener_protocols={" TCP; 1521 "} The list of communication protocols used by the listener listener_start=" LISTENER "" Listener startup Name

[Email protected] ~]$ NETCA/SILENT/RESPONSEFILE/OPT/ORACLE/DATABASE/RESPONSE/NETCA.RSP


21. After successful execution of the above command, the Listener.ora and Sqlnet.ora files are generated in/opt/oracle/12c/network/admin

[Email protected] ~]$ ls/opt/oracle/12c/network/admin/

Listener.ora Samples Shrept.lst Sqlnet.ora


22. After the installation is complete, you can see if port 1521 is up

[Email protected] ~]$ NETSTAT-TULNP |grep 1521


23. Add a DB instance, modify the Dbca.rsp file

[Email protected] ~]$ VIM/OPT/ORACLE/DATABASE/RESPONSE/DBCA.RSP

Responsefile_version = "12.1.0" #默认OPERATION_TYPE = "CreateDatabase" #默认GDBNAME = "ORCL" #数据库名字SID = "ORCL" #对应的实例名TE  Mplatename = "General_purpose.dbc" #默认SYSPASSWORD = "Oracle" #sys密码SYSTEMPASSWORD = "Oracle" #system密码DBSNMPPASSWORD = "Oracle" #dbs密码DATAFILEDESTINATION =/opt/oracle/oradata #清单目录RECOVERYAREADESTINATION =/opt/oracle/flash_recovery_ Area #恢复数据目录CHARACTERSET = "Al32utf8" #字符集, IMPORTANT!!! General cannot change after building a library


24. Performing a DB instance installation

[Email protected] ~]$ cd/opt/oracle/12c/bin/

[Email protected] bin]$ DBCA-SILENT-RESPONSEFILE/OPT/ORACLE/DATABASE/RESPONSE/DBCA.RSP


25. View the instance process, listening status

[Email protected] bin]$ ps-ef |grep ora_ |grep-v grep




26. View instance Status

[Email protected] ~]$ Sqlplus/as SYSDBA



Some of the 27.oracle commands

To open the Racle service:

$dbstart

$lsnrctl start

$sqlplus/as SYSDBA

Sql>startup

To turn off Oracle services:

$dbshut

$lsnrctl stop

$sqlplus/as SYSDBA

Sql>shutdown/shutdown Immediate




Centos7_minimal silent installation of Oracle 12c version

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.