Create INSTALL.md
This commit is contained in:
parent
d87781f91f
commit
6dc46a6593
1 changed files with 86 additions and 0 deletions
86
INSTALL.md
Normal file
86
INSTALL.md
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
# Installation on Ubuntu 16.04
|
||||||
|
|
||||||
|
Installation for other distros may be slightly different. This assumes nodejs 8 and npm are already installed. All of this is done in the lamassu-server directory.
|
||||||
|
|
||||||
|
## Packages
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install postgresql postgresql-contrib postgresql-server-dev-9.5 libpq-dev git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Set up PostgreSQL
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u postgres createdb lamassu
|
||||||
|
sudo -u postgres psql postgres
|
||||||
|
```
|
||||||
|
|
||||||
|
In ``psql``, run the following and set password to ``postgres123``:
|
||||||
|
|
||||||
|
```
|
||||||
|
\password postgres
|
||||||
|
ctrl-d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install node modules
|
||||||
|
Ignore any warnings.
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Generate certificates
|
||||||
|
|
||||||
|
```
|
||||||
|
bash bin/cert-gen.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: This will create a ``.lamassu`` directory in your home directory.
|
||||||
|
|
||||||
|
## Set up database
|
||||||
|
|
||||||
|
Important: lamassu-migrate currently gripes about a QueryResultError. Ignore this, it works anyway. Also, ignore Debug lines from lamassu-apply-defaults.
|
||||||
|
|
||||||
|
```
|
||||||
|
node bin/lamassu-migrate
|
||||||
|
node bin/lamassu-apply-defaults
|
||||||
|
```
|
||||||
|
|
||||||
|
## Register admin user
|
||||||
|
|
||||||
|
You'll use this generated URL in the brower in moment.
|
||||||
|
|
||||||
|
```
|
||||||
|
node bin/lamassu-register admin
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run lamassu-admin-server
|
||||||
|
|
||||||
|
In first terminal window:
|
||||||
|
|
||||||
|
```
|
||||||
|
node bin/lamassu-admin-server --dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Complete configuration
|
||||||
|
|
||||||
|
Paste the URL from lamassu-register exactly as output, into a browser (chrome or firefox).
|
||||||
|
|
||||||
|
**Important**: the host must be localhost. Tell your browser to trust the certificate even though it's not signed by a CA.
|
||||||
|
|
||||||
|
Go to all the required, unconfigured red fields and choose some values. Choose mock services whenever available.
|
||||||
|
|
||||||
|
## Run lamassu-server
|
||||||
|
|
||||||
|
In second terminal window:
|
||||||
|
|
||||||
|
```
|
||||||
|
node bin/lamassu-server --mockSms
|
||||||
|
```
|
||||||
|
|
||||||
|
## Add a lamassu-machine
|
||||||
|
|
||||||
|
Click on ``+ Add Machine`` in the sidebar. Type in a name for your machine and click **Pair**. Open up development tools to show the JavaScript console and copy the totem. You will use this to run lamassu-machine. This pairing totem expires after an hour.
|
||||||
|
|
||||||
|
Now continue with lamassu-machine instructions from the ``INSTALL.md`` file in lamassu-machine.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue