summaryrefslogtreecommitdiff
path: root/www/aipo/MESSAGE
blob: 6468159d212f9640e46ddc9d60afcaf275aa4e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
===========================================================================
$NetBSD: MESSAGE,v 1.4 2012/11/26 15:52:37 ryoon Exp $

To use aipo, you will need to perform the following steps.

1. Install postgresql server, for example postgresql91-server,
   and enable it.

	# cd databases/postgresql91-server
	# make install
	and follow MESSAGE in databases/postgresql91-server directory.

2. Install apache tomcat server, for example apache-tomcat7

	# cd www/apache-tomcat7
	# make install

3. Start postgresql server, for example

	# ${RCD_SCRIPTS_DIR}/pgsql start

4. Add postgresql user, aipo_pgsql

	$ sudo -u pgsql createuser aipo_pgsql
	Shall the new role be a superuser? (y/n) y

5. Set password to aipo_pgsql user

	$ sudo -u pgsql psql template1
	psql (9.1.6)
	Type "help" for help.

	template1=# alter user aipo_pgsql with password 'aipo_db_password';
	ALTER ROLE
	template1=# \q

6. Create database fot Aipo

	$ sudo -u pgsql createdb org001 -O aipo_pgsql -U aipo_pgsql

7. Check created database

	$ sudo -u pgsql psql -l
                             List of databases
   Name    |   Owner    | Encoding  | Collation | Ctype | Access privileges
-----------+------------+-----------+-----------+-------+-------------------
 org001    | aipo_pgsql | SQL_ASCII | C         | C     |
(snip)

8. Initialize Aipo database and inser sample data.

	$ sudo -u pgsql psql -U aipo_pgsql -d org001 -p 5432 -f \
		${PREFIX}/share/aipo/webapps/aipo/WEB-INF/sql/org001.sql
	$ sudo -u pgsql psql -U aipo_pgsql -d org001 -p 5432 -f \
		${PREFIX}/share/aipo/webapps/aipo/WEB-INF/sql/sample.sql

9. Unlimit database

	$ sudo -u pgsql psql -U aipo_pgsql -d org001 -p 5432 \
		-c "UPDATE AIPO_LICENSE SET LIMIT_USERS=0"

10. Set Aipo location to apache tomcat
	$ sudo vi ${PREFIX}/share/tomcat/conf/server.xml
	Add
	<Context path="/aipo" docBase="${PREFIX}/share/aipo/webapps/aipo" debug="0" reloadable="true">
        </Context>
	in <Host> tag

11. Regenerate securityTokenKey.txt files.

	$ sudo cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 64 | head -n 1 \
		> ${PREFIX}/share/aipo/webapps/aipo/WEB-INF/conf/securityTokenKey.txt
	$ sudo cp ${PREFIX}/share/aipo/webapps/aipo/WEB-INF/conf/securityTokenKey.txt \
		${PREFIX}/share/aipo/webapps/ROOT/WEB-INF/classes/aipo/securityTokenKey.txt

12. Start apache tomcat and access http://localhost:8080/aipo/portal
    Default username/password are admin/admin.
===========================================================================