install.md
parent
91b1f15a9d
commit
cbb15ae4ab
|
@ -6,13 +6,8 @@ Its purpose is to peruse the system log entries, warn of important situations, r
|
|||
* [Functional overview](doc/intro_func.md)
|
||||
* [Technical overview](doc/intro_tech.md)
|
||||
|
||||
The software requirements are:
|
||||
|
||||
* a modern systemd-based Linux operating system (eg. [Archlinux](https://archlinux.org/)- or [Fedora](https://getfedora.org/)-based distributions);
|
||||
* python, at least version 3.1 (or [more, depending on the modules](doc/intro_tech.md) being used);
|
||||
* [python-systemd](https://www.freedesktop.org/software/systemd/python-systemd/journal.html);
|
||||
* [nftables](http://wiki.nftables.org/) _if_ IP address bans are to be managed;
|
||||
* a sendmail-like program _if_ emails are wanted.
|
||||
Pyruse is [packaged for Archlinux](https://aur.archlinux.org/packages/pyruse/).
|
||||
For other distributions, please [read the manual installation instructions](doc/install.md).
|
||||
|
||||
The `/etc/pyruse` directory is where system-specific files are looked-for:
|
||||
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
# Installation
|
||||
|
||||
The software requirements are:
|
||||
|
||||
* a modern systemd-based Linux operating system (eg. [Archlinux](https://archlinux.org/)- or [Fedora](https://getfedora.org/)-based distributions);
|
||||
* python, at least version 3.1 (or [more, depending on the modules](doc/intro_tech.md) being used);
|
||||
* [python-systemd](https://www.freedesktop.org/software/systemd/python-systemd/journal.html);
|
||||
* [nftables](http://wiki.nftables.org/) _if_ IP address bans are to be managed;
|
||||
* a sendmail-like program _if_ emails are wanted.
|
||||
|
||||
Besides, getting the software requires [Git](http://git-scm.com/), and packaging it requires [python-setuptools](http://pypi.python.org/pypi/setuptools).
|
||||
|
||||
## Get and run Pyruse
|
||||
|
||||
Getting the software is just a matter of cloning the repository with Git.
|
||||
|
||||
It can be run without being installed:
|
||||
|
||||
1. Create a [configuration file](conffile.md) in the root directory of the repository (where `doc`, `extra`, `pyruse`, `tests`… reside).
|
||||
|
||||
2. Run Pyruse like this at the root directory of the repository:
|
||||
|
||||
```bash
|
||||
$ sudo python3 -c 'from pyruse import main; main.main()'
|
||||
```
|
||||
|
||||
## Run the tests
|
||||
|
||||
To run the tests, enter the `tests` subdirectory, and run `python3 main.py` there.
|
||||
|
||||
## Install and run Pyruse
|
||||
|
||||
To install Pyruse on the system, run these commands as root, in the root directory of the repository:
|
||||
|
||||
```bash
|
||||
# curl -o PKGBUILD 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pyruse'
|
||||
# . PKGBUILD
|
||||
# export srcdir="$PWD/.."
|
||||
# export pkgdir=
|
||||
# package
|
||||
# rm -rf build PKGBUILD
|
||||
# systemctl daemon-reload
|
||||
```
|
||||
|
||||
The `package` line is the one that actually alters the system. Until Pyruse is packaged for your operating system, you may want to change this line to `checkinstall package`. [Checkinstall](https://en.wikipedia.org/wiki/CheckInstall) should be able to turn your Pyruse installation into a native Linux package.
|
||||
|
||||
Then, to run Pyruse, start (and enable) `pyruse.service`.
|
||||
If you use nftables bans, you should also start (and enable) `pyruse-boot@action_nftBan.service`.
|
Loading…
Reference in New Issue