Changes between Version 19 and Version 20 of OracleTestSetup


Ignore:
Timestamp:
08/17/2013 01:56:28 PM (22 months ago)
Author:
timo
Comment:

Oracle VM on Ubuntu

Legend:

Unmodified
Added
Removed
Modified
  • OracleTestSetup

    v19 v20  
    398398   As for other credentials on the virtual machine, if you want to login as a regular user, just use ``oracle``/``oracle``, the root password is ``oracle`` as well. However, in order to run the test suite, you just need to boot the machine up, you don't need to start anything manually.
    399399
    400 #. Install *instantclient* on your host system (the one where you'll be running the test suite). On Gentoo there is an ebuild, which means it is just a matter of ``emerge -av oracle-instantclient-basic`` and fetching the appropriate zip archives from the Oracle download site as instructed, on Debian or Ubuntu you can download the RPM package, convert it to a DEB package using alien as outlined above and install that using ``dpkg -i``.
     400#. Install *instantclient* on your host system (the one where you'll be running the test suite). On Gentoo there is an ebuild, which means it is just a matter of ``emerge -av oracle-instantclient-basic`` and fetching the appropriate zip archives from the Oracle download site as instructed.
     401
     402  On Debian or Ubuntu you can download the RPM package ("Instant Client Package - Basic"), convert it to a DEB package and install using alien::
     403
     404   $ sudo alien -i oracle-instantclient-basic*.rpm
     405
     406  After installing the client, you will need to install the "Instant Client Package - SDK". After downloading, unzip and copy it to the client install directory::
     407     
     408    $ unzip instantclient-sdk-linux.x64-*.zip
     409    $ sudo cp -R instantclient_11_2/* /usr/lib/oracle/11.2/client64/*
    401410
    402411#. Start a new shell and install cx_Oracle in your testing virtualenv::
     
    404413    pip install cx_Oracle
    405414
    406    The new shell is necessary because the *instantclient* package sets various environment variables required to build the adapter.
     415   The new shell is necessary because the *instantclient* package sets various environment variables required to build the adapter. On Debian/Ubuntu, you'll need to set the variables manually::
     416
     417    $ export ORACLE_HOME=/usr/lib/oracle/11.2/client64/
    407418
    408419#. Create a settings file, the following example seems to work for me::
     
    411422        'default': {
    412423            'ENGINE': 'django.db.backends.oracle',
     424            'HOST': '127.0.0.1',
     425            'PORT': '1521',
    413426            'NAME': 'orcl',
    414427            'USER': 'system',
    415428            'PASSWORD': 'oracle',
    416             'HOST': 'localhost',
    417             'PORT': '1521',
     429            'TEST_USER': 'django',
     430            'TEST_TBLSPACE': 'django_test',
     431            'TEST_TBLSPACE_TMP': 'django_test_tmp',
    418432        },
    419433        'other': {
    420             'ENGINE': 'django.db.backends.sqlite3',
     434            'ENGINE': 'django.db.backends.oracle',
     435            'HOST': '127.0.0.1',
     436            'PORT': '1521',
     437            'NAME': 'orcl',
     438            'USER': 'system',
     439            'PASSWORD': 'oracle',
     440            'TEST_USER': 'other',
     441            'TEST_TBLSPACE': 'other_test',
     442            'TEST_TBLSPACE_TMP': 'other_test_tmp',
    421443        }
    422444    }
     
    427449
    428450#. Profit::
     451
     452     $ # may be need on Debian/Ubuntu
     453     $ export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
    429454
    430455    (env)johnny64@equus ~/GSoC/2011/koniiiik-django/tests $  ./runtests.py --settings=test_oracle
Back to Top