2019-07-12 23:20:55 +02:00
|
|
|
---
|
2019-08-06 01:12:05 +02:00
|
|
|
title: Debian
|
|
|
|
permalink: /install/debian
|
2021-06-04 15:34:40 +02:00
|
|
|
nav_order: 1
|
2019-07-27 13:04:06 +02:00
|
|
|
parent: Install
|
2019-07-12 23:20:55 +02:00
|
|
|
---
|
|
|
|
|
2019-08-06 01:12:05 +02:00
|
|
|
## Debian installation
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2021-07-27 18:33:25 +02:00
|
|
|
1. Install dependencies
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2021-12-02 12:09:03 +01:00
|
|
|
sudo apt install curl gcc g++ make wget libpq-dev
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
2019-08-06 01:12:05 +02:00
|
|
|
|
2021-07-27 18:33:25 +02:00
|
|
|
|
|
|
|
1. Install Node.js & yarn
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2021-07-27 18:33:25 +02:00
|
|
|
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
|
|
|
|
sudo apt-get install -y nodejs
|
|
|
|
sudo npm install -g yarn
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
2021-07-27 18:33:25 +02:00
|
|
|
<small>[source](https://github.com/nodesource/distributions/blob/master/README.md)</small>
|
|
|
|
|
2021-12-09 09:31:01 +01:00
|
|
|
#### Choose you database (sqlite, postgresql, mariadb, mysql)
|
|
|
|
1. Setup using postgreSQL __(optional)__
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2021-07-27 18:33:25 +02:00
|
|
|
sudo apt-get install postgresql
|
2019-08-06 01:12:05 +02:00
|
|
|
# Create the database
|
|
|
|
su postgres -c psql
|
2019-07-17 00:41:08 +02:00
|
|
|
postgres=# create database gancio;
|
|
|
|
postgres=# create user gancio with encrypted password 'gancio';
|
|
|
|
postgres=# grant all privileges on database gancio to gancio;
|
|
|
|
```
|
|
|
|
|
2021-12-09 09:31:01 +01:00
|
|
|
1. Setup using MariaDB (__optional__)
|
|
|
|
```bash
|
|
|
|
sudo apt-get install mariadb
|
|
|
|
sudo mysql
|
|
|
|
MariaDB [(none)]> create database gancio;
|
|
|
|
Query OK, 1 row affected (0.001 sec)
|
|
|
|
MariaDB [(none)]> create user gancio identified by 'gancio';
|
|
|
|
Query OK, 0 rows affected (0.011 sec)
|
|
|
|
MariaDB [(none)]> grant all privileges on gancio.* to gancio;
|
|
|
|
Query OK, 0 rows affected (0.009 sec)
|
|
|
|
```
|
|
|
|
|
2019-07-17 00:41:08 +02:00
|
|
|
1. Create a user to run gancio from
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2021-10-25 11:09:10 +02:00
|
|
|
sudo adduser --group --system --shell /bin/false --home /opt/gancio gancio
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
2021-07-27 18:33:25 +02:00
|
|
|
1. Install Gancio
|
|
|
|
```bash
|
2021-10-25 11:09:10 +02:00
|
|
|
sudo yarn global add --silent {{site.url}}/latest.tgz 2> /dev/null
|
2021-07-27 18:33:25 +02:00
|
|
|
```
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2021-10-25 11:09:10 +02:00
|
|
|
1. Setup systemd service and reload systemd
|
2019-07-17 00:41:08 +02:00
|
|
|
```bash
|
2021-10-25 11:09:10 +02:00
|
|
|
sudo wget http://gancio.org/gancio.service -O /etc/systemd/system/gancio.service
|
2021-12-02 12:09:03 +01:00
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl enable gancio
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
|
|
|
|
2021-10-25 11:09:10 +02:00
|
|
|
1. Start gancio service (this should listen on port 13120)
|
2019-07-12 23:20:55 +02:00
|
|
|
```bash
|
2021-12-02 12:09:03 +01:00
|
|
|
sudo systemctl start gancio
|
2019-07-12 23:20:55 +02:00
|
|
|
```
|
|
|
|
|
2021-06-20 23:10:20 +02:00
|
|
|
1. [Setup nginx as a proxy]({% link install/nginx.md %})
|
2019-07-12 23:20:55 +02:00
|
|
|
|
2021-10-25 11:09:10 +02:00
|
|
|
1. Point your web browser to your domain :tada:
|
2019-09-26 16:56:28 +02:00
|
|
|
|
2021-06-04 15:34:40 +02:00
|
|
|
## Upgrade
|
2021-07-26 13:10:39 +02:00
|
|
|
|
|
|
|
> warning "Backup your data"
|
|
|
|
> Backup your data is generally a good thing to do and this is especially true before upgrading.
|
|
|
|
> Don't be lazy and [backup]({% link install/backup.md %}) your data!
|
|
|
|
|
2019-11-13 10:35:30 +01:00
|
|
|
```bash
|
2021-07-27 18:33:25 +02:00
|
|
|
yarn global remove gancio
|
|
|
|
yarn cache clean
|
|
|
|
yarn global add --silent {{site.url}}/latest.tgz 2> /dev/null
|
2021-12-07 16:34:42 +01:00
|
|
|
sudo systemctl restart gancio
|
2019-11-14 12:22:04 +01:00
|
|
|
```
|