Index: openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl 29 Aug 2001 21:22:48 -0000 1.2 +++ openacs-4/packages/acs-bootstrap-installer/db-init-checks-oracle.tcl 13 Mar 2002 22:50:53 -0000 1.3 @@ -14,8 +14,7 @@ # This should never happened - we were able to grab a handle previously, why not now? append my_errors "(db_bootstrap_checks) Internal error accessing pool \"$pool\".
" set my_error_p 1 - } else { - # DRB: The aD code didn't deallocate the database handle if either of the following + } else { # DRB: The aD code didn't deallocate the database handle if either of the following # errors occured. Boo hiss... if { [catch { ns_ora 1row $db "select sysdate from dual" }] || [catch { ns_ora exec_plsql_bind $db { begin :1 := 37*73; end; } 1 "" }] } { @@ -44,6 +43,11 @@ if { [db_string sysdate "select sysdate from dual"] != [ns_fmttime [ns_time] "%Y-%m-%d"] } { # See if NLS_DATE_FORMAT is set correctly + append my_errors "

" + append my_errors [db_string sysdate "select sysdate from dual"] + append my_errors "

" + append my_errors [ns_fmttime [ns_time] "%Y-%m-%d"] + append my_errors "


" append my_errors "
  • Your Oracle driver is correctly installed, however Oracle's date format should be set to YYYY-MM-DD.

    \n" set my_error_p 1 @@ -64,33 +68,105 @@ # check, so let them check! if {![info exists env(ORACLE_HOME)]} { append my_errors "
  • - There is no ORACLE_HOME variable in your environment. This variable must be set in order for the installer to locate your Oracle instance.

    + There is no ORACLE_HOME variable in your environment. +This variable must be set in order for the Oracle software to work properly (even on an Oracle client).

    " set my_error_p 1 - } elseif { ![file exists "$env(ORACLE_HOME)/ctx/bin/ctxhx"] && ![ad_windows_p]} { - append my_errors "

  • The file $env(ORACLE_HOME)/ctx/bin/ctxhx which is needed -by the OpenACS Content Repository is not present in your filesystem. You must be running Oracle 8.1.6 -with Intermedia installed to use OpenACS. If you are using Linux, this file is missing because Oracle -does not distribute it with the Linux version of Oracle. However, you can replace this file with a -shell script that acts as a workaround.

    -The program ctxhx is primarily used to convert files to HTML or TEXT and can -support translating between different character sets. The content repository does not need -this extensive functionality, so you can replace the program with + } + + # First we look for the overall presence of interMedia + db_1row check_role "SELECT (SELECT COUNT(*) FROM USER_ROLE_PRIVS WHERE GRANTED_ROLE = 'CTXAPP') ctxrole, + (SELECT COUNT(*) FROM ALL_USERS WHERE USERNAME = 'CTXSYS') ctxuser, + USER thisuser FROM DUAL" + if {$ctxuser < 1} { + append my_errors "

  • The CTXSYS user does not exist in your database. This means +that interMedia is probably not installed. interMedia is needed for full-text searching. +To install it, you may either use the Oracle Database Assistant (dbassist under UNIX) to re-create +your database or add the missing capabilities (JServer and interMedia), or, if you're feeling adventurous, look at running +the SQL*Plus script \$ORACLE_HOME/ctx/admin/dr0inst.sql on the Oracle server.

    " + set my_error_p 1 + } + + if {$ctxrole < 1} { + append my_errors "
  • The CTXAPP role has not been granted to this database +user ($thisuser). Without the role, it will be impossible to synchronize interMedia indexes +and several other tasks. As a dba user (e.g., SYSTEM), grant the role:

    +GRANT CTXAPP TO $thisuser;
    +
    +If you still receive this error after restarting AOLserver, you may need to include the role +as a \"default\" role for the user. To do so, run the following as a dba user such as SYSTEM: +
    +ALTER USER $thisuser DEFAULT ROLE ALL;
    +
    +

    " + + set my_error_p 1 + } + + + # drop in a function to convert an Oracle supplied procedure into + # function output + set sql "CREATE OR REPLACE FUNCTION oacs_get_oracle_version(p_which IN VARCHAR2 DEFAULT 'version') + RETURN VARCHAR2 AS + v_version VARCHAR2(50); + v_compat VARCHAR2(50); + BEGIN + DBMS_UTILITY.DB_VERSION( v_version, v_compat ); + IF LOWER(p_which) = 'version' THEN + RETURN v_version; + ELSIF LOWER(p_which) = 'compatibility' THEN + RETURN v_compat; + ELSE + RETURN ''; + END IF; + END oacs_get_oracle_version;" + db_dml create_oacs_get_oracle_version $sql + + db_1row get_platform_dbversion "SELECT DBMS_UTILITY.PORT_STRING platform, oacs_get_oracle_version('version') dbversion FROM DUAL" + # the following isn't used currently, but maybe someday we'll give the user + # a snapshot of what we think their environment is + switch -regexp -- $platform { + {^IBMPC/WIN_NT.*} {set platformname "Windows"} + {^SVR4-be-.*} {set platformname "Solaris"} + {^IBM AIX/RS.*} {set platformname "RS/6000 AIX"} + {^HP9000.*} {set platformname "HP-UX on HP 9000"} + {^Linuxi386.*} {set platformname "Linux on Intel" } + {^DEC Alpha OSF/1} {set platformname "Tru64 UNIX on Alpha" } + } + + set dbversion_list [split $dbversion .] + set dbversion_major [lindex $dbversion_list 0] + set dbversion_minor [lindex $dbversion_list 1] + set dbversion_patch [lindex $dbversion_list 2] + set dbversion_total [expr {($dbversion_major * 1000000) + ($dbversion_minor * 1000) + ($dbversion_patch)}] + + # Check for Oracle 8.1.6 and before running on Linux. If so, we've got to tell the user + # what to do about lack of INSO filter support in interMedia there. + if {($dbversion_total <= 8001006) && [string match $platform "Linuxi386*"]} { + append my_errors "
  • You are running Oracle $dbversion under Linux (Intel). Versions of +Oracle prior to 8.1.7 lack the INSO filters used by interMedia. (These filters convert content +stored in a variety of proprietary formats (e.g., Microsoft Word) into plain text or HTML for indexing +and searching.) The best solution is to upgrade the server to Oracle 8.1.7. A workaround is to create the +file \$ORACLE_HOME/ctx/bin/ctxhx +on the Oracle server containing the following lines: +

     #!/bin/sh
     cat \$1 > \$2
     
    - -Save the above text in $env(ORACLE_HOME)/ctx/bin/ctxhx, and give -it the proper ownership and permissions. +This is a simple shell script that just copies the input onto the output. This will work fine +for the HTML and text documents generally stored in this toolset. After saving this file, +be sure to give it the proper ownership and permissions:
    -chown oracle:oinstall $env(ORACLE_HOME)/ctx/bin/ctxhx
    -chmod 755 $env(ORACLE_HOME)/ctx/bin/ctxhx
    +chown oracle:oinstall \$ORACLE_HOME/ctx/bin/ctxhx
    +chmod 755 \$ORACLE_HOME/ctx/bin/ctxhx
     

    " - set my_error_p 1 } + + # do some cleanup + db_dml drop "DROP FUNCTION oacs_get_oracle_version" # ksh must be installed for Oracle's loadjava to work. @@ -104,7 +180,8 @@ append my_errors "

  • The file /bin/ksh is not present. This file is the Korn shell and is required by Oracle's loadjava utility for adding Java class files to the database. It must be installed in order for OpenACS to install properly. Please obtain it from - David Korn's Kornshell page. Install it and provide + David Korn's Kornshell page. (Alternatively, pdksh + (a ksh clone) has been reported to work.) Install it and provide a symbolic link from /bin/ksh to the executable. Alternatively, loadjava is known to work if /bin/sh is linked to /bin/ksh. You can do this by typing as root: