Preparation: Upload the Oracle installation software to the Linux system/mnt directory via the FTP tool and unzip the software via the unzip command.
--------------------------------------------------------------------------------------------------------------- ---------------------------------------------
1, create the Oracle GUI pre-installation (root user action), as follows:
[Email protected] ~]# cd/mnt
[Email protected] mnt]# vim Oracleinstall
--After entering the above command, press "I", and enter the following, click "Esc" key, enter ": Wq" and return to save. Where the #1.create groups and Users section modifies the specific environment variable value according to the actual situation.
#!/bin/bash
#Purpose: Create and config Oracle install.
#Usage: Log on as the superuser (' root ')
Groupadd DBA-G 111
Groupadd Oinstall-g 110
Useradd oracle-u 110-g 110-g 111
echo "Oracle" | passwd--stdin Oracle
echo "Export tmp=/tmp" >>/home/oracle/.bash_profile
Echo ' Export tmpdir= $TMP ' >>/home/oracle/.bash_profile
echo "Export Oracle_hostname=localhost.localdomain" >>/home/oracle/.bash_profile
echo "Export ORACLE_SID=ORCL" >>/home/oracle/.bash_profile
echo "Export oracle_base=/u01/app/oracle" >>/home/oracle/.bash_profile
Echo ' Export oracle_home= $ORACLE _base/product/11.2.0/dbhome_1 ' >>/home/oracle/.bash_profile
Echo ' Export path=/usr/sbin: $PATH ' >>/home/oracle/.bash_profile
Echo ' Export path= $ORACLE _home/bin: $PATH ' >>/home/oracle/.bash_profile
Echo ' Export ld_library_path= $ORACLE _home/lib:/lib:/usr/lib ' >>/home/oracle/.bash_profile
Echo ' Export classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib ' >>/home/oracle/.bash_ Profile
echo "Export Lang=en_us" >>/home/oracle/.bash_profile
echo "Export Nls_lang=american_america. Al32utf8 ">>/home/oracle/.bash_profile
echo "Export nls_date_format= ' yyyy-mm-dd hh24:mi:ss '" >>/home/oracle/.bash_profile
Mkdir-p/u01
Mkdir-p/u01/app
Mkdir-p/u01/app/oracle
Chown-r oracle:oinstall/u01
Chown-r Oracle:oinstall/u01/app
Chown-r oracle:oinstall/u01/app/oracle
Cp/etc/security/limits.conf/etc/security/limits.conf.bak
echo "Oracle soft Nproc 2047" >>/etc/security/limits.conf
echo "Oracle hard Nproc 16384" >>/etc/security/limits.conf
echo "Oracle Soft nofile 1024x768" >>/etc/security/limits.conf
echo "Oracle hard Nofile 65536" >>/etc/security/limits.conf
Cp/etc/pam.d/login/etc/pam.d/login.bak
echo "Session required/lib/security/pam_limits.so" >>/etc/pam.d/login
echo "Session required pam_limits.so" >>/etc/pam.d/login
Cp/etc/profile/etc/profile.bak
Echo ' if [$USER = ' Oracle ']; Then ' >>/etc/profile
Echo ' if [$SHELL = '/bin/ksh ']; Then ' >>/etc/profile
Echo ' ulimit-p 16384 ' >>/etc/profile
Echo ' ulimit-n 65536 ' >>/etc/profile
Echo ' Else ' >>/etc/profile
Echo ' ulimit-u 16384-n 65536 ' >>/etc/profile
Echo ' fi ' >>/etc/profile
Echo ' fi ' >>/etc/profile
Cp/etc/sysctl.conf/etc/sysctl.conf.bak
echo "FS.AIO-MAX-NR = 1048576" >>/etc/sysctl.conf
echo "Fs.file-max = 6815744" >>/etc/sysctl.conf
echo "Kernel.shmall = 2097152" >>/etc/sysctl.conf
echo "Kernel.shmmax = 4294967295" >>/etc/sysctl.conf
echo "Kernel.shmmni = 4096" >>/etc/sysctl.conf
echo "Kernel.sem = 32000" >>/etc/sysctl.conf
echo "Net.ipv4.ip_local_port_range = 9000 65500" >>/etc/sysctl.conf
echo "Net.core.rmem_default = 262144" >>/etc/sysctl.conf
echo "Net.core.rmem_max = 4194304" >>/etc/sysctl.conf
echo "Net.core.wmem_default = 262144" >>/etc/sysctl.conf
echo "Net.core.wmem_max = 1048586" >>/etc/sysctl.conf
echo "Net.ipv4.tcp_wmem = 262144 262144 262144" >>/etc/sysctl.conf
echo "Net.ipv4.tcp_rmem = 4194304 4194304 4194304" >>/etc/sysctl.conf
Sysctl-p
--------------------------------------------------------------------------------------------------------------- ---------------------------------------------
2, the root user under the data xhost + and enter, as follows:
[Email protected] mnt]# Xhost +
--------------------------------------------------------------------------------------------------------------- ---------------------------------------------
3, switch to the Oracle user, and enter the database installation software directory, execute the./runinstall command, Follow the Windows platform installation steps after the graphical interface is available (the only difference between installing an Oracle database with the Windows platform is to execute 2 scripts with root privileges), where the graphical installation interface is slightly.
Note: Prerequisite check steps require prerequisite processing based on failed conditions.
Install Oracle database with one click