# Install VICS on Debian or Ubuntu


## Install security and bugfix updates:

```sudo apt-get update; sudo apt-get dist-upgrade```


## Install dependencies:

```sudo apt-get install build-essential tcl8.5 redis-server postgresql postgresql-contrib git-core maven ntpdate```

On debian stable (jessie), maven 3.1.0 is required for vics web-client:

```apt-get -t jessie-backports install maven```


## Set correct time on server (needed for git clone over https):

```ntpdate -u time.nist.gov```


## Download VICS from GitHub:

```
cd /usr/local/src/
sudo git clone https://github.com/celestial-winter/vics.git
cd vics
```

## Create canvassing database:

```
sudo -u postgres createdb canvassapp
sudo -u postgres createuser root
sudo -u postgres createuser ubuntu
```

## Run database creation script:

```
psql -f web-server/src/test/resources/sql/drop-create.sql canvassapp
```

## Install Oracle Java 8:

Download latest version from https://jdk8.java.net/download.html and unpack in /opt
In /etc/environment set JAVA_HOME to point to the jre, then load with: 
```. /etc/environment```


## Check Java version is 1.8.x:

```
java -version
echo $JAVA_HOME
```

## Build VICS:

```
mvn clean install
```

Add install instructions for Debian/Ubuntu
Add install instructions for Debian/Ubuntu
