added Debian installation explanation in README
This commit is contained in:
parent
ea92e8b12e
commit
b58769ef62
40
README.md
40
README.md
|
@ -32,11 +32,51 @@ More information on [docs](https://listmonk.app/docs).
|
||||||
__________________
|
__________________
|
||||||
|
|
||||||
### Binary
|
### Binary
|
||||||
|
#### download an prepare config file
|
||||||
|
|
||||||
- Download the [latest release](https://github.com/knadh/listmonk/releases) and extract the listmonk binary.
|
- Download the [latest release](https://github.com/knadh/listmonk/releases) and extract the listmonk binary.
|
||||||
- `./listmonk --new-config` to generate config.toml. Then, edit the file.
|
- `./listmonk --new-config` to generate config.toml. Then, edit the file.
|
||||||
|
|
||||||
|
#### prerequisites Debian: system user and PostgreSQL
|
||||||
|
- install PostgreSQL `apt install postgresql`
|
||||||
|
- create system user with config.toml data for the database:
|
||||||
|
`adduser listmonk`
|
||||||
|
- create the postgreSQL database, the user and grant permissions:
|
||||||
|
`su - postgres` and then acces de PostgreSQL console `psql`
|
||||||
|
```
|
||||||
|
postgres=# CREATE DATABASE listmonk;
|
||||||
|
postgres=# CREATE USER listmonk WITH PASSWORD 'listmonk';
|
||||||
|
postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk;
|
||||||
|
```
|
||||||
|
#### proceed to install
|
||||||
- `./listmonk --install` to setup the Postgres DB (or `--upgrade` to upgrade an existing DB. Upgrades are idempotent and running them multiple times have no side effects).
|
- `./listmonk --install` to setup the Postgres DB (or `--upgrade` to upgrade an existing DB. Upgrades are idempotent and running them multiple times have no side effects).
|
||||||
- Run `./listmonk` and visit `http://localhost:9000`.
|
- Run `./listmonk` and visit `http://localhost:9000`.
|
||||||
|
|
||||||
|
#### after install, fine tunning
|
||||||
|
oncen checked it works, stop the process.
|
||||||
|
- move the files to where you like most, usually `/opt/listmonk/` or inside `/var/www/html/`
|
||||||
|
- change ownership of the files to `www-data` or whatever user you have assigned the webserver `chown -R www-data:www-data listmonk`
|
||||||
|
- run listmonk as a service, create `/etc/systemd/system/listmonk.service` with:
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Listmonk server
|
||||||
|
After=syslog.target network.target postgressql.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
# the user and group executing the service
|
||||||
|
User=www-data
|
||||||
|
Group=www-data
|
||||||
|
# the directory where you have listmonk
|
||||||
|
WorkingDirectory=/var/www/html/listmonk
|
||||||
|
# the file to execute
|
||||||
|
ExecStart=/var/www/html/listmonk/listmonk
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
__________________
|
__________________
|
||||||
|
|
||||||
### Heroku
|
### Heroku
|
||||||
|
|
Loading…
Reference in New Issue