Project

General

Profile

metacat / docs / user / os_specific / install_metacat_ubuntu.txt @ 3067

1
Installing Metacat on Ubuntu
2

    
3
Assumes you have the base ubuntu distribution set up already.
4

    
5
* Add the extra repositories to your apt sources list. 
6
    sudo gedit /etc/apt/sources.list
7
    # add universe and multiverse to the following lines
8
       deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
9
       deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
10
    sudo apt-get update
11

    
12
* Install the ubuntu package dependencies
13
    sudo apt-get install tomcat5-webapps postgresql-server-dev-8.1 postgresql-8.1 sun-java5-jdk \
14
                         apache2 cvs 
15

    
16
* Tell the ubuntu system to use the java jdk 
17
    sudo update-java-alternatives -s java-1.5.0-sun
18

    
19
    sudo vi /etc/default/tomcat5
20
      JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
21
      .......
22
      CATALINA_OPTS="-Djava.awt.headless=true -Djava.util.prefs.syncInterval=2000000 -Xmx512M -server"
23
      ....
24
      TOMCAT_SECURITY=no
25

    
26
    sudo /etc/init.d/tomcat5 restart
27

    
28
* Download metacat from CVS and set up utilites     
29
    
30
    mkdir ~/workspace; cd ~/workspace
31
    cvs -d:ext:perry@cvs.ecoinformatics.org:/cvs co metacat
32
    cvs -d:ext:perry@cvs.ecoinformatics.org:/cvs co utilities
33
    cd utilities
34
    ant clean jar
35
    cd ../metacat
36

    
37
* prep postgres
38

    
39
    # Setting up the postgres metacat db
40
    sudo vi /etc/postgresql/8.1/main/pg_hba.conf
41
    # add 
42
      host metacat metacat 127.0.0.1 255.255.255.255 password
43
    sudo su postgres
44
    createdb metacat
45
    psql -d metacat
46
      create user metacat with unencrypted password 'metacatpass';
47
      \q
48
    exit
49

    
50
    #restart postgres
51
    sudo /etc/init.d/postgresql-8.1 restart
52
 
53
    # TEST
54
    psql -U metacat -W -h localhost metacat
55

    
56
* Build
57
   sudo touch /var/lib/tomcat5/webapps/knb.war
58
   sudo chown perry /var/lib/tomcat5/webapps/knb.war
59
   cd ~/workspace/metacat
60
   cp build.properties default.build.properties
61
   # Edit build.properties 
62
   vi lib/metacat.properties
63

    
64
   #change
65
     onlySecureLDAPConnection=false
66
   # TODO set up the certificate *********
67

    
68
   ant clean install
69
   # may need to give cvs password a few times on the first build
70

    
71
* Postgres configuration
72
   psql -U metacat -W -h localhost -f build/src/xmltables-postgres.sql metacat
73
   ant register-schemas
74

    
75
* apache / tomcat integration
76
    #the instructions at http://www.ubuntuforums.org/showthread.php?t=219985 cover this pretty well
77
    #remember to add the 'knb' servlet context
78
 
79
* Make sure metacat_data and metacat_inline_data folders are readable/writable by tomcat user
80