Set up the file system for one or more OpenACS Sites
For Linux Standard Base compliance and ease of backup,
@@ -81,7 +81,6 @@
drwx------ 7 service0 web 1024 Jan 6 14:36 service0
[service0 aolserver]$ exit
logout
-
[root root]#
su - service0
cd /var/lib/aolserver
@@ -96,23 +95,20 @@
Verify membership by typing
groups when you login:
-
-service0:~$ groups
+ [service0 ~]$ groups
dba web
If you do not see these groups, take the following action:
-
-service0:~$ su -
+ [service0 ~]$ su -
Password: ************
-[root ~]# adduser service0 dba
+[root ~]# adduser service0 dba
If you get an error about an undefined group, then add that group
manually:
-
-[root ~]# groupadd dba
-[root ~]# groupadd web
+
[root ~]# groupadd dba
+[root ~]# groupadd web
Make sure to logout as root when
you are finished with this step and log back in as
@@ -121,20 +117,15 @@
Connect to Oracle using
svrmgrl and login:
-
-service0:~$ svrmgrl
-
-SVRMGR> connect internal
+ [service0 ~]$ svrmgrl
+SVRMGR> connect internal
Connected.
Determine where the system tablespaces are stored:
-
-SVRMGR> select file_name from dba_data_files;
+
SVRMGR> select file_name from dba_data_files;
Example results:
-
-
-/ora8/m01/app/oracle/oradata/ora8/system01.dbf
+ /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
@@ -159,14 +150,14 @@
Create the directory for the datafile; to do this,
exit from svrmgrl and login as
root for this step:
-SVRMGR> exit
-service0:~$ su -
+SVRMGR> exit
+[service0 ~]$ su -
Password: ************
-[root ~]# mkdir -p /ora8/m02/oradata/ora8/
-[root ~]# chown service0.web /ora8/m02/oradata/ora8
-[root ~]# chmod 775 /ora8/m02/oradata/ora8
-[root ~]# exit
-service0:~$
+[root ~]# mkdir -p /ora8/m02/oradata/ora8/
+[root ~]# chown service0:web /ora8/m02/oradata/ora8
+[root ~]# chmod 775 /ora8/m02/oradata/ora8
+[root ~]# exit
+[service0 ~]$
Create a tablespace for the service. It is important that the
tablespace can autoextend. This
@@ -177,47 +168,43 @@
Oracle's ability to automatically coalesce free space in the
tablespace.
-
-service0:~$ svrmgrl
-
-SVRMGR> connect internal;
-SVRMGR> create tablespace service0
- datafile '/ora8/m02/oradata/ora8/service001.dbf'
- size 50M
- autoextend on
- next 10M
- maxsize 300M
- extent management local
- uniform size 32K;
+
[service0 ~]$ svrmgrl
+SVRMGR> connect internal;
+SVRMGR> create tablespace service0
+ datafile '/ora8/m02/oradata/ora8/service001.dbf'
+ size 50M
+ autoextend on
+ next 10M
+ maxsize 300M
+ extent management local
+ uniform size 32K;
Create a database user for this service. Give the
user access to the tablespace and rights to connect. We'll use
- service0password as our password.
- Write down what you specify as service_name
- (i.e. service0) and
- database_password
- (i.e. service0password). You
- will need this information for configuring exports and
- AOLserver.
+ service0password as our password.
+ Write down what you specify as
+ service_name
+ (i.e. service0)
+ and database_password
+ (i.e. service0password). You
+ will need this information for configuring exports
+ and AOLserver.
-SVRMGR> create user service0 identified by service0password default tablespace service0
-temporary tablespace temp quota unlimited on service0;
-SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to service0;
-SVRMGR> revoke unlimited tablespace from service0;
-SVRMGR> alter user service0 quota unlimited on service0;
-SVRMGR> exit;
+SVRMGR> create user service0 identified by service0password default tablespace service0
+ temporary tablespace temp quota unlimited on service0;
+SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to service0;
+SVRMGR> revoke unlimited tablespace from service0;
+SVRMGR> alter user service0 quota unlimited on service0;
+SVRMGR> exit;
Your table space is now ready. In case you are trying to delete a
previous OpenACS installation, consult these commands in the section called “Deleting a tablespace” below.
Make sure that you can login to Oracle using your
- service_name account:
-service0:~$ sqlplus service0/service0password
-SQL> select sysdate from dual;
-
+ service_name account: [service0 ~]$ sqlplus service0/service0password
+SQL> select sysdate from dual;
SYSDATE
----------
2001-12-20
-
-SQL> exit
+SQL> exit;
You should see today's date in a format 'YYYY-MM-DD.'
If you can't login, try redoing step 1 again. If the date is
in the wrong format, make sure you followed the steps outlined in
@@ -228,24 +215,20 @@
CREATE USER
[postgres pgsql]$ exit
logout
-
[root root]#
Create a database with the same name as our service name, service0.
[root root]# su - service0
[service0 service0]$ createdb -E UNICODE service0
CREATE DATABASE
[service0 service0]$
su - service0
-createdb -E UNICODE service0
Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.
[service0 service0]$ export EDITOR=emacs;crontab -e
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
-0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
Add Full Text Search Support (OPTIONAL)
[service0 service0]$ exit
-logout
-
-[root root]#