diff --git a/How-to-install-or-upgrade-fail2ban-manually.md b/How-to-install-or-upgrade-fail2ban-manually.md index 08b6d26..9b994a1 100644 --- a/How-to-install-or-upgrade-fail2ban-manually.md +++ b/How-to-install-or-upgrade-fail2ban-manually.md @@ -1,7 +1,50 @@ -*Many distributions already provide fail2ban packages, so better you'd install this built from your maintainers version of fail2ban, especially if you are not familiar with linux.* +**Many distributions already provide fail2ban packages, so better you'd install this built from your maintainers version of fail2ban, especially if you are not familiar with linux.** 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). +### 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. + +To install the deb-package manually following steps are necessary (here is an example for 0.10.6): +```bash +cd /tmp/ +# 1) download deb package and signature: +wget https://github.com/fail2ban/fail2ban/releases/download/0.10.6/fail2ban_0.10.6-1.upstream1_all.deb \ + https://github.com/fail2ban/fail2ban/releases/download/0.10.6/fail2ban_0.10.6-1.upstream1_all.deb.asc + +# 2) check signature (if you want to be sure file is unmodified): +gpg --verify fail2ban_0.10.6-1~upstream1_all.deb.asc fail2ban_0.10.6-1~upstream1_all.deb + +# 3) view details of the package: +dpkg -I fail2ban_0.10.6-1.upstream1_all.deb + +# 4) to ensure the upgrade run gentler (protocol of previous version may be incompatible), stop fail2ban before install: +# using service: +sudo service fail2ban stop +# using client: +sudo fail2ban-client stop + +# 5a) either install package using dpkg (standalone package, don't regard dependencies): +sudo dpkg -i fail2ban_0.10.6-1.upstream1_all.deb +# if the package introduces some "broken" dependencies (I don't think so in case of fail2ban which has few dependencies), +# to fix the unmet dependency issue, run this: +sudo apt -f install + +# 5b) alternatively install package using gdebi (that will take care of installation of dependencies): +sudo gdebi fail2ban_0.10.6-1.upstream1_all.deb +# if you want to check anyway whether there are some broken packages and fix them automatically, you can run: +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). + +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` + +### 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. 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`).