Вы находитесь на странице: 1из 7

################################################################################ Xps Single configuration ################################################################################ Single configuration #################### The Xps daemon and the Oracle database

are running on the same machine Naming conventions ################## Xps400 : Xps version name (XPS_FO-4.00) MYXPS : Oracle database name geovation user: Linux user, owner of the geovation distribution database user : Linux user, owner of the database distribution (oracle user) Xps Host: host on which the Xps daemon (xpsd) and the Oracle database are ru nning /soft/geovation: /opt/oracle : /data01/oracle : /data02/oracle : File File File File system system system system to to to to install the geovation software install the oracle software store the system database files (ORACLE_DATA) store the projects data files (XPS_DATA)

################################################################################ Xps installation ################ Logon as geovation user on Xps Host Get Xps distribution: Xps400.tar.gz % cp -p Xps400.tar.gz /soft/geovation % cd /soft/geovation % tar xvfzp Xps400.tar.gz Configure the Xps environment for the Xps client applications ############################################################# Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % cd $XPSROOT/data % cp -p config.xps.example config.xps % chmod 666 config.xps % vi config.xps Customize the following variables to fit your environment Xps*server : host name (or IP address) of the Xps Host Xps*base : Oracle database name (ORACLE_SID) [MYXPS] Xps*port : 4100 Ora*listener : Oracle listener port number [1521] Ora*server : host name (or IP address) of the Xps Host Configure the Xps environment for the Xps server ################################################ Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400

% cd $XPSROOT/admin/data % cp -p xps.env.example xps.env.`hostname` % chmod 755 xps.env.`hostname` % vi xps.env.`hostname` Customize the following variables to fit your environment ORACLE_SID : MYXPS XPS_DATA : /data02/oracle/XPS_DATA SAME_HOST_ORA_XPSD : YES XPSPORT : 4100 ORA_LSN_PORT : 1521 ORACLE_BASE : /opt/oracle ################################################################################ Create ORACLE_DATA and XPS_DATA directories ########################################### Logon as root user on Xps Host # cd /data01/oracle # mkdir -m 770 ORACLE_DATA # chown -R oracle:dba ORACLE_DATA # cd /data02/oracle # mkdir -m 770 XPS_DATA # chown -R oracle:dba XPS_DATA Create the Xps database ####################### NOTE #### The Create_Database_ca.csh script: * Creates the database using dbca in silent mode * Uses the template file $XPSROOT/admin/template/TemplateXpsFo.dbt * Creates the files: * listener.ora * tnsnames.ora * oracle.env in the directory /opt/oracle/admin/MYXPS * Grants the execute privilege on dbms_lock to the user system END OF NOTE ########### Logon as database user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/Create_Database_ca.csh Enter the database name: MYXPS Enter the database files directory for SYSTEM and PROJ tablespaces: /data01/oracle/ORACLE_DATA Configure and re-start the listener - Re-start the database ########################################################### NOTE ####

The default listener port is set to 1521. In this case: * The listener name is set to LISTENER * Use: $XPSROOT/admin/bin/startlsn MYXPS LISTENER and $XPSROOT/admin/bin/stoplsn MYXPS LISTENER * The startlsn and stoplsn scripts unset the TNS_ADMIN variable and looks for the listener.ora file in the /opt/oracle/product/10.2.0/db_4/network/admin directory If the listener port is set to another number (typically 1551): * The listener name is set to LISTENER_XPS1OG * Use: $XPSROOT/admin/bin/startlsn MYXPS LISTENER_MYXPS and $XPSROOT/admin/bin/stoplsn MYXPS LISTENER_MYXPS * The TNS_ADMIN variable is set to /opt/oracle/admin/MYXPS * The startlsn and stoplsn scripts looks for the listener.ora file in the $TNS_ADMIN directory END OF NOTE ########### If the listener port is set to 1521, add the contents of the file: /opt/oracle/admin/MYXPS/listener.ora to the file: /opt/oracle/product/10.2.0/db_4/network/admin/listener.ora % % % % $XPSROOT/admin/bin/stoplsn MYXPS LISTENER | LISTENER_MYXPS $XPSROOT/admin/bin/stopdb MYXPS $XPSROOT/admin/bin/startlsn MYXPS LISTENER | LISTENER_MYXPS $XPSROOT/admin/bin/startdb MYXPS

