Warning, file /sdk/codevis/thirdparty/soci/scripts/vm/debian-oracle10g-install.sh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #/bin/sh 0002 # Script performs non-interactive instllation of Oracle XE 10g on Debian 0003 # 0004 # Based on oracle10g-update.sh from HTSQL project: 0005 # https://bitbucket.org/prometheus/htsql 0006 # 0007 # Modified by Mateusz Loskot <mateusz@loskot.net> 0008 # Changes: 0009 # - Add fake swap support (backup /usr/bin/free manually anyway!) 0010 # 0011 set -ex 0012 0013 # 0014 # Utilities 0015 # 0016 function free_backup() 0017 { 0018 # Multiple copies to be on safe side 0019 cp /usr/bin/free /root 0020 mv /usr/bin/free /usr/bin/free.original 0021 } 0022 0023 function free_restore() 0024 { 0025 cp /usr/bin/free.original /usr/bin/free 0026 } 0027 0028 # Install fake free 0029 # http://www.axelog.de/2010/02/7-oracle-ee-refused-to-install-into-openvz/ 0030 free_backup 0031 cat <<EOF >> /usr/bin/free 0032 #!/bin/sh 0033 cat <<__eof 0034 total used free shared buffers cached 0035 Mem: 1048576 327264 721312 0 0 0 0036 -/+ buffers/cache: 327264 721312 0037 Swap: 2000000 0 2000000 0038 __eof 0039 exit 0040 EOF 0041 chmod 755 /usr/bin/free 0042 0043 # Enable HTTPS for APT repositories. 0044 apt-get -q update 0045 apt-get -qy install apt-transport-https 0046 0047 # Register the Oracle repository. 0048 echo "deb https://oss.oracle.com/debian/ unstable main non-free" >/etc/apt/sources.list.d/oracle.list 0049 wget -q https://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | apt-key add - 0050 apt-get -q update 0051 0052 # Install the Oracle 10g Express Edition. 0053 apt-get -qy install oracle-xe 0054 0055 # Clean APT cache. 0056 apt-get clean 0057 0058 # Fix the problem when the configuration script eats the last 0059 # character of the password if it is 'n': replace IFS="\n" with IFS=$'\n'. 0060 sed -i -e s/IFS=\"\\\\n\"/IFS=\$\'\\\\n\'/ /etc/init.d/oracle-xe 0061 0062 # Configure the server; provide the answers for the following questions: 0063 # The HTTP port for Oracle Application Express: 8080 0064 # A port for the database listener: 1521 0065 # The password for the SYS and SYSTEM database accounts: admin 0066 # Start the server on boot: yes 0067 /etc/init.d/oracle-xe configure <<END 0068 8080 0069 1521 0070 admin 0071 admin 0072 y 0073 END 0074 0075 # Load Oracle environment variables so that we could run `sqlplus`. 0076 . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh 0077 0078 # Increase the number of connections. 0079 echo "ALTER SYSTEM SET PROCESSES=40 SCOPE=SPFILE;" | \ 0080 sqlplus -S -L sys/admin AS SYSDBA 0081 0082 # Set Oracle environment variables on login. 0083 cat <<END >>/root/.bashrc 0084 0085 . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh 0086 END 0087 0088 free_restore 0089