How to install Drupal 7 with Oracle Database

How to install Drupal 7 with Oracle Database 11g Express Edition

Drupal 7 has a few security updates, more usability updates and new database features. By default, Drupal 7 has support for MySQL, MariaDB, and SQLite, but now it is possible to do the installation using other databases using modules, this is the case of Oracle databases.

In this tutorial I will explain the steps that I followed to do the installation of Drupal 7 with an Oracle Database 11g Express Edition. I’m using as source the tutorial of Ash P. in the websitehttp://inode.me/tutorials/how-to-drupal-7-oracle-xe-install. I did a few modifications to be able of finishing the installation.

  1. The minimum system requirements are:

    • Apache
    • PHP 5.2 or higher
    • Oracle Database 11g Express Edition
    • The PDO_OCI  extension for PHP to enable the management of Oracle databases
  2. After fulfilling all system requirements we need to prepare the environment:

    Linux

    1. export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/11.2.0/server
    2. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH  

    Windows

    1. Computer
    2. Properties
    3. Advanced System Configuration
    4. Inside Advanced Options: Environment variables
      1. System variables: New
        1. Variable name: ORACLE_HOME
        2. Variable value: C:\oraclexe\app\oracle\product\11.2.0\server
      2. System variables: New
        1. Variable name: LD_LIBRARY_PATH
        2. Variable value: $ORACLE_HOME/lib:$LD_LIBRARY_PATH
  3. After having the environment ready, we need to create a directory for the tablespace that will be used with Drpal, and we assure that it has the necessary permissions.

    Linux

    • Make a directory for the tablespace (# mkdir /var/www/htdocs/drupaldb)
    • Make sure this directory is owned by user oracle (# chown oracle /var/www/htdocs/drupaldb)

    Windows

    • Create the directory and assign it the necessary permissions (755)
  4. Connect to Oracle by the SQL Command Line.

    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Feb 5 02:14:22 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> conn system
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create tablespace drupal
      2  logging
      3  datafile '/var/www/htdocs/drupaldb/drupal.dbf'
      4  size 32m
      5  autoextend on
      6  next 32m maxsize 3072m
      7  extent management local;
    Tablespace created.
    SQL> create user [drupal] identified by [password]
      2  default tablespace [drupal]
      3  temporary tablespace temp;
    User created.
    SQL> grant unlimited tablespace to drupal;
    Grant succeeded.
    SQL> conn sys/[password] as sysdba
    Connected.
    SQL> grant all privileges to drupal;
    Grant succeeded.

  5. Download the Oracle Driver module from http://drupal.org/project/oracle

  6. Install the Oracle Driver in the correspondent directories. Follow the instructions in the README.txt file of the module.

    Linux

    # cd [path to drupal dir]/includes/database/
    # tar xzvf <oracle-7.x-*.tar.gz>
    # cd oracle/module
    # mv oracle [path to drupal dir]/sites/all/modules

    Windows

    1-    Unzip the module in [path to drupal dir]/includes/database/
    2-    Go to oracle/module
    3-    Move oracle directory to [path to drupal dir]/sites/all/modules

  7. Start Drupal installation

    1. http://domain.com/install.php
    2. I always choose the Standard profile and English language
    3. Configure the database
      1. Database type: Oracle
      2. Database name: XE. Is the default by Oracle XE
      3. Database username: [drupal]
      4. Database password: [password]
    4. Continue with the installation.
  8. Enable the Oracle Driver module

    1. Go to Administration Modules
    2. Enable the Oracle Driver module
    3. Go to Configuration  Oracle to clear the BLOBS

After following this tutorial you should have a running Drupal site using an Oracle database.

以上来自:http://edufk.site90.com/?q=blog/how-install-drupal-7-oracle-database-11g-express-edition

posted @ 2012-03-07 20:04  DB&*NIX  阅读(426)  评论(0编辑  收藏  举报