small amend

master
Sergey G. Brester 2020-12-19 15:13:53 +01:00
parent ce10db145f
commit 8dbb16b555
1 changed files with 19 additions and 11 deletions

@ -2,11 +2,21 @@
You don't need install fail2ban for the test attempts or to try some new functionality, so firstly read [How to test newer fail2ban version resp. use fail2ban standalone instance](How-to-test-newer-fail2ban-version-resp.-use-fail2ban-standalone-instance).
### Required pre-installation steps
If you already have fail2ban installed from your distribution:
- backup your current configuration `/etc/fail2ban` and run-time database `/var/lib/fail2ban/fail2ban.sqlite3`
- you can also store the dump of your current configuration to be able to compare it later:<br/>
`fail2ban-client -d > /tmp/f2b-dump-of-prev-version.txt`
- if your fail2ban version departs significantly or you decided install from source, **stop and uninstall** obsolete version of fail2ban
### Manual installation of debian upstream-package (released here)
If you have debian-based distribution, you could try to install debian packages from newest [releases](https://github.com/fail2ban/fail2ban/releases).
This upstream package is very similar the package maintaining for the latest debian stable version, but can also work for the most other debian-based distributions.
<details><summary>Read more ...</summary>
To install the deb-package manually following steps are necessary (here is an example for 0.10.6):
```bash
cd /tmp/
@ -39,26 +49,21 @@ sudo apt -f install
```
Same is valid for [0.11.2](https://github.com/fail2ban/fail2ban/releases/tag/0.11.2) (if you want to try that, it is totally compatible with a small exception regarding database if you need back to 0.10, see Compatibility section in https://github.com/fail2ban/fail2ban/blob/0.11.2/ChangeLog#L12).
</details>
Note: although in opposite to installation from source, it would also install service units, man-files, bash-completion etc, the package configuration can deviate from configuration provided by maintainers of your distribution.
Additionally note that the upstream packages are provided without the test-suite (so there is no possibility to use `fail2ban-test`
Note: although in opposite to installation from source, it would also install service units, man-files, bash-completion etc, the package configuration can also deviate from configuration provided by maintainers of your distribution.
Additionally note that the upstream packages are provided without the test-suite (`fail2ban-testcases`, `fail2ban.test` python module).
### Manual installation from source
Manual install/upgrade is very similar, just you have to do more steps to install it, like copy and enable service units, copy man-files etc pp.
Manual install/upgrade is very similar to aforementioned [testing of standalone instance](How-to-test-newer-fail2ban-version-resp.-use-fail2ban-standalone-instance), just you have to do more steps to install it, like copy and enable service units, copy man-files etc pp.
<details><summary>Read more ...</summary>
Firstly download fail2ban from [releases](https://github.com/fail2ban/fail2ban/releases) or from [source](https://github.com/fail2ban/fail2ban) (select branch 0.10, 0.11 or master and click "clone or download" button) and unpack it (or clone it with git) into some temporary directory (e. g. `/tmp/f2b`).
In order to install it, you have to execute several of following commands as root (or sudoer), so you can start shell as root (e. g. `sudo -s`) or use `sudo` before corresponding command that expecting administrator permissions.
If you already have fail2ban installed from your distribution:
- backup your current configuration `/etc/fail2ban` and run-time database `/var/lib/fail2ban/fail2ban.sqlite3`
- you can also store the dump of your current configuration to be able to compare it later:<br/>
`fail2ban-client -d > /tmp/f2b-dump-of-prev-version.txt`
- **stop and uninstall** obsolete version of fail2ban
Then:
- install prerequirements you need (see [README.md](https://github.com/fail2ban/fail2ban/blob/0.11/README.md));
for example:
* for `python2`:<br/>
@ -75,6 +80,9 @@ for example:
sudo cp ./files/fail2ban.service /etc/systemd/system/fail2ban.service
sudo systemctl enable fail2ban
```
</details>
-----------------
Now we have to configure fail2ban (also see [Proper fail2ban configuration](Proper-fail2ban-configuration)):