Installing on Amazon AWS and Linux

Here are the steps to install the stand-alone version of RAMADDA on Amazon Linux, Redhat, Ubuntu or Centos.
If you are running on Amazon AWS see awsec2.html for details on how to create a server.
Configure your instance
Once your instance is running here are the steps to configure and install RAMADDA.
  1. If you are running on AWS then, from the Instances page, view the details of your instance to see its IPv4 Public IP
  2. SSH to your instance using the PEM file:
    ssh -i <.pem file>  ec2-user@<server IP address>
    
  3. It is best to update the instance:
    For Amazon Linux:
    sudo yum update -y
    
    For Ubuntu:
    sudo apt update
    
    You also may need to install unzip:
    For Amazon:
    sudo yum install unzip
    
    For Ubuntu:
    sudo apt install unzip
    
  4. Fetch and unzip the RAMADDA installer:
    wget https://ramadda.org/repository/release/latest/ramaddainstaller.zip;unzip ramaddainstaller.zip
    
  5. Run the installer:
    sudo sh ramaddainstaller/install.sh
    
The installer will walk you through a number of installation steps to setup the directories, and install and configure Java, Postgres (optionally) and the RAMADDA server. The installer will:
  • Let you choose where the ramaddainstaller and ramaddahome directories will be placed
  • If on AWS mount the EBS volume ias /mnt/ramadda
  • For Amazon Linux you can optionally install and configure PostgreSQL. A RAMADDA user and a repository database will be created. The database will be stored at: /mnt/ramadda/pgsql and which is linked to from /var/lib/pgsql. If you don't choose Postgres then RAMADDA defaults to it's built-in Derby database.
  • Download and install RAMADDA.
  • Configure RAMADDA with a self-signed certificate for HTTPS access. Accessing this for the first time will result in a browser warning because it is self-signed.
  • Install RAMADDA as a service.
Once running you need to finish the configuration through the RAMADDA web interface:
https://<IP address>/repository
The install process will display an installation password that you enter through the web interface. This install password is held in >RAMADDA Home>/install.properties
Note: since the SSL certificate is self-signed your browser will display a warning when accessing the site.
Server files
The install will result in:
The installer:
<home dir>/ramaddainstaller  

Update script:
sudo sh <home dir>/ramaddainstaller/update.sh

The installed server:
/mnt/ramadda/ramaddainstall

A file that contains the RAMADDA_HOME, PORT and path to Java
It is sourced by the ramadda.sh below
/mnt/ramadda/ramaddainstall/ramaddaenv.sh

The log output of the server:
/mnt/ramadda/ramaddainstall/ramadda.log 

The ramadda executable:
/mnt/ramadda/ramaddainstall/ramaddaserver 

The service runs
/mnt/ramadda/ramaddainstall/ramaddaserver/ramadda.sh 

------------------------------
The RAMADDA home directory:
/mnt/ramadda/ramaddahome 

Holds the database password:
/mnt/ramadda/ramaddahome/install.properties 

The generated keystore. You can replace this with a real certificate
/mnt/ramadda/ramaddahome/keystore 

Holds the keystore passwords:
/mnt/ramadda/ramaddahome/ssl.properties

Holds the install password:
/mnt/ramadda/ramaddahome/install.properties 

Holds the database password:
/mnt/ramadda/ramaddahome/db.properties  


------------------------------
Postgres database (if installed): The /var/lib/... pgsql dir links to here
/mnt/ramadda/pgsql

Command Line Utilities
If you are a Mac or Linux user and are running on AWS here is a useful set of command line utilities. First download this ramadda_aws.sh shell script and move it to some permanent directory:
https://github.com/geodesystems/ramadda/raw/refs/heads/master/bin/ramadda_aws.sh

Now, let's assume your project is called ramadda (note: this really can be any name). In your .bashrc file put:
source /path/to/ramadda_aws.sh ramadda <SOME IP> -pem <PATH TO .PEM FILE>
e.g.
source /path/to/ramadda_aws.sh ramadda 123.456.789.123 -pem /path/to/ramadda.pem
This creates the following aliases:
print out the IP address
ip_goramadda   

ssh to the machine:
goramadda   

copy (with scp) scp <some file> to the machine:
putramadda <some file>

copy (with scp)  <some file> to the <some directory> on the machine
putramadda <some file> <some directory>

copy (with scp)  <some file> from the server
getramadda <some file> 

Update to the latest release of RAMADDA and restarts your server:
updateramadda 

Update to the latest development release of RAMADDA:
devupdateramadda 

Restart RAMADDA
startramadda 

For example, if you have a plugin file you want to install you can just do:
putramadda <the plugin file> /mnt/ramadda/ramaddahome/plugins
startramadda
Note: it is handy to have a symbolic link on your server to the plugins directory. From the server command line do:
ln -s plugins /mnt/ramadda/ramaddahome/plugins
Now, if you need to update a plugin just do:
putramadda <the plugin file> plugins
startramadda