installing on ubuntu

Skip to first unread message

Ed Schwartz

Mar 20, 2008, 3:24:32 PM3/20/08

I'd like to share my experience installing Shared Records software
running under Ubuntu 7.10 in a VMware VM in case it's useful to
others. I haven't heavily tested my new install yet, but things seem
to be working fine. Andreas: thanks for your help!

-- Ed

A) One-time only setup when starting from a basic Ubuntu system running
in a VM.

- Install packages.

apt-get install sun-java6-jre sun-java6-javadb libcommons-codec-java
tomcat5.5 tomcat5.5-webapps tomcat5.5-admin

I also like: apt-show-versions, xterm, lynx, curl, liblog4j1.2-java-gcj

- Make sun Java be the default Java.

# /usr/sbin/update-alternatives --config java
Select /usr/lib/jvm/java-6-sun/jre/bin/java

Note that tomcat logging is disabled with gij (GNU interpreter for
Java bytecode) which is undesirable.

- Make a link for .jar with org/apache/commons/codec/binary/Base64:

# cd /usr/share/tomcat5.5/common/lib
# ln -s /usr/share/java/commons-codec.jar

- I wanted to have the separate virtual disk for a local data store.
Halt VM and make second disk using VMware workstation (64 GB scsi, one file,

Boot VM and create partition table and filesystem for new disk.

# mkdir /disk2
# fdisk /dev/sdb
# mke2fs -j /dev/sdb1

Reboot so udev finds new disk. Look in /var/log/udev for UUID. Edit

# /dev/sdb1 -- second disk for application files
UUID=80745db9-b679-47b0-a7a7-17d9a54039c5 /disk2 ext3 defaults,errors=remount-ro 0 1

Create a /disk2/var/sra/data_store directory and "chown tomcat55 sra"
and "chown tomcat55 sra/data_store/".

- Add a user for tomcat in /usr/share/tomcat5.5/conf/tomcat-users.xml

<user username="wheel" password="records" roles="admin,manager"/>

- Use manager web interface to deploy .war files for record and token.

- Edit configuration files for Shared Records servlets.

to use:

org.sharedrecords.core.RemoteURL =http://records1.local:8180/records/

where "records1.local" is replaced by the hostname

- Create a policy file to allow servlets to work,
/usr/share/tomcat5.5/conf/policy.d/51sr.policy, which will be
automatically copied into /usr/share/tomcat5.5/conf/catalina.policy
when tomcat starts:

grant codeBase "file:${catalina.base}/webapps/tokens/WEB-INF/-" {

grant codeBase "file:${catalina.base}/webapps/records/WEB-INF/-" {

B) Setup that has to be done initially and each time a VM is cloned.

- Edit /etc/udev/rules.d/70-persistent-net.rules so eth0 matches
correct mac address. (Typically after a clone, the old mac address
is associated with eth0 which can be deleted. The second listed mac
address is the new one that can be changed from eth1 to eth0. With
Ubuntu running on real hardware, this is what one would do if (and
only if) one installed a new ethernet card.)

- Change hostname (/etc/hostname). Change networking if desired (e.g.
to use static IP) by modifying /etc/network/interfaces. Edit
/etc/hosts if desired.

- Update the hostname in

C) Testing

There should be a default tomcat page at http://HOST:8180 with account
wheel/records. http://HOST:8180/records/ and http://HOST:8180/tokens/
are the endpoints.

Log files:

tail -f /var/log/tomcat5.5/catalina.*.log # SR accesss
tail -f /var/log/tomcat5.5/localhost.*.log # other error msg

Reply all
Reply to author
0 new messages