├── .gitignore ├── modules └── oracle │ ├── files │ └── CVU_11.2.0.1.0_vagrant │ │ ├── fixup.enable │ │ ├── fixup │ │ └── oracle │ │ │ ├── fixup.enable │ │ │ └── fixup.response │ │ ├── exectask │ │ ├── cvuqdisk-1.0.7-1.rpm │ │ ├── fixup.response │ │ ├── exectask.sh │ │ ├── orarun.log │ │ ├── runfixup.sh │ │ └── orarun.sh │ ├── templates │ ├── ora.sh.erb │ ├── oracle.erb │ └── db_install_my.erb │ └── manifests │ └── init.pp ├── README.md ├── manifests └── base.pp ├── Vagrantfile └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.zip 3 | .vagrant/* 4 | *.log 5 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/fixup.enable: -------------------------------------------------------------------------------- 1 | SET_SHELL_LIMITS="true" 2 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/fixup/oracle/fixup.enable: -------------------------------------------------------------------------------- 1 | SET_SHELL_LIMITS="true" 2 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/exectask: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paykin/vagrant-oracle-11g/HEAD/modules/oracle/files/CVU_11.2.0.1.0_vagrant/exectask -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/cvuqdisk-1.0.7-1.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paykin/vagrant-oracle-11g/HEAD/modules/oracle/files/CVU_11.2.0.1.0_vagrant/cvuqdisk-1.0.7-1.rpm -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/fixup.response: -------------------------------------------------------------------------------- 1 | FILE_OPEN_MAX_HARDLIMIT="65536" 2 | INSTALL_USER="vagrant" 3 | MAX_PROCESSES_HARDLIMIT="16384" 4 | MAX_PROCESSES_SOFTLIMIT="2047" 5 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/fixup/oracle/fixup.response: -------------------------------------------------------------------------------- 1 | FILE_OPEN_MAX_HARDLIMIT="65536" 2 | INSTALL_USER="vagrant" 3 | MAX_PROCESSES_HARDLIMIT="16384" 4 | MAX_PROCESSES_SOFTLIMIT="2047" 5 | -------------------------------------------------------------------------------- /modules/oracle/templates/ora.sh.erb: -------------------------------------------------------------------------------- 1 | export ORACLE_HOME=<%= @ORACLE_HOME %> 2 | export ORACLE_HOME_LISTNER=$ORACLE_HOME 3 | export PATH=$PATH:$ORACLE_HOME/bin 4 | 5 | export ORACLE_SID=<%= @SID %> 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vagrant-oracle-11g 2 | ================== 3 | 4 | Vagrant script to install Oracle Database 11g. 5 | 6 | Detailed instructions are at [http://java.paykin.info/install-oracle-database-vagrant-puppet/](http://java.paykin.info/install-oracle-database-vagrant-puppet/). 7 | -------------------------------------------------------------------------------- /manifests/base.pp: -------------------------------------------------------------------------------- 1 | node oracle { 2 | 3 | require oracle::swap 4 | 5 | class {'oracle::server': 6 | oracle_user => "oracle", 7 | dba_group => "dba", 8 | sid => "orcl", 9 | oracle_root => "/oracle", 10 | password => "password", 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/exectask.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved. 4 | 5 | # Build: 110804 6 | 7 | DIRNAME=`dirname $0` 8 | 9 | PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin 10 | export PATH 11 | exec $DIRNAME/exectask "$@" 12 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/orarun.log: -------------------------------------------------------------------------------- 1 | This is the log file for orarun script 2 | Timestamp: 092813141012 3 | Response file being used is :/vagrant/modules/oracle/files/CVU_11.2.0.1.0_vagrant/fixup.response 4 | Enable file being used is :/vagrant/modules/oracle/files/CVU_11.2.0.1.0_vagrant/fixup.enable 5 | Setting Shell limits ... 6 | Max processes hard limit in response file:16384 7 | Max processes softlimit in response file: 2047 8 | File open max hard limit in response file:65536 9 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/runfixup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Header: opsm/cvutl/runfixup.sh /main/3 2008/7/07 17:45:45 nvira Exp $ 4 | # 5 | # runfixup.sh 6 | # 7 | # Copyright (c) 2007, 2008, Oracle. All rights reserved. 8 | # 9 | # NAME 10 | # runfixup.sh - This script is used to run fixups on a node 11 | # 12 | # DESCRIPTION 13 | # 14 | # 15 | # NOTES 16 | # 17 | # 18 | # MODIFIED (MM/DD/YY) 19 | # nvira 06/24/08 - remove sudo 20 | # dsaggi 05/29/08 - remove orarun.log before invocation 21 | # dsaggi 10/24/07 - Creation 22 | # 23 | 24 | if [ -z "$ECHO" ]; then ECHO=/bin/echo; fi 25 | if [ -z "$ID" ]; then ID=/usr/bin/id; fi 26 | 27 | RUID=`$ID -u` 28 | if [ "${RUID}" != "0" ];then 29 | $ECHO "You must be logged in as root (uid=0) when running $0." 30 | exit 1 31 | fi 32 | 33 | 34 | EXEC_DIR=`dirname $0` 35 | 36 | RMF="/bin/rm -f" 37 | 38 | # Remove old orarun.log before invocation 39 | $RMF ${EXEC_DIR}/orarun.log 40 | 41 | ${EXEC_DIR}/orarun.sh ${EXEC_DIR}/fixup.response ${EXEC_DIR}/fixup.enable ${EXEC_DIR} 42 | -------------------------------------------------------------------------------- /modules/oracle/templates/oracle.erb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: 345 99 10 3 | # description: Start and stop oracle DB 4 | # processname: oradb 5 | # 6 | export ORACLE_HOME=<%= @ORACLE_HOME %> 7 | export ORACLE_HOME_LISTENER=$ORACLE_HOME 8 | export ORACLE_TRACE=Y 9 | export PATH=$ORACLE_HOME/bin:$PATH 10 | 11 | # Source function library. 12 | . /etc/rc.d/init.d/functions 13 | 14 | case "$1" in 15 | start) 16 | su - <%= @ORACLE_USER %> -c "$ORACLE_HOME/bin/lsnrctl start" 17 | su - <%= @ORACLE_USER %> -c $ORACLE_HOME/bin/dbstart 18 | ;; 19 | stop) 20 | su - <%= @ORACLE_USER %> -c $ORACLE_HOME/bin/dbshut 21 | su - <%= @ORACLE_USER %> -c "$ORACLE_HOME/bin/lsnrctl stop" 22 | ;; 23 | restart|reload) 24 | su - <%= @ORACLE_USER %> -c $ORACLE_HOME/bin/dbshut 25 | su - <%= @ORACLE_USER %> -c "$ORACLE_HOME/bin/lsnrctl stop" 26 | su - <%= @ORACLE_USER %> -c "$ORACLE_HOME/bin/lsnrctl start" 27 | su - <%= @ORACLE_USER %> -c $ORACLE_HOME/bin/dbstart 28 | ;; 29 | status) 30 | $ORACLE_HOME/bin/lsnrctl status 31 | ;; 32 | *) 33 | echo $"Usage: $0 {start|stop|restart|reload}" 34 | exit 1 35 | esac 36 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | 6 | config.vm.box = "oraclelinux-6-x86_64" 7 | config.vm.box_url = "http://cloud.terry.im/vagrant/oraclelinux-6-x86_64.box" 8 | config.vm.hostname = "oracle" 9 | 10 | config.ssh.forward_x11=true 11 | 12 | # Forward Oracle ports 13 | config.vm.network :forwarded_port, guest: 1521, host: 1521 14 | config.vm.network :forwarded_port, guest: 1158, host: 1158 15 | 16 | config.vm.provider :virtualbox do |vb| 17 | vb.customize ["modifyvm", :id, 18 | "--name", "oradb", 19 | "--memory", "2048", 20 | "--natdnshostresolver1", "on"] 21 | end 22 | 23 | config.vm.provision :shell, :inline => "sudo rm /etc/localtime && sudo ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime" 24 | 25 | config.vm.provision :shell, :inline => "sudo yum install puppet -y" 26 | 27 | config.vbguest.auto_update = false 28 | 29 | config.vm.provision :puppet do |puppet| 30 | puppet.manifests_path = "manifests" 31 | puppet.module_path = "modules" 32 | puppet.manifest_file = "base.pp" 33 | puppet.options = "--verbose --trace" 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /modules/oracle/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class oracle::server ( 2 | $oracle_user = "oracle", # User to run Oracle DB 3 | $dba_group = "dba", # User group for user that runs Oracle DB 4 | $sid = "orcl", # SID for Oracle database 5 | $oracle_root = "/oradb", # Where install database 6 | $password = "password" # SYS and SYSDBA password 7 | ) { 8 | 9 | # Derived parameters - do not change 10 | $ORACLE_USER = "$oracle_user" 11 | $DBA_GROUP = "$dba_group" 12 | $SID = "$sid" 13 | $ORACLE_ROOT = "$oracle_root" 14 | $PASSWORD = "$password" 15 | $ORACLE_BASE = "$ORACLE_ROOT/app/$ORACLE_USER" 16 | $ORACLE_HOME = "$ORACLE_BASE/product/11.2.0/dbhome_1" 17 | $DATA_LOCATION = "$ORACLE_BASE/oradata" 18 | $INVENTORY_LOCATION = "$ORACLE_ROOT/app/oraInventory" 19 | 20 | package { 21 | ['oracle-rdbms-server-11gR2-preinstall','unzip', 'xorg-x11-apps', 'libaio', 'glibc', 'compat-libstdc++-33','elfutils-libelf-devel', 'libaio-devel', 'libgcc', 'libstdc++', 'unixODBC', 'unixODBC-devel', 'ksh']: 22 | ensure => installed; 23 | } 24 | 25 | group{ 26 | ["$DBA_GROUP", 'oinstall'] : 27 | ensure => present; 28 | } 29 | 30 | user { 31 | "vagrant": 32 | groups => ["$DBA_GROUP"], 33 | require => Group["$DBA_GROUP"]; 34 | 35 | "$ORACLE_USER": 36 | groups => ["$DBA_GROUP"], 37 | gid => 'oinstall', 38 | password => sha1($ORACLE_USER), 39 | ensure => present, 40 | require => Group["$DBA_GROUP", 'oinstall'] 41 | } 42 | 43 | file { 44 | "/etc/profile.d/ora.sh": 45 | mode => 0777, 46 | content => template("oracle/ora.sh.erb"); 47 | 48 | ["$ORACLE_ROOT", "$ORACLE_ROOT/tmp"]: 49 | ensure => "directory", 50 | owner => "$ORACLE_USER", 51 | group => "$DBA_GROUP", 52 | mode => 0770, 53 | require=> Group["$DBA_GROUP"]; 54 | 55 | "$ORACLE_ROOT/tmp/db_install_my.rsp": 56 | content => template("oracle/db_install_my.erb"), 57 | owner => "$ORACLE_USER", 58 | group => "$DBA_GROUP"; 59 | 60 | "/etc/init.d/oracle": 61 | mode => 0777, 62 | content => template("oracle/oracle.erb"); 63 | 64 | } 65 | 66 | 67 | exec { 68 | "kernelprops": 69 | command => "/vagrant/modules/oracle/files/CVU_11.2.0.1.0_vagrant/runfixup.sh", 70 | user => root; 71 | 72 | "unzip part1": 73 | command => "/usr/bin/unzip /vagrant/modules/oracle/files/linux.x64_11gR2_database_1of2.zip -d $ORACLE_ROOT/tmp", 74 | cwd => "$ORACLE_ROOT/tmp", 75 | require => Package['unzip'], 76 | creates => "$ORACLE_ROOT/tmp/database", 77 | user => "vagrant"; 78 | 79 | "unzip part2": 80 | command => "/usr/bin/unzip /vagrant/modules/oracle/files/linux.x64_11gR2_database_2of2.zip -d $ORACLE_ROOT/tmp", 81 | cwd => "$ORACLE_ROOT/tmp", 82 | require => Exec['unzip part1'], 83 | creates => "$ORACLE_ROOT/tmp/database/stage/Components/oracle.jdk/1.5.0.17.0/1/DataFiles", 84 | user => "vagrant"; 85 | 86 | "install" : 87 | command => "/bin/sh -c '$ORACLE_ROOT/tmp/database/runInstaller -silent -waitforcompletion -ignorePrereq -responseFile $ORACLE_ROOT/tmp/db_install_my.rsp'", 88 | cwd => "$ORACLE_ROOT/tmp/database", 89 | timeout => 0, 90 | returns => [0, 3], 91 | require => [File["$ORACLE_ROOT/tmp/db_install_my.rsp", "$ORACLE_ROOT", '/etc/profile.d/ora.sh'], Exec['unzip part2','kernelprops']], 92 | creates => "$ORACLE_BASE", 93 | user => "$ORACLE_USER"; 94 | 95 | "post-install 1": 96 | command => "$INVENTORY_LOCATION/orainstRoot.sh", 97 | user => root, 98 | require=>Exec['install']; 99 | 100 | "post-install 2": 101 | command => "$ORACLE_HOME/root.sh", 102 | user => root, 103 | require=>Exec['post-install 1']; 104 | 105 | "autostart": 106 | command => "/sbin/chkconfig --level 345 oracle on", 107 | user => root, 108 | require=>[Exec['post-install 2'], File['/etc/init.d/oracle', '/etc/profile.d/ora.sh']]; 109 | 110 | "autostart 2": 111 | command => "/bin/sed -i 's/:N$/:Y/g' /etc/oratab", 112 | user => root, 113 | require=>Exec['autostart']; 114 | } 115 | 116 | service { 117 | "oracle": 118 | ensure => "running", 119 | require => [Exec["autostart 2"]]; 120 | } 121 | } 122 | 123 | 124 | class oracle::swap { 125 | exec { 126 | "create swapfile": 127 | # Needs to be 2 times the memory 128 | command => "/bin/dd if=/dev/zero of=/swapfile bs=1M count=2048", 129 | user => root, 130 | creates => "/swapfile"; 131 | "set up swapfile": 132 | command => "/sbin/mkswap /swapfile", 133 | require => Exec["create swapfile"], 134 | user => root, 135 | unless => "/usr/bin/file /swapfile | grep 'swap file' 2>/dev/null"; 136 | "enable swapfile": 137 | command => "/sbin/swapon /swapfile", 138 | require => Exec["set up swapfile"], 139 | user => root, 140 | unless => "/bin/cat /proc/swaps | grep '^/swapfile' 2>/dev/null"; 141 | "add swapfile entry to fstab": 142 | command => "/bin/echo >>/etc/fstab /swapfile swap swap defaults 0 0", 143 | user => root, 144 | unless => "/bin/grep '^/swapfile' /etc/fstab 2>/dev/null"; 145 | } 146 | 147 | file { 148 | "/swapfile": 149 | mode => 600, 150 | owner => root, 151 | group => root, 152 | require => Exec['create swapfile']; 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /modules/oracle/templates/db_install_my.erb: -------------------------------------------------------------------------------- 1 | 2 | #------------------------------------------------------------------------------- 3 | # Do not change the following system generated value. 4 | #------------------------------------------------------------------------------- 5 | oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 6 | 7 | #------------------------------------------------------------------------------- 8 | # The installation option can be one of the following 9 | # 1. INSTALL_DB_SWONLY 10 | # 2. INSTALL_DB_AND_CONFIG 11 | # 3. UPGRADE_DB 12 | #------------------------------------------------------------------------------- 13 | oracle.install.option=INSTALL_DB_AND_CONFIG 14 | 15 | #------------------------------------------------------------------------------- 16 | # This variable holds the hostname of the system as set by the user. 17 | # It can be used to force the installation to use an alternative 18 | # hostname rather than using the first hostname found on the system 19 | # (e.g., for systems with multiple hostnames and network interfaces). 20 | #------------------------------------------------------------------------------- 21 | ORACLE_HOSTNAME=localhost 22 | 23 | #------------------------------------------------------------------------------- 24 | # Unix group to be set for the inventory directory. 25 | #------------------------------------------------------------------------------- 26 | #UNIX_GROUP_NAME=dba 27 | UNIX_GROUP_NAME=<%= @DBA_GROUP %> 28 | 29 | #------------------------------------------------------------------------------- 30 | # Inventory location. 31 | #------------------------------------------------------------------------------- 32 | #INVENTORY_LOCATION=/oracle/app/oraInventory 33 | INVENTORY_LOCATION=<%= @INVENTORY_LOCATION %> 34 | 35 | #------------------------------------------------------------------------------- 36 | # Specify the languages in which the components will be installed. 37 | # 38 | # en : English ja : Japanese 39 | # fr : French ko : Korean 40 | # ar : Arabic es : Latin American Spanish 41 | # bn : Bengali lv : Latvian 42 | # pt_BR: Brazilian Portuguese lt : Lithuanian 43 | # bg : Bulgarian ms : Malay 44 | # fr_CA: Canadian French es_MX: Mexican Spanish 45 | # ca : Catalan no : Norwegian 46 | # hr : Croatian pl : Polish 47 | # cs : Czech pt : Portuguese 48 | # da : Danish ro : Romanian 49 | # nl : Dutch ru : Russian 50 | # ar_EG: Egyptian zh_CN: Simplified Chinese 51 | # en_GB: English (Great Britain) sk : Slovak 52 | # et : Estonian sl : Slovenian 53 | # fi : Finnish es_ES: Spanish 54 | # de : German sv : Swedish 55 | # el : Greek th : Thai 56 | # iw : Hebrew zh_TW: Traditional Chinese 57 | # hu : Hungarian tr : Turkish 58 | # is : Icelandic uk : Ukrainian 59 | # in : Indonesian vi : Vietnamese 60 | # it : Italian 61 | # 62 | # Example : SELECTED_LANGUAGES=en,fr,ja 63 | #------------------------------------------------------------------------------- 64 | SELECTED_LANGUAGES=en 65 | 66 | #------------------------------------------------------------------------------- 67 | # Complete path of the Oracle Home 68 | #------------------------------------------------------------------------------- 69 | #ORACLE_HOME=/oracle/app/vagrant/product/11.2.0/dbhome_1 70 | ORACLE_HOME=<%= @ORACLE_HOME %> 71 | 72 | #------------------------------------------------------------------------------- 73 | # Complete path of the Oracle Base. 74 | #------------------------------------------------------------------------------- 75 | #ORACLE_BASE=/oracle/app/vagrant 76 | ORACLE_BASE=<%= @ORACLE_BASE %> 77 | 78 | #------------------------------------------------------------------------------- 79 | # Installation Edition of the component. 80 | # 81 | # The value should contain only one of these choices. 82 | # EE : Enterprise Edition 83 | # SE : Standard Edition 84 | # SEONE : Standard Edition One 85 | # PE : Personal Edition (WINDOWS ONLY) 86 | #------------------------------------------------------------------------------- 87 | oracle.install.db.InstallEdition=EE 88 | 89 | #------------------------------------------------------------------------------- 90 | # This property is considered only if InstallEdition is EE. 91 | # 92 | # true : Components mentioned as part of 'customComponents' property 93 | # are considered for install. 94 | # false : Value for 'customComponents' is not considered. 95 | #------------------------------------------------------------------------------- 96 | oracle.install.db.isCustomInstall=false 97 | 98 | #------------------------------------------------------------------------------- 99 | # This property is considered only if 'IsCustomInstall' is set to true 100 | # 101 | # Description: List of Enterprise Edition Options you would like to install. 102 | # 103 | # The following choices are available. You may specify any 104 | # combination of these choices. The components you choose should 105 | # be specified in the form "internal-component-name:version" 106 | # Below is a list of components you may specify to install. 107 | # 108 | # oracle.oraolap:11.2.0.0.2 - Oracle OLAP 109 | # oracle.rdbms.dm:11.2.0.0.2 - Oracle Data Mining RDBMS Files 110 | # oracle.rdbms.dv:11.2.0.0.2 - Oracle Database Vault option 111 | # oracle.rdbms.lbac:11.2.0.0.2 - Oracle Label Security 112 | # oracle.rdbms.partitioning:11.2.0.0.2 - Oracle Partitioning 113 | # oracle.rdbms.rat:11.2.0.0.2 - Oracle Real Application Testing 114 | # oracle.clrintg.ode_net:11.2.0.0.2 - Oracle Database Extensions for .NET 1.x (Windows) 115 | # oracle.clrintg.ode_net_2:11.2.0.0.2 - Oracle Database Extensions for .NET 2.0 (Windows) 116 | #------------------------------------------------------------------------------- 117 | oracle.install.db.customComponents= 118 | 119 | #------------------------------------------------------------------------------- 120 | #oracle.install.db.DBA_GROUP=dba 121 | oracle.install.db.DBA_GROUP=<%= @DBA_GROUP %> 122 | 123 | #------------------------------------------------------------------------------- 124 | #oracle.install.db.OPER_GROUP=dba 125 | oracle.install.db.OPER_GROUP=<%= @DBA_GROUP %> 126 | 127 | #------------------------------------------------------------------------------- 128 | # This variable represents the cluster node names selected by the . 129 | # user for installation 130 | #------------------------------------------------------------------------------- 131 | oracle.install.db.CLUSTER_NODES= 132 | 133 | #------------------------------------------------------------------------------- 134 | # One of the following 135 | # - GENERAL_PURPOSE 136 | # - TRANSACTION_PROCESSING 137 | # - DATAWAREHOUSE 138 | #------------------------------------------------------------------------------- 139 | oracle.install.db.config.starterdb.type=GENERAL_PURPOSE 140 | 141 | #------------------------------------------------------------------------------- 142 | # Global Database Name 143 | #------------------------------------------------------------------------------- 144 | #oracle.install.db.config.starterdb.globalDBName=orcl 145 | oracle.install.db.config.starterdb.globalDBName=<%= @SID %> 146 | 147 | #------------------------------------------------------------------------------- 148 | # The Starter Database SID 149 | #------------------------------------------------------------------------------- 150 | #oracle.install.db.config.starterdb.SID=orcl 151 | oracle.install.db.config.starterdb.SID=<%= @SID %> 152 | 153 | #------------------------------------------------------------------------------- 154 | # Database character set 155 | # 156 | # One of the following 157 | # AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2, 158 | # EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257, 159 | # BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6, 160 | # AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8, 161 | # IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, 162 | # KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950, 163 | # ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258 164 | #------------------------------------------------------------------------------- 165 | oracle.install.db.config.starterdb.characterSet=WE8MSWIN1252 166 | #------------------------------------------------------------------------------- 167 | # Specify the total memory allocation for the database. (in MB) 168 | # Value should be at least 256 MB, and should not exceed the 169 | # total physical memory available on the system. 170 | # Example: oracle.install.db.config.starterdb.memoryLimit=40 171 | #------------------------------------------------------------------------------- 172 | oracle.install.db.config.starterdb.memoryLimit=596 173 | oracle.install.db.config.starterdb.memoryOption=true 174 | 175 | #------------------------------------------------------------------------------- 176 | # This variable controls whether to load Example Schemas onto 177 | # the starter database or not. 178 | #------------------------------------------------------------------------------- 179 | oracle.install.db.config.starterdb.installExampleSchemas=true 180 | 181 | #------------------------------------------------------------------------------- 182 | # This include enabling audit settings, configuring password 183 | # profiles and revoking some grants to public. These settings 184 | # are provided by default. You may choose to disable all. 185 | #------------------------------------------------------------------------------- 186 | oracle.install.db.config.starterdb.enableSecuritySettings=false 187 | 188 | #------------------------------------------------------------------------------- 189 | #oracle.install.db.config.starterdb.password.ALL=jnjnuh 190 | oracle.install.db.config.starterdb.password.ALL=<%= @PASSWORD %> 191 | 192 | #------------------------------------------------------------------------------- 193 | #oracle.install.db.config.starterdb.password.SYS=jnjnuh 194 | oracle.install.db.config.starterdb.password.SYS=<%= @PASSWORD %> 195 | 196 | #------------------------------------------------------------------------------- 197 | #oracle.install.db.config.starterdb.password.SYSTEM=jnjnuh 198 | oracle.install.db.config.starterdb.password.SYSTEM=<%= @PASSWORD %> 199 | 200 | #------------------------------------------------------------------------------- 201 | oracle.install.db.config.starterdb.password.SYSMAN= 202 | 203 | #------------------------------------------------------------------------------- 204 | oracle.install.db.config.starterdb.password.DBSNMP= 205 | 206 | #------------------------------------------------------------------------------- 207 | # Can be one of the following 208 | # 1. GRID_CONTROL 209 | # 2. DB_CONTROL 210 | # 211 | oracle.install.db.config.starterdb.control=DB_CONTROL 212 | 213 | #------------------------------------------------------------------------------- 214 | # Determines the Management Service to use if Grid Control 215 | # is selected to manage the database. 216 | #------------------------------------------------------------------------------- 217 | oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL= 218 | 219 | #------------------------------------------------------------------------------- 220 | # Determines whether to receive email notification for 221 | # critical alerts when using DB control. 222 | #------------------------------------------------------------------------------- 223 | oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false 224 | 225 | #------------------------------------------------------------------------------- 226 | oracle.install.db.config.starterdb.dbcontrol.emailAddress= 227 | 228 | #------------------------------------------------------------------------------- 229 | oracle.install.db.config.starterdb.dbcontrol.SMTPServer= 230 | 231 | #------------------------------------------------------------------------------- 232 | oracle.install.db.config.starterdb.automatedBackup.enable=false 233 | 234 | #------------------------------------------------------------------------------- 235 | oracle.install.db.config.starterdb.automatedBackup.osuid= 236 | 237 | #------------------------------------------------------------------------------- 238 | oracle.install.db.config.starterdb.automatedBackup.ospwd= 239 | 240 | #------------------------------------------------------------------------------- 241 | # Can be one of the following 242 | # - FILE_SYSTEM_STORAGE 243 | # - ASM_STORAGE 244 | #------------------------------------------------------------------------------- 245 | oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE 246 | 247 | #------------------------------------------------------------------------------- 248 | # Database file location: 249 | # directory for datafiles, control files, redo logs. 250 | # 251 | # Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE 252 | #------------------------------------------------------------------------------- 253 | #oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/oracle/app/vagrant/oradata 254 | oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=<%= @DATA_LOCATION %> 255 | 256 | #------------------------------------------------------------------------------- 257 | # Backup and recovery location 258 | # 259 | # Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE 260 | #------------------------------------------------------------------------------- 261 | oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation= 262 | 263 | #------------------------------------------------------------------------------- 264 | # Name of ASM disk group to be used for storage. 265 | # 266 | # Applicable only when oracle.install.db.config.starterdb.storageType=ASM_STORAGE 267 | #------------------------------------------------------------------------------- 268 | oracle.install.db.config.asm.diskGroup= 269 | 270 | #------------------------------------------------------------------------------- 271 | # Password for ASMSNMP user of the ASM instance. 272 | # 273 | # Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE 274 | #------------------------------------------------------------------------------- 275 | oracle.install.db.config.asm.ASMSNMPPassword= 276 | 277 | #------------------------------------------------------------------------------ 278 | # Specify the My Oracle Support Account Username. 279 | # 280 | # Example : MYORACLESUPPORT_USERNAME=metalink 281 | #------------------------------------------------------------------------------ 282 | MYORACLESUPPORT_USERNAME= 283 | 284 | #------------------------------------------------------------------------------ 285 | # Specify the My Oracle Support Account Username password. 286 | # 287 | # Example : MYORACLESUPPORT_PASSWORD=password 288 | #------------------------------------------------------------------------------ 289 | MYORACLESUPPORT_PASSWORD= 290 | 291 | #------------------------------------------------------------------------------ 292 | # Specify whether to enable the user to set the password for 293 | # My Oracle Support credentials. The value can be either true or false. 294 | # If left blank it will be assumed to be false. 295 | # 296 | # Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true 297 | #------------------------------------------------------------------------------ 298 | SECURITY_UPDATES_VIA_MYORACLESUPPORT=false 299 | 300 | #------------------------------------------------------------------------------ 301 | # Specify whether user wants to give any proxy details for connection. 302 | # The value can be either true or false. If left blank it will be assumed 303 | # to be false. 304 | # 305 | # Example : DECLINE_SECURITY_UPDATES=false 306 | #------------------------------------------------------------------------------ 307 | DECLINE_SECURITY_UPDATES=true 308 | 309 | #------------------------------------------------------------------------------ 310 | # Specify the Proxy server name. Length should be greater than zero. 311 | # 312 | # Example : PROXY_HOST=proxy.domain.com 313 | #------------------------------------------------------------------------------ 314 | PROXY_HOST= 315 | 316 | #------------------------------------------------------------------------------ 317 | # Specify the proxy port number. Should be Numeric and atleast 2 chars. 318 | # 319 | # Example : PROXY_PORT=25 320 | #------------------------------------------------------------------------------ 321 | PROXY_PORT= -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | Vagrant script to install Oracle Database 11g 474 | Copyright (C) 2013 paykin 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 489 | 490 | Also add information on how to contact you by electronic and paper mail. 491 | 492 | You should also get your employer (if you work as a programmer) or your 493 | school, if any, to sign a "copyright disclaimer" for the library, if 494 | necessary. Here is a sample; alter the names: 495 | 496 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 497 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 498 | 499 | {signature of Ty Coon}, 1 April 1990 500 | Ty Coon, President of Vice 501 | 502 | That's all there is to it! 503 | -------------------------------------------------------------------------------- /modules/oracle/files/CVU_11.2.0.1.0_vagrant/orarun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Header: oui/prov/fixup/linux/orarun.sh /main/2 2009/06/24 04:27:33 sandgoya Exp $ 4 | # 5 | # orarun.sh 6 | # 7 | # Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. 8 | # 9 | # NAME 10 | # orarun.sh - 11 | # 12 | # DESCRIPTION 13 | # 14 | # 15 | # NOTES 16 | # 17 | # 18 | # MODIFIED (MM/DD/YY) 19 | # vkamthan 05/12/09 - Bug Fix 8445702 20 | # vkamthan 04/13/09 - Bug Fix 8304796 21 | # vkamthan 12/15/08 - Bug Fix 7378320 22 | # skhekale 07/22/08 - Added shell limit fixup 23 | # kkhanuja 07/06/06 - Added fixup to start nscd 24 | # vsubrahm 03/28/06 - XbranchMerge vsubrahm_orarun_rpm_changes from 25 | # st_empp_10.2.0.1.0 26 | # vsubrahm 02/23/06 - Adding checks before changing values 27 | # njerath 02/06/06 - XbranchMerge njerath_misc_prereq_fixup_2 from main 28 | # vsubrahm 02/02/06 - XbranchMerge vsubrahm_orarun_target from main 29 | # vsubrahm 01/27/06 - Fix the variable name for shell limits 30 | # njerath 12/04/05 - Changed constant names for base urls 31 | # njerath 11/27/05 - Added more fixups 32 | # vsubrahm 10/22/05 - 33 | # 34 | # vsubrahm 10/22/05 - changing add user to group to includ groups user belongs to 35 | # vsubrahm 10/18/05 - Adding fixup for mount parameters 36 | # vsagar 10/26/05 - 37 | # vsubrahm 10/22/05 - 38 | # vsubrahm 10/22/05 - changing add user to group to includ groups user belongs to 39 | # vsubrahm 10/18/05 - Adding fixup for mount parameters 40 | # gmanglik 09/02/05 - add fix up for central inventory permissions 41 | # vsburahm 08/26/05 - Added fixup for adding user to groups 42 | # bpaliwal 08/25/05 - use tee to output the progress / errors an log 43 | # vsubrahm 07/26/05 - Changes for Shell limits 44 | # suravind 07/15/05 - suravind_updation_prereq_xml 45 | # vsubrahm 07/06/05 - Creation 46 | # 47 | #set -x 48 | #Assign command line params 1 and 2 to response file and enable file 49 | 50 | # Helper function to verify an address is associated with an interface 51 | resp_file=$1 52 | enable_file=$2 53 | log_file=$3 54 | #If both files are not specified look for the files in the current directory 55 | if [ $# -eq 0 ] 56 | then 57 | resp_file=`pwd`/orarun.response 58 | enable_file=`pwd`/orarun.enable 59 | log_file=`pwd` 60 | elif [ $# -eq 1 ] 61 | then 62 | enable_file=`pwd`/orarun.enable 63 | log_file=`pwd` 64 | elif [ $# -eq 2 ] 65 | then 66 | log_file="`pwd`" 67 | fi 68 | 69 | EXIT_CODE=0 70 | 71 | #if the user does not have write permission on given directory, then create logs in /tmp directory 72 | if ! echo "This is the log file for orarun script" >> $log_file/orarun.log 73 | then 74 | log_file=`/tmp` 75 | echo "This is the log file for orarun script" >> $log_file/orarun.log 76 | fi 77 | echo "Timestamp: `date +%m%d%y%H%M%S`" >> $log_file/orarun.log 78 | 79 | echo "Response file being used is :$resp_file" |tee -a $log_file/orarun.log 80 | 81 | echo "Enable file being used is :$enable_file" | tee -a $log_file/orarun.log 82 | 83 | echo "Log file location: $log_file/orarun.log" 84 | 85 | if [ ! -f $resp_file -o ! -f $enable_file ] 86 | then 87 | echo "Nothing to fix!!" | tee -a $log_file/orarun.log 88 | exit 0 89 | fi 90 | if [ ! -r $resp_file -o ! -r $enable_file ] 91 | then 92 | echo "One or both of the input files are not readable" |tee -a $log_file/orarun.log 93 | exit 1 94 | fi 95 | 96 | #check if user has given absolute/relative path or just filename 97 | first_char=`expr "$resp_file" : '\(.\)'` 98 | if [ "$first_char" != "/" -a "$first_char" != "." ] 99 | then 100 | . ./$resp_file 101 | else 102 | . $resp_file 103 | fi 104 | 105 | first_char=`expr "$enable_file" : '\(.\)'` 106 | if [ "$first_char" != "/" -a "$first_char" != "." ] 107 | then 108 | . ./$enable_file 109 | else 110 | . $enable_file 111 | fi 112 | 113 | check_ifconfig() 114 | { 115 | ADDR="$1" 116 | IFCONFIG="`/sbin/ifconfig 2>/dev/null`" 117 | if [ "$?" != 0 ] 118 | then 119 | echo "Unable to run ifconfig" 120 | return 1 121 | fi 122 | 123 | case "$IFCONFIG" in 124 | *addr:"$ADDR"*) 125 | return 0 126 | ;; 127 | *) 128 | ;; 129 | esac 130 | 131 | echo "IP address \"$ADDR\" is not associated with an interface" 132 | return 1 133 | } 134 | 135 | install_ocfs_packages() 136 | { 137 | METHOD_INSTALL_OCFS="$1" 138 | #install of ocfs 139 | if [ "`echo $METHOD_INSTALL_OCFS | tr A-Z a-z`" == "true" ] 140 | then 141 | METHOD_OCFS_RPMS="$2" 142 | METHOD_RPM_BASE_URL_OCFS="$3" 143 | METHOD_PROCESSOR="$4" 144 | for ocfs_rpm in $METHOD_OCFS_RPMS 145 | do 146 | full_ocfs_rpm=`echo $ocfs_rpm "$METHOD_PROCESSOR.rpm" | awk '$1 !~ /rpm$/ { print $1 "." $2 }'` 147 | if test -z "$full_ocfs_rpm" 148 | then 149 | full_ocfs_rpm=$ocfs_rpm 150 | fi 151 | fullpath=${METHOD_RPM_BASE_URL_OCFS}/$full_ocfs_rpm 152 | if test -n "$fullpath" 153 | then 154 | protocol="`expr $fullpath : '\(....\)'`" 155 | if [ "$protocol" == "http" ] 156 | then 157 | if test -n "$HTTP_PROXY" && test -n "$HTTP_PORT" 158 | then 159 | rpm -Uvh $fullpath --httpproxy $HTTP_PROXY --httpport $HTTP_PORT 160 | returncode=$? 161 | else 162 | echo "Errors occured during installation of package:$ocfs_rpm. Either HTTP Proxy or HTTP Port not specified." | tee -a $log_file/orarun.log 163 | fi 164 | elif [ "$protocol" == "ftp:" ] 165 | then 166 | if test -n "$FTP_PROXY" && test -n "$FTP_PORT" 167 | then 168 | rpm -Uvh $fullpath --ftpproxy $FTP_PROXY --ftpport $FTP_PORT 169 | returncode=$? 170 | else 171 | echo "Errors occured during installation of package:$ocfs_rpm. Either FTP Proxy or FTP Port not specified." | tee -a $log_file/orarun.log 172 | fi 173 | else 174 | rpm -Uvh $fullpath 175 | returncode=$? 176 | fi 177 | if [ $? -ne 0 ] 178 | then 179 | echo "Errors occured during installation of package:$ocfs_rpm." | tee -a $log_file/orarun.log 180 | fi 181 | fi 182 | done 183 | fi 184 | } 185 | 186 | if [ "`echo $SET_KERNEL_PARAMETERS | tr A-Z a-z`" == "true" ] 187 | then 188 | echo "Setting Kernel Parameters..." | tee -a $log_file/orarun.log 189 | if [ ! -d /proc/sys/kernel ]; then 190 | echo "No sysctl kernel interface - cannot set kernel parameters." |tee -a $log_file/orarun.log 191 | fi 192 | 193 | if [ -n "$KERNEL_PARAMETERS_FILE" ] 194 | then 195 | 196 | if [ -r $KERNEL_PARAMETERS_FILE ] 197 | then 198 | $SYSCTL_LOC -p "$KERNEL_PARAMETERS_FILE" 199 | if [ $? -ne 0 ] 200 | then 201 | echo "Could not set the Kernel parameters." |tee -a $log_file/orarun.log 202 | fi 203 | else 204 | echo "File $KERNEL_PARAMETERS_FILE is not found/not readable" |tee -a $log_file/orarun.log 205 | fi 206 | 207 | else 208 | #delete the line containing parameter from conf file and replace with new value 209 | # Set shared memory parameters: 210 | #SHMMAX, SHMMNI, SHMALL 211 | if [ -n "$SHMMAX" ] 212 | then 213 | #extract the line which contains shmmax in the /etc/sysctl.conf 214 | if grep "^kernel.shmmax[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 215 | then 216 | line=`sed -ne '/^kernel.shmmax/p' /etc/sysctl.conf` 217 | #remove extra spaces in the line 218 | line=`echo $line | sed 's/ //g'` 219 | #Now extract the value of shmmax 220 | fileValue=`echo $line | cut -d= -f2` 221 | echo "shmmax in response file:$SHMMAX" >> $log_file/orarun.log 222 | echo "shmmax in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 223 | if [ ! $SHMMAX ] || [ ! $fileValue ] 224 | then 225 | echo "Could not find SHMMAX from /etc/sysctl.conf or response file."; 226 | EXIT_CODE=1; 227 | else 228 | if [ $SHMMAX -gt $fileValue ] 229 | then 230 | sed -ie '/^kernel.shmmax/d' /etc/sysctl.conf 231 | echo "kernel.shmmax = $SHMMAX" >> /etc/sysctl.conf 232 | else 233 | echo "The value for shmmax in response file is not greater than value for shmmax in /etc/sysctl.conf file. Hence not changing it." |tee -a $log_file/orarun.log 234 | fi 235 | fi 236 | else 237 | echo "kernel.shmmax = $SHMMAX" >> /etc/sysctl.conf 238 | fi 239 | #current value of shmmax - value in /proc/sys/kernel/shmmax 240 | cur_shmmax=`/sbin/sysctl -n kernel.shmmax` 241 | #remove the extra spaces in the line. 242 | cur_shmmax=`echo $cur_shmmax | sed 's/ //g'` 243 | echo "shmmax for current session:$cur_shmmax" >> $log_file/orarun.log 244 | if [ $SHMMAX -gt $cur_shmmax ] 245 | then 246 | if ! $SYSCTL_LOC -w kernel.shmmax="$SHMMAX" 247 | then 248 | echo "$SYSCTL_LOC failed to set shmmax" |tee -a $log_file/orarun.log 249 | fi 250 | else 251 | echo "The value for shmmax in response file is not greater than value of shmmax for current session. Hence not changing it." |tee -a $log_file/orarun.log 252 | fi 253 | fi 254 | 255 | if [ -n "$SHMMNI" ] 256 | then 257 | if grep "^kernel.shmmni[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 258 | then 259 | #extract the line which contains shmmni in the /etc/sysctl.conf 260 | line=`sed -ne '/^kernel.shmmni/p' /etc/sysctl.conf` 261 | #remove extra spaces in the line 262 | line=`echo $line | sed 's/ //g'` 263 | #Now extract the value of shmmni 264 | fileValue=`echo $line | cut -d= -f2` 265 | echo "shmmni in response file:$SHMMNI" >> $log_file/orarun.log 266 | echo "shmmni in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 267 | if [ ! $SHMMNI ] || [ ! $fileValue ] 268 | then 269 | echo "Could not find SHMMNI from /etc/sysctl.conf or response file."; 270 | EXIT_CODE=1; 271 | else 272 | if [ $SHMMNI -gt $fileValue ] 273 | then 274 | sed -ie '/^kernel.shmmni/d' /etc/sysctl.conf 275 | echo "kernel.shmmni = $SHMMNI" >> /etc/sysctl.conf 276 | else 277 | echo "The value for shmmni in response file is not greater than value for shmmni in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 278 | fi 279 | fi 280 | else 281 | echo "kernel.shmmni = $SHMMNI" >> /etc/sysctl.conf 282 | fi 283 | 284 | 285 | #current value of shmmni - value in /proc/sys/kernel/shmmni 286 | cur_shmmni=`/sbin/sysctl -n kernel.shmmni` 287 | #remove the extra spaces in the line. 288 | cur_shmmni=`echo $cur_shmmni | sed 's/ //g'` 289 | echo "shmmni for current session:$cur_shmmni" >> $log_file/orarun.log 290 | if [ $SHMMNI -gt $cur_shmmni ] 291 | then 292 | if ! $SYSCTL_LOC -w kernel.shmmni="$SHMMNI" 293 | then 294 | echo "$SYSCTL_LOC failed to set shmmni" |tee -a $log_file/orarun.log 295 | fi 296 | else 297 | echo "The value for shmmni in response file is not greater than value of shmmni for current session. Hence not changing it." |tee -a $log_file/orarun.log 298 | 299 | fi 300 | fi 301 | 302 | if [ -n "$SHMALL" ] 303 | then 304 | if grep "^kernel.shmall[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 305 | then 306 | #extract the line which contains shmall in the /etc/sysctl.conf 307 | line=`sed -ne '/^kernel.shmall/p' /etc/sysctl.conf` 308 | #remove extra spaces in the line 309 | line=`echo $line | sed 's/ //g'` 310 | #Now extract the value of shmall 311 | fileValue=`echo $line | cut -d= -f2` 312 | echo "shmall in response file:$SHMALL" >> $log_file/orarun.log 313 | echo "shmall in /etc/sysctl.conf:$fileValue" >> $log_file/orarun.log 314 | if [ ! $SHMALL ] || [ ! $fileValue ] 315 | then 316 | echo "Could not find SHMALL from /etc/sysctl.conf or response file."; 317 | EXIT_CODE=1; 318 | else 319 | if [ $SHMALL -gt $fileValue ] 320 | then 321 | sed -ie '/^kernel.shmall/d' /etc/sysctl.conf 322 | echo "kernel.shmall = $SHMALL" >> /etc/sysctl.conf 323 | else 324 | echo "The value for shmall in response file is not greater than value for shmall in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 325 | fi 326 | fi 327 | else 328 | echo "kernel.shmall = $SHMALL" >> /etc/sysctl.conf 329 | fi 330 | #current value of shmmni - value in /proc/sys/kernel/shmall 331 | cur_shmall=`/sbin/sysctl -n kernel.shmall` 332 | #remove the extra spaces in the line. 333 | cur_shmall=`echo $cur_shmall | sed 's/ //g'` 334 | echo "shmall for current session:$cur_shmall" >> $log_file/orarun.log 335 | if [ $SHMALL -gt $cur_shmall ] 336 | then 337 | if ! $SYSCTL_LOC -w kernel.shmall="$SHMALL" 338 | then 339 | echo "$SYSCTL_LOC failed to set shmall" |tee -a $log_file/orarun.log 340 | fi 341 | else 342 | echo "The value for shmall in response file is not greater than value of shmall for current session. Hence not changing it." | tee -a $log_file/orarun.log 343 | fi 344 | fi 345 | 346 | # Set the semaphore parameters: 347 | # SEMMSL, SEMMNS, SEMOPM, SEMMNI 348 | #Check if any of semaphores need to be set 349 | #All must be set at the same time, so first get those which need not be set 350 | #from /proc/sys/kernel/sem 351 | if [ -n "$SEMMSL" -o -n "$SEMMNS" -o -n "$SEMOPM" -o -n "$SEMMNI" ] 352 | then 353 | #change values for current session in /proc/sys/kernel/sem only if specified values are greater. 354 | cur_semmsl=`awk '{print $1}' /proc/sys/kernel/sem` 355 | cur_semmns=`awk '{print $2}' /proc/sys/kernel/sem` 356 | cur_semopm=`awk '{print $3}' /proc/sys/kernel/sem` 357 | cur_semmni=`awk '{print $4}' /proc/sys/kernel/sem` 358 | line=`sed -ne '/^kernel.sem/p' /etc/sysctl.conf` 359 | fileValue=`echo $line | cut -d= -f2` 360 | file_semmsl=`echo $fileValue | awk '{print $1}'` 361 | file_semmns=`echo $fileValue | awk '{print $2}'` 362 | file_semopm=`echo $fileValue | awk '{print $3}'` 363 | file_semmni=`echo $fileValue | awk '{print $4}'` 364 | flag_cur="false" 365 | flag_file="false" 366 | 367 | if [ ! -z "$SEMMSL" ] 368 | then 369 | echo "semmsl in response file:$SEMMSL" >> $log_file/orarun.log 370 | echo "semmsl for current session:$cur_semmsl" >> $log_file/orarun.log 371 | if [ $SEMMSL -gt $cur_semmsl ] 372 | then 373 | cur_semmsl=$SEMMSL 374 | flag_cur="true" 375 | else 376 | echo "The value for semmsl in response file is not greater than value of semmsl for current session. Hence not changing it." | tee -a $log_file/orarun.log 377 | fi 378 | echo "semmsl in /etc/sysctl.conf:$file_semmsl" >>$log_file/orarun.log 379 | if test -z "$file_semmsl" || test $SEMMSL -gt $file_semmsl 380 | then 381 | file_semmsl=$SEMMSL 382 | flag_file="true" 383 | else 384 | echo "The value for semmsl in response file is not greater than value for semmsl in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 385 | fi 386 | fi 387 | 388 | if [ ! -z "$SEMMNS" ] 389 | then 390 | echo "semmns in response file:$SEMMNS" >> $log_file/orarun.log 391 | echo "semmns for current session:$cur_semmns" >> $log_file/orarun.log 392 | if [ $SEMMNS -gt $cur_semmns ] 393 | then 394 | cur_semmns=$SEMMNS 395 | flag_cur="true" 396 | else 397 | echo "The value for semmns in response file is not greater than value of semmns for current session. Hence not changing it." | tee -a $log_file/orarun.log 398 | fi 399 | echo "semmns in /etc/sysctl.conf:$file_semmns" >>$log_file/orarun.log 400 | if test -z "$file_semmns" || test $SEMMNS -gt $file_semmns 401 | then 402 | file_semmns=$SEMMNS 403 | flag_file="true" 404 | else 405 | echo "The value for semmns in response file is not greater than value for semmns in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 406 | fi 407 | fi 408 | 409 | if [ ! -z "$SEMOPM" ] 410 | then 411 | echo "semopm in response file:$SEMOPM" >> $log_file/orarun.log 412 | echo "semopm for current session:$cur_semopm" >> $log_file/orarun.log 413 | if [ $SEMOPM -gt $cur_semopm ] 414 | then 415 | cur_semopm=$SEMOPM 416 | flag_cur="true" 417 | else 418 | echo "The value for semopm in response file is not greater than value of semopm for current session. Hence not changing it." | tee -a $log_file/orarun.log 419 | fi 420 | echo "semopm in /etc/sysctl.conf:$file_semopm" >>$log_file/orarun.log 421 | if test -z "$file_semopm" || test $SEMOPM -gt $file_semopm 422 | then 423 | file_semopm=$SEMOPM 424 | flag_file="true" 425 | else 426 | echo "The value for semopm in response file is not greater than value for semopm in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 427 | fi 428 | fi 429 | 430 | if [ ! -z "$SEMMNI" ] 431 | then 432 | echo "semmni in response file:$SEMMNI" >> $log_file/orarun.log 433 | echo "semmni for current session:$cur_semmni" >> $log_file/orarun.log 434 | if [ $SEMMNI -gt $cur_semmni ] 435 | then 436 | cur_semmni=$SEMMNI 437 | flag_cur="true" 438 | else 439 | echo "The value for semmni in response file is not greater than value of semmni for current session. Hence not changing it." | tee -a $log_file/orarun.log 440 | fi 441 | echo "semmni in /etc/sysctl.conf:$file_semmni" >>$log_file/orarun.log 442 | if test -z "$file_semmni" || test $SEMMNI -gt $file_semmni 443 | then 444 | file_semmni=$SEMMNI 445 | flag_file="true" 446 | else 447 | echo "The value for semmni in response file is not greater than value for semmni in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 448 | fi 449 | fi 450 | if [ $flag_cur == "true" ] 451 | then 452 | if ! $SYSCTL_LOC -w kernel.sem="$cur_semmsl $cur_semmns $cur_semopm $cur_semmni" 453 | then 454 | echo "$SYSCTL_LOC failed to set semaphore parameters" |tee -a $log_file/orarun.log 455 | fi 456 | fi 457 | #Now edit the /etc/sysctl.conf file 458 | if [ $flag_file == "true" ] 459 | then 460 | sed -ie '/^kernel.sem/d' /etc/sysctl.conf 461 | echo "kernel.sem = $file_semmsl $file_semmns $file_semopm $file_semmni" >> /etc/sysctl.conf 462 | fi 463 | fi 464 | 465 | #FILE_MAX_KERNEL, IP_LOCAL_PORT_RANGE, RMEM_DEFAULT, WMEM_DEFAULT, RMEM_MAX, WMEM_MAX,AIO_MAX_SIZE 466 | if [ -n "$FILE_MAX_KERNEL" ] 467 | then 468 | if grep "^fs.file-max[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 469 | then 470 | #extract the line which contains filemax in the /etc/sysctl.conf 471 | line=`sed -ne '/^fs.file-max/p' /etc/sysctl.conf` 472 | #remove extra spaces in the line 473 | line=`echo $line | sed 's/ //g'` 474 | #Now extract the value of filemax 475 | fileValue=`echo $line | cut -d= -f2` 476 | echo "file-max in response file:$FILE_MAX_KERNEL" >> $log_file/orarun.log 477 | echo "file-max in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 478 | if [ ! $FILE_MAX_KERNEL ] || [ ! $fileValue ] 479 | then 480 | echo "Could not find FILE_MAX_KERNEL from /etc/sysctl.conf or response file."; 481 | EXIT_CODE=1; 482 | else 483 | if [ $FILE_MAX_KERNEL -gt $fileValue ] 484 | then 485 | sed -ie '/^fs.file-max/d' /etc/sysctl.conf 486 | echo "fs.file-max = $FILE_MAX_KERNEL" >> /etc/sysctl.conf 487 | else 488 | echo "The value for file-max in response file is not greater than value for file-max in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 489 | fi 490 | fi 491 | else 492 | echo "fs.file-max = $FILE_MAX_KERNEL" >> /etc/sysctl.conf 493 | fi 494 | #current value of filemax - value in /proc/sys/fs 495 | cur_filemax=`/sbin/sysctl -n fs.file-max` 496 | #remove the extra spaces in the line. 497 | cur_filemax=`echo $cur_filemax | sed 's/ //g'` 498 | echo "file-max for current session:$cur_filemax" >> $log_file/orarun.log 499 | if [ $FILE_MAX_KERNEL -gt $cur_filemax ] 500 | then 501 | if ! $SYSCTL_LOC -w fs.file-max="$FILE_MAX_KERNEL" 502 | then 503 | echo "$SYSCTL_LOC failed to set fs.file-max parameter" |tee -a $log_file/orarun.log 504 | fi 505 | else 506 | echo "The value for file-max in response file is not greater than value of file-max for current session. Hence not changing it." | tee -a $log_file/orarun.log 507 | fi 508 | fi 509 | 510 | if [ -n "$IP_LOCAL_PORT_RANGE" ] 511 | then 512 | #extract the line which contains ip_local_port_range in the /etc/sysctl.conf 513 | line=`sed -ne '/^net.ipv4.ip_local_port_range/p' /etc/sysctl.conf` 514 | #Now extract the value of ip_local_port_range 515 | fileValue=`echo $line | cut -d= -f2` 516 | file_atleast=`echo $fileValue | awk '{print $1}'` 517 | file_atmost=`echo $fileValue | awk '{print $2}'` 518 | 519 | #change values for current session in /proc/sys/net/ipv4 only if specified values are greater. 520 | cur_atleast=`awk '{print $1}' /proc/sys/net/ipv4/ip_local_port_range` 521 | cur_atmost=`awk '{print $2}' /proc/sys/net/ipv4/ip_local_port_range` 522 | 523 | #find the user specified atleast and atmost values: 524 | user_atleast=`echo $IP_LOCAL_PORT_RANGE | awk '{print $1}'` 525 | user_atmost=`echo $IP_LOCAL_PORT_RANGE | awk '{print $2}'` 526 | echo "ip_local_port_range in response file:$IP_LOCAL_PORT_RANGE" >> $log_file/orarun.log 527 | echo "ip_local_port_range in /etc/sysctl.conf:$file_atleast $file_atmost" >> $log_file/orarun.log 528 | flag="false" 529 | echo "ip_local_port_range for current session:$cur_atleast $cur_atmost" >> $log_file/orarun.log 530 | # bug fix 8445702 531 | # removing the less than equals check for atleast 532 | if [ -n "$user_atleast" ] 533 | then 534 | file_atleast=$user_atleast 535 | flag="true" 536 | fi 537 | 538 | if test -z "$file_atmost" || test $user_atmost -gt $file_atmost 539 | then 540 | file_atmost=$user_atmost 541 | flag="true" 542 | else 543 | echo "The upper limit of ip_local_port range in reponse file is not greater than value in /etc/sysctl.conf, hence not changing it."|tee -a $log_file/orarun.log 544 | fi 545 | if [ $flag == "true" ] 546 | then 547 | sed -ie '/^net.ipv4.ip_local_port_range/d' /etc/sysctl.conf 548 | echo "net.ipv4.ip_local_port_range = $file_atleast $file_atmost" >> /etc/sysctl.conf 549 | fi 550 | 551 | #Now change for current session if reqd. 552 | flag="false" 553 | # bug fix 8445702 554 | # removing the less than equals check for atleast 555 | if [ -n "$user_atleast" ] 556 | then 557 | cur_atleast=$user_atleast 558 | flag="true" 559 | fi 560 | 561 | if [ $user_atmost -gt $cur_atmost ] 562 | then 563 | cur_atmost=$user_atmost 564 | flag="true" 565 | else 566 | echo "The upper limit of ip_local_port range in response file is not greater than value for current session, hence not changing it."|tee -a $log_file/orarun.log 567 | fi 568 | if [ $flag == "true" ] 569 | then 570 | if ! $SYSCTL_LOC -w net.ipv4.ip_local_port_range="$cur_atleast $cur_atmost" 571 | then 572 | echo "$SYSCTL_LOC failed to set net.ipv4.ip_local_port_range parameter" |tee -a $log_file/orarun.log 573 | fi 574 | fi 575 | fi 576 | 577 | if [ -n "$RMEM_DEFAULT" ] 578 | then 579 | if grep "^net.core.rmem_default[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 580 | then 581 | #extract the line which contains rmem_default in the /etc/sysctl.conf 582 | line=`sed -ne '/^[[:space:]]*net.core.rmem_default/p' /etc/sysctl.conf` 583 | #remove extra spaces in the line 584 | line=`echo $line | sed 's/ //g'` 585 | #Now extract the value of rmem_default 586 | fileValue=`echo $line | cut -d= -f2` 587 | echo "rmem_default in response file:$RMEM_DEFAULT" >> $log_file/orarun.log 588 | echo "rmem_default in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 589 | if [ ! $RMEM_DEFAULT ] || [ ! $fileValue ] 590 | then 591 | echo "Could not find RMEM_DEFAULT from /etc/sysctl.conf or response file."; 592 | EXIT_CODE=1; 593 | else 594 | if [ $RMEM_DEFAULT -gt $fileValue ] 595 | then 596 | sed -ie '/^net.core.rmem_default/d' /etc/sysctl.conf 597 | echo "net.core.rmem_default = $RMEM_DEFAULT" >> /etc/sysctl.conf 598 | else 599 | echo "The value for rmem_default in response file is not greater than value for rmem_default in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 600 | fi 601 | fi 602 | else 603 | echo "net.core.rmem_default = $RMEM_DEFAULT" >> /etc/sysctl.conf 604 | fi 605 | #current value of rmem_default in /proc/sys/net/core 606 | cur_rmem_default=`/sbin/sysctl -n net.core.rmem_default` 607 | #remove the extra spaces in the line. 608 | cur_rmem_default=`echo $cur_rmem_default | sed 's/ //g'` 609 | echo "rmem_default for current session:$cur_rmem_default" >> $log_file/orarun.log 610 | if [ $RMEM_DEFAULT -gt $cur_rmem_default ] 611 | then 612 | if ! $SYSCTL_LOC -w net.core.rmem_default="$RMEM_DEFAULT" 613 | then 614 | echo "$SYCTL_LOC failed to set net.core.rmem_default parameter" |tee -a $log_file/orarun.log 615 | fi 616 | else 617 | echo "The value for rmem_default in response file is not greater than value of rmem_default for current session. Hence not changing it." | tee -a $log_file/orarun.log 618 | fi 619 | fi 620 | 621 | if [ -n "$WMEM_DEFAULT" ] 622 | then 623 | if grep "^net.core.wmem_default[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 624 | then 625 | #extract the line which contains wmem_default in the /etc/sysctl.conf 626 | line=`sed -ne '/^net.core.wmem_default/p' /etc/sysctl.conf` 627 | #remove extra spaces in the line 628 | line=`echo $line | sed 's/ //g'` 629 | #Now extract the value of wmem_default 630 | fileValue=`echo $line | cut -d= -f2` 631 | echo "wmem_default in response file:$WMEM_DEFAULT" >> $log_file/orarun.log 632 | echo "wmem_default in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 633 | if [ ! $WMEM_DEFAULT ] || [ ! $fileValue ] 634 | then 635 | echo "Could not find WMEM_DEFAULT from /etc/sysctl.conf or response file."; 636 | EXIT_CODE=1; 637 | else 638 | if [ $WMEM_DEFAULT -gt $fileValue ] 639 | then 640 | sed -ie '/^net.core.wmem_default/d' /etc/sysctl.conf 641 | echo "net.core.wmem_default = $WMEM_DEFAULT" >> /etc/sysctl.conf 642 | else 643 | echo "The value for wmem_default in response file is not greater than value for wmem_default in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 644 | fi 645 | fi 646 | else 647 | echo "net.core.wmem_default = $WMEM_DEFAULT" >> /etc/sysctl.conf 648 | fi 649 | #current value of rmem_default in /proc/sys/net/core 650 | cur_wmem_default=`/sbin/sysctl -n net.core.wmem_default` 651 | #remove the extra spaces in the line. 652 | cur_wmem_default=`echo $cur_wmem_default | sed 's/ //g'` 653 | echo "wmem_default for current session:$cur_wmem_default" >> $log_file/orarun.log 654 | if [ $WMEM_DEFAULT -gt $cur_wmem_default ] 655 | then 656 | if ! $SYSCTL_LOC -w net.core.wmem_default="$WMEM_DEFAULT" 657 | then 658 | echo "$SYSCTL_LOC failed to set net.core.wmem_default parameter" >> $log_file/orarun.log 659 | fi 660 | else 661 | echo "The value for wmem_default in response file is not greater than value of wmem_default for current session. Hence not changing it." | tee -a $log_file/orarun.log 662 | fi 663 | fi 664 | 665 | if [ -n "$RMEM_MAX" ] 666 | then 667 | if grep "^net.core.rmem_max[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 668 | then 669 | #extract the line which contains rmem_max in the /etc/sysctl.conf 670 | line=`sed -ne '/^net.core.rmem_max/p' /etc/sysctl.conf` 671 | #remove extra spaces in the line 672 | line=`echo $line | sed 's/ //g'` 673 | #Now extract the value of rmem_max 674 | fileValue=`echo $line | cut -d= -f2` 675 | echo "rmem_max in response file:$RMEM_MAX" >> $log_file/orarun.log 676 | echo "rmem_max in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 677 | if [ ! $RMEM_MAX ] || [ ! $fileValue ] 678 | then 679 | echo "Could not find RMEM_MAX from /etc/sysctl.conf or response file."; 680 | EXIT_CODE=1; 681 | else 682 | if [ $RMEM_MAX -gt $fileValue ] 683 | then 684 | sed -ie '/^net.core.rmem_max/d' /etc/sysctl.conf 685 | echo "net.core.rmem_max = $RMEM_MAX" >> /etc/sysctl.conf 686 | else 687 | echo "The value for rmem_max in response file is not greater than value for rmem_max in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 688 | fi 689 | fi 690 | else 691 | echo "net.core.rmem_max = $RMEM_MAX" >> /etc/sysctl.conf 692 | fi 693 | 694 | #current value of rmem_max in /proc/sys/net/core 695 | cur_rmem_max=`/sbin/sysctl -n net.core.rmem_max` 696 | #remove the extra spaces in the line. 697 | cur_rmem_max=`echo $cur_rmem_max | sed 's/ //g'` 698 | echo "rmem_max for current session:$cur_rmem_max" >> $log_file/orarun.log 699 | if [ $RMEM_MAX -gt $cur_rmem_max ] 700 | then 701 | if ! $SYSCTL_LOC -w net.core.rmem_max="$RMEM_MAX" 702 | then 703 | echo "$SYSCTL_LOC failed to set net.core.rmem_max parameter" |tee -a $log_file/orarun.log 704 | fi 705 | else 706 | echo "The value for rmem_max in response file is not greater than value of rmem_max for current session. Hence not changing it." | tee -a $log_file/orarun.log 707 | fi 708 | 709 | fi 710 | 711 | if [ -n "$WMEM_MAX" ] 712 | then 713 | if grep "^net.core.wmem_max[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 714 | then 715 | #extract the line which contains wmem_max in the /etc/sysctl.conf 716 | line=`sed -ne '/^net.core.wmem_max/p' /etc/sysctl.conf` 717 | #remove extra spaces in the line 718 | line=`echo $line | sed 's/ //g'` 719 | #Now extract the value of wmem_max 720 | fileValue=`echo $line | cut -d= -f2` 721 | echo "wmem_max in response file:$WMEM_MAX" >> $log_file/orarun.log 722 | echo "wmem_max in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 723 | if [ ! $WMEM_MAX ] || [ ! $fileValue ] 724 | then 725 | echo "Could not find WMEM_MAX from /etc/sysctl.conf or response file."; 726 | EXIT_CODE=1; 727 | else 728 | if [ $WMEM_MAX -gt $fileValue ] 729 | then 730 | sed -ie '/^net.core.wmem_max/d' /etc/sysctl.conf 731 | echo "net.core.wmem_max = $WMEM_MAX" >> /etc/sysctl.conf 732 | else 733 | echo "The value for wmem_max in response file is not greater than value for wmem_max in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 734 | fi 735 | fi 736 | else 737 | echo "net.core.wmem_max = $WMEM_MAX" >> /etc/sysctl.conf 738 | fi 739 | #current value of wmem_max in /proc/sys/net/core 740 | cur_wmem_max=`/sbin/sysctl -n net.core.wmem_max` 741 | #remove the extra spaces in the line. 742 | cur_wmem_max=`echo $cur_wmem_max | sed 's/ //g'` 743 | echo "wmem_max for current session:$cur_wmem_max" >> $log_file/orarun.log 744 | if [ $WMEM_MAX -gt $cur_wmem_max ] 745 | then 746 | if ! $SYSCTL_LOC -w net.core.wmem_max="$WMEM_MAX" 747 | then 748 | echo "$SYSCTL_LOC failed to set net.core.wmem_max parameter" |tee -a $log_file/orarun.log 749 | fi 750 | else 751 | echo "The value for wmem_max in response file is not greater than value of wmem_max for current session. Hence not changing it." | tee -a $log_file/orarun.log 752 | fi 753 | fi 754 | 755 | if [ -n "$AIO_MAX_SIZE" ] 756 | then 757 | if grep "^fs.aio-max-size[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 758 | then 759 | #extract the line which contains aio_max_size in the /etc/sysctl.conf 760 | line=`sed -ne '/^fs.aio-max-size/p' /etc/sysctl.conf` 761 | #remove extra spaces in the line 762 | line=`echo $line | sed 's/ //g'` 763 | #Now extract the value of aio_max_size 764 | fileValue=`echo $line | cut -d= -f2` 765 | echo "aio-max-size in response file:$AIO_MAX_SIZE" >> $log_file/orarun.log 766 | echo "aio-max-size in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 767 | if [ ! $AIO_MAX_SIZE ] || [ ! $fileValue ] 768 | then 769 | echo "Could not find AIO_MAX_SIZE from /etc/sysctl.conf or response file."; 770 | EXIT_CODE=1; 771 | else 772 | if [ $AIO_MAX_SIZE -gt $fileValue ] 773 | then 774 | sed -ie '/^fs.aio-max-size/d' /etc/sysctl.conf 775 | echo "fs.aio-max-size = $AIO_MAX_SIZE" >> /etc/sysctl.conf 776 | else 777 | echo "The value for aio-max-size in response file is not greater than value for aio-max-size in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 778 | fi 779 | fi 780 | else 781 | echo "fs.aio-max-size = $AIO_MAX_SIZE" >> /etc/sysctl.conf 782 | fi 783 | #current value of aio_max_size in /proc/sys/fs 784 | cur_aio_max_size=`/sbin/sysctl -n fs.aio-max-size` 785 | #remove the extra spaces in the line. 786 | cur_aio_max_size=`echo $cur_aio_max_size | sed 's/ //g'` 787 | echo "aio-max-size for current session:$cur_aio_max_size" >> $log_file/orarun.log 788 | if [ $AIO_MAX_SIZE -gt $cur_aio_max_size ] 789 | then 790 | if ! $SYSCTL_LOC -w fs.aio-max-size="$AIO_MAX_SIZE" 791 | then 792 | echo "$SYSCTL_LOC failed to set fs.aio-max-size parameter" |tee -a $log_file/orarun.log 793 | fi 794 | else 795 | echo "The value for aio-max-size in response file is not greater than value of aio-max-size for current session. Hence not changing it." | tee -a $log_file/orarun.log 796 | fi 797 | 798 | fi 799 | 800 | if [ -n "$AIO_MAX_NR" ] 801 | then 802 | if grep "^fs.aio-max-nr[[:space:]]*=[[:space:]]*[0-9]\+" /etc/sysctl.conf 803 | then 804 | #extract the line which contains aio-max-nr in the /etc/sysctl.conf 805 | line=`sed -ne '/^fs.aio-max-nr/p' /etc/sysctl.conf` 806 | #remove extra spaces in the line 807 | line=`echo $line | sed 's/ //g'` 808 | #Now extract the value of aio-max-nr 809 | fileValue=`echo $line | cut -d= -f2` 810 | echo "aio-max-nr in response file:$AIO_MAX_NR" >> $log_file/orarun.log 811 | echo "aio-max-nr in /etc/sysctl.conf:$fileValue" >>$log_file/orarun.log 812 | if [ ! $AIO_MAX_NR ] || [ ! $fileValue ] 813 | then 814 | echo "Could not find AIO_MAX_NR from /etc/sysctl.conf or response file."; 815 | EXIT_CODE=1; 816 | else 817 | if [ $AIO_MAX_NR -gt $fileValue ] 818 | then 819 | sed -ie '/^fs.aio-max-nr/d' /etc/sysctl.conf 820 | echo "fs.aio-max-nr = $AIO_MAX_NR" >> /etc/sysctl.conf 821 | else 822 | echo "The value for aio-max-nr in response file is not greater than value for aio-max-nr in /etc/sysctl.conf file. Hence not changing it." | tee -a $log_file/orarun.log 823 | fi 824 | fi 825 | else 826 | echo "fs.aio-max-nr = $AIO_MAX_NR" >> /etc/sysctl.conf 827 | fi 828 | #current value of aio-max-nr in /proc/sys/fs 829 | cur_aio_max_nr=`/sbin/sysctl -n fs.aio-max-nr` 830 | #remove the extra spaces in the line. 831 | cur_aio_max_nr=`echo $cur_aio_max_nr | sed 's/ //g'` 832 | echo "aio-max-nr for current session:$cur_aio_max_nr" >> $log_file/orarun.log 833 | if [ $AIO_MAX_NR -gt $cur_aio_max_nr ] 834 | then 835 | if ! $SYSCTL_LOC -w fs.aio-max-nr="$AIO_MAX_NR" 836 | then 837 | echo "$SYSCTL_LOC failed to set fs.aio-max-nr parameter" |tee -a $log_file/orarun.log 838 | fi 839 | else 840 | echo "The value for aio-max-nr in response file is not greater than value of aio-max-nr for current session. Hence not changing it." | tee -a $log_file/orarun.log 841 | fi 842 | 843 | fi 844 | fi 845 | fi 846 | 847 | #Create groups if they do not exist 848 | if [ "`echo $CREATE_GROUPS | tr A-Z a-z`" == "true" ] 849 | then 850 | echo " Creating groups ..." >> $log_file/orarun.log 851 | for group in $GROUP 852 | do 853 | grep -qs ^$group: /etc/group || /usr/sbin/groupadd -r $group 854 | if [ $? -ne 0 ] 855 | then 856 | echo "An error occured while creating the group: $group" |tee -a $log_file/orarun.log 857 | 858 | fi 859 | done 860 | fi 861 | 862 | 863 | #Create the users if they do not exist 864 | if [ "`echo $CREATE_USERS | tr A-Z a-z`" == "true" ] 865 | then 866 | echo "Creating Users ...." >> $log_file/orarun.log 867 | for user_info in $USERS 868 | do 869 | user=`echo $user_info | cut -d: -f1` 870 | login_dir=`echo $user_info | cut -d: -f2` 871 | login_shell=`echo $user_info | cut -d: -f3` 872 | echo "Creating $user with login directory $login_dir and login shell $login_shell " | tee -a $log_file/orarun.log 873 | id $user || /usr/sbin/useradd -d $login_dir -s $login_shell -m -r $user 874 | if [ $? -ne 0 ] 875 | then 876 | echo "An error occured while creating the user $user " |tee -a $log_file/orarun.log 877 | fi 878 | done 879 | fi 880 | 881 | #Start the nscd daemon if not running 882 | if [ "`echo $START_NSCD | tr A-Z a-z`" == "true" ] 883 | then 884 | echo "Starting ncsd...." >> $log_file/orarun.log 885 | rm -rf awktemp 886 | /sbin/service nscd status > awktemp 2>&1 887 | 888 | VAR=`grep "running" awktemp | awk -F. '{ print $1 }'` 889 | 890 | if [ "$VAR" == "" ] 891 | then 892 | VAR1=`grep "unrecognized" awktemp | awk -F: '{ print $1 }'` 893 | if [ "$VAR1" == "" ] 894 | then 895 | /sbin/service nscd start 896 | else 897 | echo "nscd: unrecognized service " | tee -a $log_file/orarun.log 898 | fi 899 | fi 900 | fi 901 | 902 | #Set shell limits 903 | if [ "`echo $SET_SHELL_LIMITS | tr A-Z a-z`" == "true" ] 904 | then 905 | echo "Setting Shell limits ..." >> $log_file/orarun.log 906 | if [ ! -f /etc/security/limits.conf ] 907 | then 908 | echo "/etc/security/limits.conf file not found. Unable to set shell limits" | tee -a $log_file/orarun.log 909 | elif ! id $INSTALL_USER 910 | then 911 | echo "$INSTALL_USER does not exist on the system" | tee -a $log_file/orarun.log 912 | else 913 | if [ -n "$MAX_PROCESSES_HARDLIMIT" ] 914 | then 915 | #get current value from /etc/security/limits.conf 916 | #If entry is found in the file 917 | 918 | echo "Max processes hard limit in response file:$MAX_PROCESSES_HARDLIMIT" >> $log_file/orarun.log 919 | if grep "^$INSTALL_USER[[:space:]]\+hard[[:space:]]\+nproc[[:space:]]\+[0-9]\+" /etc/security/limits.conf 920 | then 921 | val=`grep "^$INSTALL_USER" /etc/security/limits.conf | awk '/hard[[:space:]]*nproc/ {print $4}'` 922 | echo "Max processes hard limit in /etc/security/limits.conf file: $val" >> $log_file/orarun.log 923 | if [ ! $MAX_PROCESSES_HARDLIMIT ] || [ ! $val ] 924 | then 925 | echo "Could not find MAX_PROCESSES_HARDLIMIT from /etc/security/limits.conf or response file."; 926 | EXIT_CODE=1; 927 | else 928 | if [ $MAX_PROCESSES_HARDLIMIT -gt $val ] 929 | then 930 | #delete the line and insert the new line 931 | grep -v "^$INSTALL_USER[[:space:]]\+hard[[:space:]]\+nproc[[:space:]]\+[0-9]\+" /etc/security/limits.conf > /tmp/limits.conf 932 | cp /tmp/limits.conf /etc/security/limits.conf 933 | echo "$INSTALL_USER hard nproc $MAX_PROCESSES_HARDLIMIT" >> /etc/security/limits.conf 934 | else 935 | echo "Value of MAX PROCESSES HARDLIMIT in response file is not greater than value in/etc/security/limits.conf. Hence not changing it." | tee -a $log_file/orarun.log 936 | fi 937 | fi 938 | else 939 | echo "$INSTALL_USER hard nproc $MAX_PROCESSES_HARDLIMIT" >> /etc/security/limits.conf 940 | fi 941 | fi 942 | 943 | if [ -n "$MAX_PROCESSES_SOFTLIMIT" ] 944 | then 945 | #if line is present then 946 | #get current value from /etc/security/limits.conf 947 | echo "Max processes softlimit in response file: $MAX_PROCESSES_SOFTLIMIT" >>$log_file/orarun.log 948 | if grep "^$INSTALL_USER[[:space:]]\+soft[[:space:]]\+nproc[[:space:]]\+[0-9]\+" /etc/security/limits.conf 949 | then 950 | val=`grep "^$INSTALL_USER" /etc/security/limits.conf | awk '/soft[[:space:]]*nproc/ {print $4}'` 951 | echo "Max processes soft limit in /etc/security/limits.conf: $val" >> $log_file/orarun.log 952 | if [ ! $MAX_PROCESSES_SOFTLIMIT ] || [ ! $val ] 953 | then 954 | echo "Could not find MAX_PROCESSES_SOFTLIMIT from /etc/security/limits.conf or response file."; 955 | EXIT_CODE=1; 956 | else 957 | if [ $MAX_PROCESSES_SOFTLIMIT -gt $val ] 958 | then 959 | #delete the line and insert the new line 960 | grep -v "^$INSTALL_USER[[:space:]]\+soft[[:space:]]\+nproc[[:space:]]\+[0-9]\+" /etc/security/limits.conf > /tmp/limits.conf 961 | cp /tmp/limits.conf /etc/security/limits.conf 962 | echo "$INSTALL_USER soft nproc $MAX_PROCESSES_SOFTLIMIT" >> /etc/security/limits.conf 963 | else 964 | echo "Value of MAX PROCESSES SOFTLIMIT in response file is not greater than value in /etc/security/limits.conf. Hence not changing it." | tee -a $log_file/orarun.log 965 | fi 966 | fi 967 | else 968 | echo "$INSTALL_USER soft nproc $MAX_PROCESSES_SOFTLIMIT" >> /etc/security/limits.conf 969 | fi 970 | fi 971 | 972 | if [ -n "$MAX_STACK_SOFTLIMIT" ] 973 | then 974 | #if line is present then 975 | #get current value from /etc/security/limits.conf 976 | echo "Stack limit in response file:$MAX_STACK_SOFTLIMIT" >> $log_file/orarun.log 977 | if grep "^$INSTALL_USER[[:space:]]\+soft[[:space:]]\+stack[[:space:]]\+[0-9]\+" /etc/security/limits.conf 978 | then 979 | val=`grep "^$INSTALL_USER" /etc/security/limits.conf | awk '/soft[[:space:]]*stack/ {print $4}'` 980 | echo "Stack limit in /etc/security/limits.conf: $val" >> $log_file/orarun.log 981 | #delete the line and insert the new line 982 | grep -v "$INSTALL_USER[[:space:]]\+soft[[:space:]]\+stack[[:space:]]\+[0-9]\+" /etc/security/limits.conf > /tmp/limits.conf 983 | cp /tmp/limits.conf /etc/security/limits.conf 984 | echo "$INSTALL_USER soft stack $MAX_STACK_SOFTLIMIT" >> /etc/security/limits.conf 985 | else 986 | echo "$INSTALL_USER soft stack $MAX_STACK_SOFTLIMIT" >> /etc/security/limits.conf 987 | fi 988 | fi 989 | 990 | 991 | if [ -n "$FILE_OPEN_MAX_HARDLIMIT" ] 992 | then 993 | #if line is present then 994 | #get current value from /etc/security/limits.conf 995 | echo "File open max hard limit in response file:$FILE_OPEN_MAX_HARDLIMIT" >> $log_file/orarun.log 996 | if grep "^$INSTALL_USER[[:space:]]\+hard[[:space:]]\+nofile[[:space:]]\+[0-9]\+" /etc/security/limits.conf 997 | then 998 | val=`grep "^$INSTALL_USER" /etc/security/limits.conf | awk '/hard[[:space:]]*nofile/ {print $4}'` 999 | echo "File open max hard limit in /etc/security/limits.conf: $val" >> $log_file/orarun.log 1000 | if [ ! $FILE_OPEN_MAX_HARDLIMIT ] || [ ! $val ] 1001 | then 1002 | echo "Could not find FILE_OPEN_MAX_HARDLIMIT from /etc/security/limits.conf or response file."; 1003 | EXIT_CODE=1; 1004 | else 1005 | if [ $FILE_OPEN_MAX_HARDLIMIT -gt $val ] 1006 | then 1007 | #delete the line and insert the new line 1008 | grep -v "$INSTALL_USER[[:space:]]\+hard[[:space:]]\+nofile[[:space:]]\+[0-9]\+" /etc/security/limits.conf > /tmp/limits.conf 1009 | cp /tmp/limits.conf /etc/security/limits.conf 1010 | echo "$INSTALL_USER hard nofile $FILE_OPEN_MAX_HARDLIMIT" >> /etc/security/limits.conf 1011 | else 1012 | echo "Value of FILE OPEN MAX HARDLIMIT in response file is not greater than value in /etc/security/limits.conf.Hence not changing it." | tee -a $log_file/orarun.log 1013 | fi 1014 | fi 1015 | else 1016 | echo "$INSTALL_USER hard nofile $FILE_OPEN_MAX_HARDLIMIT" >> /etc/security/limits.conf 1017 | fi 1018 | fi 1019 | 1020 | if [ -n "$FILE_OPEN_MAX_SOFTLIMIT" ] 1021 | then 1022 | #if line is present in the file then 1023 | #get current value from /etc/security/limits.conf 1024 | echo "File open max softlimit in response file:$FILE_OPEN_MAX_SOFTLIMIT" >> $log_file/orarun.log 1025 | if grep "^$INSTALL_USER[[:space:]]\+soft[[:space:]]\+nofile[[:space:]]\+[0-9]\+" /etc/security/limits.conf 1026 | then 1027 | val=`grep "^$INSTALL_USER" /etc/security/limits.conf | awk '/soft[[:space:]]*nofile/ {print $4}'` 1028 | echo "File open max softlimit in /etc/security/limits.conf:$val" >> $log_file/orarun.log 1029 | if [ ! $FILE_OPEN_MAX_SOFTLIMIT ] || [ ! $val ] 1030 | then 1031 | echo "Could not find FILE_OPEN_MAX_SOFTLIMIT from /etc/security/limits.conf or response file."; 1032 | EXIT_CODE=1; 1033 | else 1034 | if [ $FILE_OPEN_MAX_SOFTLIMIT -gt $val ] 1035 | then 1036 | #delete the line and insert the new line 1037 | grep -v "^$INSTALL_USER[[:space:]]\+soft[[:space:]]\+nofile[[:space:]]\+[0-9]\+" /etc/security/limits.conf > /tmp/limits.conf 1038 | cp /tmp/limits.conf /etc/security/limits.conf 1039 | echo "$INSTALL_USER soft nofile $FILE_OPEN_MAX_SOFTLIMIT" >> /etc/security/limits.conf 1040 | else 1041 | echo "File open max softlimit in response file is not greater than value in /etc/security/limits.conf. Hence not changing it." |tee -a $log_file/orarun.log 1042 | fi 1043 | fi 1044 | else 1045 | echo "$INSTALL_USER soft nofile $FILE_OPEN_MAX_SOFTLIMIT" >> /etc/security/limits.conf 1046 | fi 1047 | fi 1048 | fi 1049 | fi 1050 | 1051 | #Set default and current runlevels correctly 1052 | if [ "`echo $CHANGE_CURRENT_RUNLEVEL | tr A-Z a-z`" == "true" ] 1053 | then 1054 | /sbin/telinit $DESIRED_CURRENT_RUNLEVEL 1055 | fi 1056 | 1057 | if [ "`echo $CHANGE_DEFAULT_RUNLEVEL | tr A-Z a-z`" == "true" ] 1058 | then 1059 | INITTAB_FILE="/etc/inittab" 1060 | echo "Modifying $INITTAB_FILE to update the default runlevel" | tee -a $log_file/orarun.log 1061 | typeset -i linenumber=`grep -n ":initdefault" $INITTAB_FILE | awk -F: '{ print $1 }'` 1062 | typeset -i linesbefore=$linenumber-1 1063 | head -n $linesbefore $INITTAB_FILE > $INITTAB_FILE.tmp 1064 | echo "id:$DESIRED_DEFAULT_RUNLEVEL:initdefault:" >> $INITTAB_FILE.tmp 1065 | typeset -i totallines=`wc -l $INITTAB_FILE | awk '{ print $1 }'` 1066 | typeset -i linesafter=$totallines-$linenumber 1067 | tail -n $linesafter $INITTAB_FILE >> $INITTAB_FILE.tmp 1068 | mv $INITTAB_FILE.tmp $INITTAB_FILE 1069 | # tell init to re-examine the /etc/inittab file. 1070 | /sbin/telinit q 1071 | fi 1072 | 1073 | 1074 | #set inventory permissions 1075 | if [ "`echo $SET_INVENTORY_PERMISSIONS | tr A-Z a-z`" == "true" ] 1076 | then 1077 | 1078 | echo "setting permissions for the central inventory '$CENTRAL_INVENTORY'" |tee -a $log_file/orarun.log 1079 | /bin/chmod 770 -R $CENTRAL_INVENTORY 1080 | /bin/chown -R $ORACLE_USER:$INSTALL_GROUP $CENTRAL_INVENTORY 1081 | fi 1082 | 1083 | 1084 | #Setup virtual ip 1085 | if [ "`echo $SETUP_VIRTUAL_IP | tr A-Z a-z`" == "true" ] 1086 | then 1087 | echo "Updating /etc/hosts with Virtual IP information ..." >> $log_file/orarun.log 1088 | domain_name="`domainname`" 1089 | #strip off quotes 1090 | ip_host_list=`grep ^VIRTUAL_IP_INFO $resp_file | cut -d= -f2` 1091 | ip_host_list=`echo $ip_host_list | cut -d\" -f2` 1092 | ip_host_list=`echo $ip_host_list | cut -d\" -f1` 1093 | for ip_hosts in $ip_host_list 1094 | do 1095 | ip=`echo $ip_hosts | cut -d: -f1` 1096 | host=`echo $ip_hosts | cut -d: -f2` 1097 | 1098 | echo $host | grep "$domain_name" 1099 | if [ $? -eq 0 ] 1100 | then 1101 | fqhn="$host" 1102 | host=`echo $fqhn | awk -F. '{ print $1 }'` 1103 | else 1104 | fqhn="$host.$domain_name" 1105 | fi 1106 | echo "$ip $fqhn $host" >> /etc/hosts 1107 | if [ $? -ne 0 ] 1108 | then 1109 | echo "An error occured while trying to update /etc/hosts file with Virtual IP information." |tee -a $log_file/orarun.log 1110 | fi 1111 | done 1112 | fi 1113 | 1114 | #Setup private nodes 1115 | if [ "`echo $SETUP_PRIVATE_NODES | tr A-Z a-z`" == "true" ] 1116 | then 1117 | echo "Updating /etc/hosts with private node information" >> $log_file/orarun.log 1118 | domain_name="`domainname`" 1119 | ip_host_list=`grep ^PRIVATE_NODE_INFO $resp_file | cut -d= -f2` 1120 | ip_host_list=`echo $ip_host_list | cut -d\" -f2` 1121 | ip_host_list=`echo $ip_host_list | cut -d\" -f1` 1122 | for ip_hosts in $ip_host_list 1123 | do 1124 | ip=`echo $ip_hosts | cut -d: -f1` 1125 | host=`echo $ip_hosts | cut -d: -f2` 1126 | echo $host | grep "$domain_name" 1127 | if [ $? -eq 0 ] 1128 | then 1129 | fqhn="$host" 1130 | host=`echo $fqhn | awk -F. '{ print $1 }'` 1131 | else 1132 | fqhn="$host.$domain_name" 1133 | fi 1134 | echo "$ip $fqhn $host" >> /etc/hosts 1135 | if [ $? -ne 0 ] 1136 | then 1137 | echo "An error occured while trying to update /etc/hosts file with Private Node information." |tee -a $log_file/orarun.log 1138 | fi 1139 | done 1140 | fi 1141 | 1142 | #Change primary group for users 1143 | if [ "`echo $CHANGE_PRIMARY_GROUP | tr A-Z a-z`" == "true" ] 1144 | then 1145 | echo "Changing primary group for users ... " >> $log_file/orarun.log 1146 | user_group_list=`grep ^USERS_PRIMARY_GROUP $resp_file | cut -d= -f2` 1147 | 1148 | #Strip off quotes 1149 | user_group_list=`echo $user_group_list | cut -d\" -f2` 1150 | user_group_list=`echo $user_group_list | cut -d\" -f1` 1151 | for user_groups in `echo $user_group_list` 1152 | do 1153 | # user_groups=`echo $user_groups | tr , \ ` 1154 | user=`echo $user_groups | cut -d: -f1` 1155 | if id $user 1156 | then 1157 | primary_grp=`echo $user_groups | cut -d: -f2` 1158 | #Check if the user has the correct primary group 1159 | existing_primary_group=`id -ng $user` 1160 | if [ "$existing_primary_group" != "$primary_group" ] 1161 | then 1162 | # Change the primary group for the user 1163 | group_ids=`grep "$primary_grp:" /etc/group | awk -F: '{ print $3 }'` 1164 | for group_id in $group_ids 1165 | do 1166 | in_primary_group_name=`grep ":$group_id:" /etc/group | awk -F: '{ print $1 }'` 1167 | if [ "$in_primary_group_name" = "$primary_grp" ] 1168 | then 1169 | primary_group_id=$group_id 1170 | fi 1171 | done 1172 | /usr/sbin/usermod -g $primary_group_id $user 1173 | existing_grps=`id -nG $user` 1174 | # replace all spaces in existing_grps by , 1175 | existing_grps=`echo $existing_grps | tr \ ,` 1176 | /usr/sbin/usermod -G $existing_grps,$existing_primary_group $user 1177 | if [ $? -ne 0 ] 1178 | then 1179 | echo "User: $user could not be added to all the groups in the list $grp_list. " |tee -a $log_file/orarun.log 1180 | fi 1181 | fi 1182 | else 1183 | echo "$user does not exist. " | tee -a $log_file/orarun.log 1184 | fi 1185 | done 1186 | fi 1187 | 1188 | #Add users to the required groups 1189 | if [ "`echo $ADD_USER_TO_GROUP | tr A-Z a-z`" == "true" ] 1190 | then 1191 | echo "Adding users to required groups ... " >> $log_file/orarun.log 1192 | user_group_list=`grep ^USERS_GROUPS $resp_file | cut -d= -f2` 1193 | 1194 | #Strip off quotes 1195 | user_group_list=`echo $user_group_list | cut -d\" -f2` 1196 | user_group_list=`echo $user_group_list | cut -d\" -f1` 1197 | for user_groups in `echo $user_group_list` 1198 | do 1199 | # user_groups=`echo $user_groups | tr , \ ` 1200 | user=`echo $user_groups | cut -d: -f1` 1201 | if id $user 1202 | then 1203 | grp_list=`echo $user_groups | cut -d: -f2` 1204 | #get the groups user belongs to 1205 | existing_grps=`id -nG $user` 1206 | # replace all spaces in existing_grps by , 1207 | existing_grps=`echo $existing_grps | tr \ ,` 1208 | /usr/sbin/usermod -G $grp_list,$existing_grps $user 1209 | if [ $? -ne 0 ] 1210 | then 1211 | echo "User: $user could not be added to all the groups in the list $grp_list. " |tee -a $log_file/orarun.log 1212 | fi 1213 | else 1214 | echo "$user does not exist." | tee -a $log_file/orarun.log 1215 | fi 1216 | done 1217 | fi 1218 | 1219 | 1220 | #install of ocfs tools 1221 | install_ocfs_packages ${INSTALL_PACKAGES_OCFS_TOOLS} "${PACKAGES_OCFS_TOOLS}" ${RPM_BASE_URL_OCFS_TOOLS} `uname -i` 1222 | 1223 | #install of ocfs 1224 | install_ocfs_packages ${INSTALL_PACKAGES_OCFS} "${PACKAGES_OCFS}" ${RPM_BASE_URL_OCFS} `uname -p` 1225 | 1226 | 1227 | #loading of ocfs kernel module 1228 | if [ "`echo $INSTALL_OCFS_MODULE | tr A-Z a-z`" == "true" ] 1229 | then 1230 | #Add /sbin to PATH so that ifconfig can run 1231 | PATH=$PATH:/sbin 1232 | if [ -f /etc/ocfs.conf ] 1233 | then 1234 | echo "No need to populate /etc/ocfs.conf" 1235 | else 1236 | for private_node in $PRIVATE_NODES 1237 | do 1238 | private_ip=`grep "$private_node" /etc/hosts | awk ' { print $1 }'` 1239 | if check_ifconfig "$private_ip" 1240 | then 1241 | #This is the Private IP address which needs to go into /etc/ocfs.conf 1242 | echo "node_name = $private_node" > /etc/ocfs.conf 1243 | echo "ip_address = $private_ip" >> /etc/ocfs.conf 1244 | echo "ip_port = 7000" >> /etc/ocfs.conf 1245 | echo "comm_voting = 1" >> /etc/ocfs.conf 1246 | fi 1247 | done 1248 | /sbin/ocfs_uid_gen -c 1249 | fi 1250 | #Prepare the dependencies among kernel modules which can later be used by modprobe 1251 | /sbin/depmod -a 1252 | kernel_rel=`uname -r` 1253 | cd /lib/modules/$kernel_rel 1254 | LOAD_OCFS=/sbin/load_ocfs 1255 | mkdir -p ocfs 1256 | cd ocfs 1257 | ln -s /lib/modules/$kernel_rel/kernel/drivers/addon/ocfs/ocfs.o ocfs.o 1258 | typeset -i load_ocfs_updated=`grep "MODULE=" $LOAD_OCFS | grep -v "MODULE_SCRIPT" | awk '$1 !~ /#/ { print $0 }' | grep "/lib/modules/$kernel_rel/ocfs/ocfs.o" | wc -l` 1259 | if [ $load_ocfs_updated -eq 0 ] 1260 | then 1261 | # Check if atleast the MODULE= line is present 1262 | typeset -i module_line_present=`grep "MODULE=" $LOAD_OCFS | grep -v "MODULE_SCRIPT" | wc -l` 1263 | if [ $module_line_present -ne 0 ] 1264 | then 1265 | #There should be only one such line 1266 | typeset -i linenumber=`grep -n "MODULE=" $LOAD_OCFS | grep -v "MODULE_SCRIPT" | awk -F: '{ print $1 }'` 1267 | head -n $linenumber $LOAD_OCFS > $LOAD_OCFS.tmp 1268 | echo "MODULE=/lib/modules/$kernel_rel/ocfs/ocfs.o" >> $LOAD_OCFS.tmp 1269 | typeset -i totallines=`wc -l $LOAD_OCFS | awk '{ print $1 }'` 1270 | typeset -i linesafter=$totallines-$linenumber-1 1271 | tail -n $linesafter $LOAD_OCFS >> $LOAD_OCFS.tmp 1272 | mv $LOAD_OCFS.tmp $LOAD_OCFS 1273 | else 1274 | echo "Could not find MODULE= line in $LOAD_OCFS. Please update $LOAD_OCFS manually. Please add the following line at the appropriate place: MODULE=/lib/modules/$kernel_rel/ocfs/ocfs.o." 1275 | updated_load_ocfs="false" 1276 | fi 1277 | fi 1278 | chmod +x ${LOAD_OCFS} 1279 | ${LOAD_OCFS} 1280 | fi 1281 | 1282 | 1283 | #Mount devices using required parameters 1284 | if [ "`echo $ENABLE_MOUNT | tr A-Z a-z`" == "true" ] 1285 | then 1286 | echo "Mounting devices with required parameters ..." >> $log_file/orarun.log 1287 | mount_info_list=$MOUNT_INFO 1288 | for mount_info in `echo $mount_info_list` 1289 | do 1290 | type_info=`echo $mount_info | cut -d% -f1` 1291 | device_info=`echo $mount_info | cut -d% -f2` 1292 | mount_pt=`echo $mount_info | cut -d% -f3` 1293 | mount_options=`echo $mount_info | cut -d% -f4` 1294 | #First updating /etc/fstab if not updated already 1295 | grep $device_info /etc/fstab 1296 | 1297 | if [ $? != 0 ] 1298 | then 1299 | #Update /etc/fstab 1300 | echo "$device_info $mount_pt $type_info $mount_options 0 2" >> /etc/fstab 1301 | fi 1302 | # Create the mount location if does not exist already 1303 | if ! test -d "$mount_pt" 1304 | then 1305 | su $INSTALL_USER -c "mkdir -p $mount_pt" 1306 | if [ $? -ne 0 ] 1307 | then 1308 | echo "Could not create mount point $mount_pt" | tee -a $log_file/orarun.log 1309 | fi 1310 | fi 1311 | #If mount point is in use; mount point could be in format /scratch/dir or /scratch/dir/ 1312 | if mount -l | grep "$mount_pt[/]\?[[:space:]]\+" 1313 | then 1314 | #if the reqd device is already mounted on the given mount point umount and mount again, else if someother device is mounted, then error out. |||ly device can be in same format at mt pt. 1315 | if mount -l | grep "$mount_pt[/]\?[[:space:]]\+" | grep "$device_info[/]\?[[:space:]]\+" 1316 | then 1317 | echo "Unmounting the device..." 1318 | if ! umount $mount_pt 1319 | then 1320 | echo "Unmounting of $device_info failed, check if the device is in use." | tee -a $log_file/orarun.log 1321 | else 1322 | mount -t $type_info $device_info $mount_pt -o $mount_options 1323 | if [ $? -ne 0 ] 1324 | then 1325 | echo "Mounting $device_info on mountpoint $mount_pt with parameter $mount_options failed." | tee -a $log_file/orarun.log 1326 | fi 1327 | fi 1328 | else 1329 | echo "Some other filesystem is already mounted on $mount_pt. Specify another mount point or try unmounting the file system from $mount_pt."| tee -a $log_file/orarun.log 1330 | fi 1331 | else 1332 | if ! mount -t $type_info $device_info $mount_pt -o $mount_options 1333 | then 1334 | echo "Mounting $device_info on mountpoint $mount_pt with parameter $mount_options failed." | tee -a $log_file/orarun.log 1335 | fi 1336 | fi 1337 | done 1338 | 1339 | fi 1340 | 1341 | #install the required packages 1342 | if [ "`echo $INSTALL_PACKAGES | tr A-Z a-z`" == "true" ] 1343 | then 1344 | if [ "`echo $USE_YUM | tr A-Z a-z`" == "true" ] 1345 | then 1346 | http_proxy=http://$HTTP_PROXY:$HTTP_PORT/ 1347 | export http_proxy 1348 | ftp_proxy=http://$FTP_PROXY:$FTP_PORT/ 1349 | export ftp_proxy 1350 | if [ -z "$YUM_CONF_LOCATION" -o ! -r "$YUM_CONF_LOCATION" ] 1351 | then 1352 | curr_dir=`pwd` 1353 | echo "\n Creating the yum.conf file $curr_dir/yum.conf.. \n " 1354 | YUM_LOG_DIR="/var/yum" 1355 | if [ ! -e $YUM_LOG_DIR ] 1356 | then 1357 | mkdir -p $YUM_LOG_DIR 1358 | fi 1359 | if [ ! -e $YUM_CACHE_LOC ] 1360 | then 1361 | mkdir -p $YUM_CACHE_LOC 1362 | fi 1363 | prefix="" 1364 | if [ "$protocol" != "http" -o "$protocol" != "ftp:" ] 1365 | then 1366 | prefix="file://localhost" 1367 | fi 1368 | cat < $curr_dir/yum.conf 1369 | [main] 1370 | cachedir=$YUM_CACHE_LOC 1371 | debuglevel=2 1372 | errorlevel=2 1373 | logfile=$YUM_LOG_DIR/yum.log 1374 | pkgpolicy=newest 1375 | tolerant=0 1376 | exactarch=1 1377 | 1378 | [base] 1379 | baseurl=$prefix$YUM_REPOSITORY_URL 1380 | EOF 1381 | YUM_CONF_LOCATION=$curr_dir/yum.conf 1382 | fi 1383 | if [ -n "$PACKAGES" ] 1384 | then 1385 | for package in $PACKAGES $GLIBC_PACKAGE $OCFS_PACKAGES 1386 | do 1387 | yum -y -c $YUM_CONF_LOCATION install $package 1388 | if ! rpm --quiet -q $package 1389 | then 1390 | echo "Package: $package could not be installed" |tee -a $log_file/orarun.log 1391 | fi 1392 | done 1393 | fi 1394 | 1395 | else 1396 | #USE RPM TO INSTALL PACKAGES 1397 | echo "Installing packages using rpm ..." >> $log_file/orarun.log 1398 | for rpm_name in $RPM_FILENAMES 1399 | do 1400 | url="$RPM_BASE_URL/$rpm_name" 1401 | if [ -n $url ] 1402 | then 1403 | protocol="`expr $url : '\(....\)'`" 1404 | if [ "$protocol" == "http" ] 1405 | then 1406 | rpm -Uvh $url --httpproxy $HTTP_PROXY --httpport $HTTP_PORT 1407 | elif [ "$protocol" == "ftp:" ] 1408 | then 1409 | rpm -Uvh $url --ftpproxy $FTP_PROXY --ftpport $FTP_PORT 1410 | else 1411 | rpm -Uvh $url 1412 | fi 1413 | fi 1414 | done 1415 | for package in $PACKAGES $GLIBC_PACKAGE $OCFS_PACKAGES 1416 | do 1417 | if ! rpm --quiet -q $package 1418 | then 1419 | echo "Package: $package could not be installed." |tee -a $log_file/orarun.log 1420 | fi 1421 | done 1422 | fi 1423 | fi 1424 | 1425 | #install the oracle packages : bug fix 7378320 1426 | if [ "`echo $ORACLE_PACKAGES_ENABLE | tr A-Z a-z`" == "true" ] 1427 | then 1428 | #export all the env vars required for installing the packages 1429 | if [ -n "$EXPORT_RPM_VARS" ] 1430 | then 1431 | for var in $EXPORT_RPM_VARS 1432 | do 1433 | export $var 1434 | done 1435 | fi 1436 | 1437 | #install the packages from rpm location 1438 | if [ -n "$ORACLE_PACKAGES" ] 1439 | then 1440 | for package in $ORACLE_PACKAGES 1441 | do 1442 | oraclepackage="$ORACLE_RPM_LOCATION/$package" 1443 | echo Installing Package $oraclepackage 1444 | rpm -Uvh $oraclepackage 1445 | returncode=$? 1446 | done 1447 | fi 1448 | fi 1449 | 1450 | #install the oracle packages : bug fix 7378320 1451 | if [ "`echo $REMOVE_USER_FROM_GROUP_ENABLE | tr A-Z a-z`" == "true" ] 1452 | then 1453 | echo "Removing user '$REMOVE_USER' from group '$REMOVE_FROM_GROUP' ..." 1454 | existing_user_groups=`id -nG $REMOVE_USER | grep $REMOVE_FROM_GROUP` 1455 | if [ "$existing_user_groups" == "" ]; 1456 | then 1457 | echo "User '$REMOVE_USER' not in group '$REMOVE_FROM_GROUP'" 1458 | else 1459 | modified_groups=`echo $existing_user_groups | sed "s/$REMOVE_FROM_GROUP//g" | sed "s/ / /g" | sed "s/ /,/g"` 1460 | /usr/sbin/usermod -G $modified_groups $REMOVE_USER 1461 | fi 1462 | fi 1463 | 1464 | exit $EXIT_CODE ; 1465 | --------------------------------------------------------------------------------