How to install Drupal 7 with Oracle Database
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.
-
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
-
After fulfilling all system requirements we need to prepare the environment:
Linux
- export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/11.2.0/server
- export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
Windows
- Computer
- Properties
- Advanced System Configuration
- Inside Advanced Options: Environment variables
- System variables: New
- Variable name: ORACLE_HOME
- Variable value: C:\oraclexe\app\oracle\product\11.2.0\server
- System variables: New
- Variable name: LD_LIBRARY_PATH
- Variable value: $ORACLE_HOME/lib:$LD_LIBRARY_PATH
- System variables: New
-
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)
-
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. -
Download the Oracle Driver module from http://drupal.org/project/oracle
-
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/modulesWindows
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 -
Start Drupal installation
- http://domain.com/install.php
- I always choose the Standard profile and English language
- Configure the database
- Database type: Oracle
- Database name: XE. Is the default by Oracle XE
- Database username: [drupal]
- Database password: [password]
- Continue with the installation.
-
Enable the Oracle Driver module
- Go to Administration
Modules - Enable the Oracle Driver module
- Go to Configuration Oracle to clear the BLOBS
- Go to Administration
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