Changes between Version 3 and Version 4 of ContinuousIntegrationSetup


Ignore:
Timestamp:
08/23/2011 05:00:28 AM (4 years ago)
Author:
aaugustin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ContinuousIntegrationSetup

    v3 v4  
    1 = Continuous Integration =
    2 
    3 == System ==
    4 
    5 OS: Ubuntu 11.04 (GNU/Linux 2.6.38-8-server x86_64)
    6 
    7 == Jenkins ==
    8 
    9 == SQLite ==
    10 
    11 == PostgreSQL ==
    12 
    13 == MySQL ==
    14 
    15 == Oracle ==
    16 
    17 === Install Oracle ===
    18 
    19 This is a simplified version of the installation procedure described at:
    20 http://forums.oracle.com/forums/thread.jspa?threadID=2227554
    21 
    22 === Create a Debian / Ubuntu package ===
    23 
    24 ''This can be done on another machine, you just need the resulting files, `oracle-xe_11.2.0-1.5_amd64.deb` and `oracle-instantclient11.2-basiclite_11.2.0.2.0-2_amd64.deb`.''
    25 
    26 Download Oracle XE and Oracle InstantClient for Red Hat from Oracle's website (free but registration required).
    27 
    28 {{{
    29 # apt-get install alien
    30 # alien --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
    31 # alien --scripts oracle-instantclient11.2-basiclite-11.2.0.2.0.x86_64.rpm
    32 }}}
    33 
    34 === Prepare installation ===
    35 {{{
    36 # apt-get install bc libaio1
    37 }}}
    38 
    39 We create a fake `chkconfig` program because the installation scripts need it.
    40 
    41 {{{
    42 # cat > /sbin/chkconfig
    43 #!/bin/sh
    44 if [ "$1" = '--add' ]; then
    45     update-rc.d "$2" defaults
    46 elif [ "$1" = '--del' ]; then
    47     update-rc.d -f "$2" remove
    48 fi
    49 
    50 # chmod +x /sbin/chkconfig
    51 }}}
    52 
    53 With this hack, there's a harmless warning during installation because the init script isn't tailored for Debian / Ubuntu:
    54 {{{
    55 update-rc.d: warning: /etc/init.d/oracle-xe missing LSB information
    56 update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
    57 }}}
    58 
    59 === Install and  configure the server ===
    60 
    61 {{{
    62 # dpkg -i oracle-xe_11.2.0-1.5_amd64.deb
    63 # /etc/init.d/oracle-xe configure
    64 }}}
    65 
    66 You will be asked for the password for SYS and SYSTEM at this step.
    67 
    68 {{{
    69 # su oracle
    70 $ echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >> ~/.bashrc
    71 $ exit
    72 }}}
    73 
    74 {{{
    75 # rm /sbin/chkconfig
    76 }}}
    77 
    78 === Test the server ===
    79 
    80 {{{
    81 # su oracle
    82 $ sqlplus / as sysdba
    83 SQL> quit
    84 $ exit
    85 }}}
    86 
    87 === Install the client ===
    88 
    89 {{{
    90 # dpkg -i oracle-instantclient11.2-basiclite_11.2.0.2.0-2_amd64.deb
    91 }}}
    92 
    93 The libraries are installed in a non-standard directory, declare it:
    94 
    95 {{{
    96 # echo /usr/lib/oracle/11.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf
    97 # ldconfig
    98 }}}
    99 
    100 In the virtualenv where you need it, install `cx_Oracle` with pip. This requires `pythonX.Y-dev`, where `X.Y` is the version of Python used in your virtual env.
    101 
    102 {{{
    103 $ . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    104 $ pip install cx_Oracle
    105 }}}
    106 
    107 
    108 === Test the client ===
    109 
    110 {{{
    111 # python
    112 >>> import cx_Oracle
    113 }}}
    114 
    115 === APEX ===
    116 
    117 APEX is reachable at http://localhost:8080/ but I can't figure out how to login.
    118 Since we don't need it for the purposes of running Django's test suite, we
    119 disable it:
    120 
    121 {{{
    122 SQL> EXEC DBMS_XDB.SETHTTPPORT(0);
    123 SQL> COMMIT;
    124 }}}
    125 
    126 If we wanted to enable it again:
    127 
    128 {{{
    129 SQL> EXEC DBMS_XDB.SETHTTPPORT(8080);
    130 SQL> COMMIT;
    131 }}}
    132 
    133 === Uninstall the server ===
    134 
    135 This was tested on a VM and may be useful in the future.
    136 
    137 {{{
    138 # /etc/init.d/oracle-xe stop
    139 # dpkg -P oracle-xe
    140 }}}
    141 
    142 The `prerm` script doesn't work on Debian / Ubuntu; here's how to clean up your system entirely.
    143 
    144 {{{
    145 # rm -r /u01
    146 # update-rc.d oracle-xe remove
    147 # rm /etc/default/oracle-xe /etc/oratab /var/lib/update-rc.d/oracle-xe
    148 # rm -r /etc/kde/xdg/menus/OracleXE
    149 # rmdir -p /etc/kde/xdg/menus
    150 }}}
    151 
    152 === Uninstall the client ===
    153 
    154 This wasn't tested.
    155 
    156 {{{
    157 # dpkg -P oracle-instantclient11.2-basiclite
    158 # rm /etc/ld.so.conf.d/oracle-instantclient.conf
    159 # ldconfig
    160 }}}
     1See https://github.com/ojii/django-ci-info
Back to Top