Initialize the Xps database ########################### NOTE #### The database script: * Creates Xps roles and users and grants roles to these users * Installs the AFTER SUSPEND trigger * Installs the "multiple site" option * Installs the Xps dictionary END OF NOTE ########### Logon as geovation user on Xps Host Then Logon as database user on Xps Host [using "su" and not "su -"] % setenv XPSROOT /soft/geovation/Xps400 % echo $LD_LIBRARY_PATH if undefined then enter setenv LD_LIBRARY_PATH /usr/local/lib:/opt/oracle/product/10. 2.0/db_4/lib % $XPSROOT/admin/bin/database To the question : Keep default XPSMANAGER password (y/n) Enter y to use the default XPS manager passworld n to define a particular password for XPS manager account

Choose option C Enter Oracle system name : system Oracle system password : manager Choose option I Choose option X Start the After Suspend Trigger listener ######################################## Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/startlsn MYXPS LISTENERXPSMYXPS ################################################################################ Create the Auxiliary database ############################# Logon as database user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % rm -rf $ORACLE_BASE/admin/WMYXPS [repository previously created] % $XPSROOT/admin/bin/Create_Database_ca.csh Enter the database name: WMYXPS Enter the database files directory for SYSTEM and PROJ tablespaces: /data01/oracle/ORACLE_DATA Initialize the Auxiliary database ################################# Logon as geovation user on Xps Host Then Logon as database user on Xps Host [using "su" and not "su -"] % setenv XPSROOT /soft/geovation/Xps400 % echo $LD_LIBRARY_PATH if undefined enter setenv LD_LIBRARY_PATH /opt/oracle/product/10.2.0/db_ 4/lib % $XPSROOT/admin/bin/wdatabase To the question : Keep default XPSMANAGER password (y/n) Enter y to use the default XPS manager passworld n to define a particular password for XPS manager account Choose option C Enter Oracle system name : system Oracle system password : manager Choose option I Choose option X Create the Auxiliary database ############################# Logon as database user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/stopdb WMYXPS

################################################################################ Start xpsd daemon ################# Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/xpsstart Create a Xps project #################### Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/xpsadm -create TEST Do you want to use a pattern project ? (Y, N) : N Check AFTER SUSPEND trigger ########################### Logon as database user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/stopdb MYXPS % $XPSROOT/admin/bin/startdb MYXPS % setenv gvr_root dummy % source $XPSROOT/admin/bin/xpsenvset % sqlplus / as sysdba SQL> select name from v$datafile where name like '%D1%'; NAME ---------------------------------------------------------------------------/data02/oracle/XPS_DATA/MYXPS/D1_TEST_1461028501_0.dbf SQL> exec addfile('/soft/geovation/Xps400/admin/bin/XpsAddFileAfterSuspend XPSMANAGER_password D1_TEST_1461028501') PL/SQL procedure successfully completed. SQL> select name from v$datafile where name like '%D1%'; NAME ---------------------------------------------------------------------------/data02/oracle/XPS_DATA/MYXPS/D1_TEST_1461028501_0.dbf /data02/oracle/XPS_DATA/MYXPS/D1_TEST_1461028501_1.dbf SQL> !ls -latr /data02/oracle/XPS_DATA/MYXPS/D1_TEST_1461028501* /data02/oracle/XPS_DATA/MYXPS/D1_TEST_1461028501_0.dbf /data02/oracle/XPS_DATA/MYXPS/D1_TEST_1461028501_1.dbf SQL> quit ################################################################################

Start Xps ######### Logon as oracle user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/startlsn MYXPS LISTENER | LISTENER_XPS1OG % $XPSROOT/admin/bin/startdb MYXPS Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/startlsn MYXPS LISTENERXPSMYXPS % $XPSROOT/admin/bin/xpsstart ################################################################################ Stop Xps ######## Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/xpsstop Logon as oracle user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/stopdb MYXPS % $XPSROOT/admin/bin/stoplsn MYXPS LISTENER | LISTENER_XPS1OG Logon as geovation user on Xps Host % setenv XPSROOT /soft/geovation/Xps400 % $XPSROOT/admin/bin/stoplsn MYXPS LISTENERXPSMYXPS ################################################################################ Listeners status ################ Logon as geovation or oracle user on Xps Host % source /usr/local/bin/coraenv ORACLE_SID = [oracle] ? MYXPS % setenv XPSROOT /soft/geovation/Xps400 % source $XPSROOT/admin/bin/xpsenvset % lsnrctl status LISTENER | LISTENER_XPS1OG % lsnrctl status LISTENERXPSMYXPS ################################################################################ IT administrators ################# For an automatic start of the database at machine boot or to shutdown the databa se when the machine is stopped, the following scripts must be customized .

$XPSROOT/admin/bin/applisrv.template $XPSROOT/admin/bin/applidb.template $XPSROOT/admin/bin/setuptemplate.csh

Вам также может понравиться