Home / نصب درایور پایتونی اوراکل cx Oracle در اوبونتو

نصب درایور پایتونی اوراکل cx Oracle در اوبونتو


0- sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev

  1. apt-get install python-dev build-essential libaio1

  2. Download instantclient-basic-linux and instantclient-sdk-linux from Oracle's download site.

  3. Unzip the files to some directory (here I'm using /opt/ora/)

  4. Modify the path:

    export ORACLE_HOME=/opt/ora/instantclient_11_2

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME

  5. Create a symlink: cd $ORACLE_HOME && ln -s libclntsh.so.11.1 libclntsh.so

  6. Download the cx_Oracle source zip that corresponds with your Python and Oracle version.(pip install cx_Oracle)

  7. Expand the archive, then python setup.py build && python setup.py install from the extracted directory.




تنظیم آپاچی
he key seems to have been adding the Oracle libraries to ld.so.conf
or:

In Ubuntu, placing

export ORACLE_HOME=<your oracle home>
export LD_LIBRARY_PATH=<your library path>

in /etc/apache2/envvars seems to do the trick.

If nothing else helps, you can edit your Apache startup scripts and put above export lines just before Apache daemon startup (I recall I did something like this looong time ago on Debian).:/etc/init.d/httpd

restart apache



     RSS of this page