![]() |
The Hitchhiker's Guide to the ACSby Bryan Quinn, Adam Farkas, Doug Hoffman, Hiroyoshi Iwashima, Ryan Lee and Ravi Jasuja, |
This step should be done as nsadmin.
$ tar -xzf acs-3.2.3.tar.gz
$ cd /web $ mv acs service_name.ini
$ cp -r acs /web/service_name.ini $ cp -r acs /web/service_name-dev.iniIf you choose to do this, you will need to create multiple Oracle tablespaces (read: lots of disk space).
You should be logged on as nsadmin for this step and you should make sure that nsadmin is in the dba group. You can verify this by typing groups when you login.
svrmgrl
$ svrmgrl Oracle Server Manager Release 3.1.5.0.0 - Production (c) Copyright 1997, Oracle Corporation. All Rights Reserved. Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production With the Partitioning and Java options PL/SQL Release 8.1.5.0.0 - Production SVRMGR> connect internal Connected.
SVRMGR> select file_name from dba_data_files;Example results:
/ora8/m01/app/oracle/oradata/ora8/system01.dbf /ora8/m01/app/oracle/oradata/ora8/tools01.dbf /ora8/m01/app/oracle/oradata/ora8/rbs01.dbf /ora8/m01/app/oracle/oradata/ora8/temp01.dbf /ora8/m01/app/oracle/oradata/ora8/users01.dbf /ora8/m01/app/oracle/oradata/ora8/indx01.dbf /ora8/m01/app/oracle/oradata/ora8/drsys01.dbf
m0n
subdirectories in the above listing)
separate from the Oracle system data files. In this example, we'll use
/ora8/m02/oradata/ora8/
.
autoextend
. This allows the tablespace's
storage capacity to grow as the size of the data grows. We set the
pctincrease to be a very low value so that our extents won't grow
geometrically. We do not set it to 0 at the tablespace level because this
would affect Oracle's ability to automatically coalesce free space in the
tablespace.
SVRMGR> create tablespace service_name datafile '/ora8/m02/oradata/ora8/service_name01.dbf' size 50m autoextend on default storage ( pctincrease 1);
database_password
with the appropriate password.)
SVRMGR> create user service_name identified by database_password default tablespace service_name temporary tablespace temp quota unlimited on service_name; SVRMGR> grant connect, resource, ctxapp, javasyspriv to service_name; SVRMGR> revoke unlimited tablespace from service_name; SVRMGR> alter user service_name quota unlimited on service_name;
exp service_name/database_password file=foo.dmp consistent=y full=y
To import:
imp service_name/database_password file=foo.dmp [fromuser=olduser touser=service_name]
drop user
command with the cascade
option. This command will drop the user and every database object the user owns.
drop user service_name cascade
If this does not work because svrmgrl "cannot drop a user that is currently connected", make sure to kill the AOLserver using this user. If it still does not work, do:
select username, sid, serial# from v$session where username='service_name';
and then
alter system kill session 'sid,serial#';
where sid and serial# are replaced with the corresponding values for the open session.
Use with caution!
If you feel the need to delete everything related to the service, you can also issue the following:
drop tablespace service_name including contents cascade constrains;
You should do this step as root.
crontab -l | grep export-oracle
You should see a line similar to the following:
0 23 * * * /usr/local/sbin/export-oracleIf you don't see it, you should add it:
EDITOR=emacs crontab -e
/usr/local/sbin/export-oracle
has the correct environmental variables.
#!/bin/sh HOME=/home/oracle HZ= LOGNAME=oracle ORACLE_BASE=/ora8/m01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/8.1.6 PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib ORACLE_SID=ora8 ORACLE_TERM=vt100 ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data PATH=/ora8/m01/app/oracle/product/8.1.5/bin:/ora8/m01/app/oracle/product/8.1.5/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/ccs/bin:/usr/ucb:/usr/dt/bin:/usr/openwin/bin:/usr/local/bin:/usr/sbin SHELL=/bin/sh TERM=vt100 TZ=US/Eastern exportdir=/export_root/oracle-exports file=$exportdir/oraexport-service_name.dmp mv -f $file.gz $file.old.gz exp service_name/database_password file=$file owner=service_name consistent=Y gzip $file
localhost (127.0.0.1)
):
netstat -in | awk '{ print $4 }' | xargs -i% sh -c 'if [ `grep % /home/aol30/*.ini > /dev/null` $? -eq "1" ]; then echo %; fi'
You should do this as nsadmin.
nsadmin
using template-ini.ini as a template.
Variable to replace | Target Value |
---|---|
${service_database_username} | service_name |
${service_database_password} | master |
${AOL_HOME} | /home/aol30 |
${service_short_name} | service_name |
${service_short_description} | a description of your service |
${service_email} | the email address of the maintainer |
${ACS_HOME} | /web/service_name |
${service_ip_address} | your ip address |
${service_ip_name} | your dns name |
${service_port} | what port to use (80 by default) |
${service_ip_address_ssl} | disabled by default |
${service_ip_name_ssl} | disabled by default |
${service_port_ssl} | disabled by default |
chmod 700 /home/aol30/bin/nsd-oracleNow edit nsd-oracle as necessary, making sure that all of the variables are set properly.
/home/aol30/bin/nsd-oracle -c /home/aol30/servername.ini
to test out your server setup. View your error log
(/home/aol30/log/servername-error.log) to make sure the
service is starting without any problems. Attempt to connect to the service
from a web browser.
You should run this step as root. This can break every service on your machine, so proceed with caution.
/etc/inittab
for editing.
nss:234:respawn:/home/nsadmin/bin/nsd-oracle -i -c /home/nsadmin/service_name.ini
/sbin/init q
to start the server.