Compare commits
2 Commits
lxc-instal
...
master
Author | SHA1 | Date |
---|---|---|
jorge | 55d81f1d9d | |
jorge | 4d7f7dba72 |
64
README.md
64
README.md
|
@ -32,25 +32,57 @@ More information on [docs](https://listmonk.app/docs).
|
|||
__________________
|
||||
|
||||
### Binary
|
||||
#### download an prepare config file
|
||||
|
||||
- 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.
|
||||
|
||||
#### prerequisites Debian: system user and PostgreSQL
|
||||
- install `sudo`
|
||||
- install PostgreSQL `apt install postgresql`
|
||||
- create system user with config.toml data for the database:
|
||||
`adduser listmonk`
|
||||
- --create system user with config.toml data for the database:
|
||||
`adduser listmonkuser`--
|
||||
- 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;
|
||||
postgres=# CREATE DATABASE listmonkdatabase;
|
||||
postgres=# CREATE USER listmonkuser WITH PASSWORD 'listmonkpassword';
|
||||
postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonkdatabase TO listmonkuser;
|
||||
```
|
||||
|
||||
#### download an prepare config file
|
||||
- `cd /var/www/` and make the directory `mkdir listmonk`
|
||||
- `cd listmonk`
|
||||
- Download the [latest release](https://github.com/knadh/listmonk/releases) and extract the listmonk binary.
|
||||
```
|
||||
wget https://github.com/knadh/listmonk/releases/download/v1.0.0/listmonk_1.0.0_linux_amd64.tar.gz
|
||||
wget https://github.com/knadh/listmonk/releases/download/v1.0.0/listmonk_1.0.0_checksums.txt
|
||||
sha256sum listmonk_1.0.0_linux_amd64.tar.gz
|
||||
cat listmonk_1.0.0_checksums.txt |grep linux
|
||||
```
|
||||
- change ownership of files `chown -R www-data:www-data /var/www/listmonk`
|
||||
- generate config file `sudo -u www-data ./listmonk --new-config`
|
||||
- edit the config file with the data we created previously and more options `vim /var/www/listmonk/confif.toml`
|
||||
|
||||
#### reverse proxy
|
||||
- create the apache config to work behind a reverse proxy `/etc/apache2/sites-available/listmonk.doamain.tdl.conf`
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName listmonk.domain.tdl
|
||||
|
||||
ServerSignature Off
|
||||
|
||||
|
||||
ErrorLog /var/log/apache2/listmonk.domain.tdl_error.log
|
||||
TransferLog /var/log/apache2/listmonk.domain.tdl_access.log
|
||||
LogLevel warn
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass "/" "http://127.0.0.1:9000/"
|
||||
ProxyPassReverse "/" "http://127.0.0.1:9000/"
|
||||
</VirtualHost>
|
||||
```
|
||||
- enable the proxy module `a2enmod proxy_http` enable the site `a2ensite listmonk.domain.tdl` and restart apache `systemctl reload apache2`
|
||||
|
||||
#### 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).
|
||||
- Run `./listmonk` and visit `http://localhost:9000`.
|
||||
- `sudo -u www-data ./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 `sudo -u www-data ./listmonk` and visit `http://listmonk.domain.tdl`
|
||||
|
||||
#### after install, fine tunning
|
||||
oncen checked it works, stop the process.
|
||||
|
@ -59,7 +91,7 @@ oncen checked it works, stop the process.
|
|||
- run listmonk as a service, create `/etc/systemd/system/listmonk.service` with:
|
||||
```
|
||||
[Unit]
|
||||
Description=Listmonk server
|
||||
Description=Listmonk domain.tdl server
|
||||
After=syslog.target network.target postgressql.target
|
||||
|
||||
[Service]
|
||||
|
@ -77,7 +109,13 @@ oncen checked it works, stop the process.
|
|||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
__________________
|
||||
- enable the service `systemct enable listmonk.service` and restart the daemon `systemctl daemon-restart` or you can start just the service `systemctl start listmonk.service`
|
||||
|
||||
#### fixing small dependencies
|
||||
- uploads fail: `mkdir /var/www/html/listmonk/uploads` and `chown -R www-data:www-data /var/www/html/listmonk`
|
||||
|
||||
|
||||
___________________
|
||||
|
||||
### Heroku
|
||||
|
||||
|
|
Loading…
Reference in New Issue