Plume/docs/INSTALL.md

73 lines
2.1 KiB
Markdown
Raw Normal View History

# How to install Plume on a Debian stretch:
## Basic setup:
2018-06-29 17:13:58 +00:00
```bash
apt update
apt install gettext postgresql postgresql-contrib libpq-dev
adduser plume
su - plume
cd /home/plume
git clone https://github.com/Plume-org/Plume.git
2018-06-29 19:15:10 +00:00
curl https://sh.rustup.rs -sSf | sh
cd Plume
rustup toolchain install nightly
rustup toolchain default nightly
rustup update
2018-07-17 20:36:07 +00:00
cargo install diesel_cli --no-default-features --features postgres --version '=1.2.0' # we dont need to compile anything else than pgsql
2018-06-29 17:13:58 +00:00
```
## Now, if you want to run postgresql on the same server:
2018-06-29 17:13:58 +00:00
```bash
2018-06-29 19:15:10 +00:00
service postgresql start
cargo run # this will configure and launch Plume on the server.
2018-06-29 17:13:58 +00:00
```
## If you want to run Plume with a remote DB this time ( Postgresql is not installed on the same server/container):
2018-06-29 17:13:58 +00:00
* On the DB server:
2018-06-29 17:13:58 +00:00
```bash
2018-06-28 23:34:00 +00:00
service postgresql start
su - postgres
createuser -d -P plume
createdb -O plume plume
2018-06-29 17:13:58 +00:00
```
* On the Plume server:
2018-06-29 17:13:58 +00:00
```bash
2018-06-28 23:34:00 +00:00
cd /home/plume/Plume
diesel migration run --database-url postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume
DB_URL=postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume cargo run # the first launch will ask questions to configure the instance. A second launch will not need the DB_URL.
2018-06-29 17:13:58 +00:00
```
2018-06-28 23:32:15 +00:00
## Plume is now accessible as seen on your console. You can have fun now, or configure an nginx proxy with the following excerpt:
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_pass http://localhost:8000;
client_max_body_size 16m;
}
# Caveats:
2018-06-29 17:13:58 +00:00
2018-06-28 23:32:15 +00:00
* Pgbouncer is not yet supported ( named transactions are used ).
2018-06-29 19:15:10 +00:00
* Rust nightly is a moving target, dependancies can break and sometimes you need to check a few versions to find the one working.
```bash
cd /home/plume/Plume
rustup override set nightly-2018-05-15 # this could be needed for compilation. If errors, try 2018-05-31.
# rustup override unset # remove the override for this directory.
```
* Rust nightly 2018-06-28 is known to be failing to compile diesel 1.3.2