2024-07-17 17:45:00 +00:00
|
|
|
# Installation
|
|
|
|
|
2024-07-17 20:14:39 +00:00
|
|
|
**Prerequisites to install**
|
2024-07-17 18:19:31 +00:00
|
|
|
|
2024-07-18 00:46:36 +00:00
|
|
|
On Ubuntu/Debian the required packages will be installed by:
|
2024-07-17 22:21:11 +00:00
|
|
|
```
|
2024-07-18 00:46:36 +00:00
|
|
|
apt-get -y install git iproute2 php-cli
|
2024-07-17 22:21:11 +00:00
|
|
|
```
|
2024-07-17 18:25:36 +00:00
|
|
|
|
2024-07-18 00:46:36 +00:00
|
|
|
This daemon needs PHP, tested with 5.6, 7.4 and 8.2.
|
|
|
|
It may work with other versions or it may not work ;)
|
2024-07-17 18:25:36 +00:00
|
|
|
|
2024-07-17 22:21:11 +00:00
|
|
|
It needs php-cli residing in /usr/bin/php. You can check it by running:
|
|
|
|
```
|
|
|
|
/usr/bin/php -v
|
|
|
|
```
|
2024-07-17 18:25:36 +00:00
|
|
|
|
2024-07-17 22:27:46 +00:00
|
|
|
Also needs the "pcntl" PHP extension, check it by running:
|
|
|
|
```
|
|
|
|
php -i | grep "pcntl support"
|
|
|
|
```
|
|
|
|
|
|
|
|
On Linux it needs the "iproute2" package, check it by running:
|
|
|
|
```
|
|
|
|
ip route show
|
|
|
|
```
|
2024-07-17 18:19:31 +00:00
|
|
|
|
2024-07-17 22:31:12 +00:00
|
|
|
Oh, and btw. it will need "git" command, check it by running:
|
|
|
|
```
|
|
|
|
git --version
|
|
|
|
```
|
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
**Quick and fast install**
|
|
|
|
```
|
2024-07-18 00:47:09 +00:00
|
|
|
apt-get -y install git iproute2 php-cli
|
2024-07-17 17:53:00 +00:00
|
|
|
git clone https://git.funil.de/sinuspl/bgpblist /opt/bgpblist
|
|
|
|
cp /opt/bgpblist/etc/default/config.ini /opt/bgpblist/etc/config.ini
|
|
|
|
cp /opt/bgpblist/etc/systemd/bgpblacklist.service /etc/systemd/system/bgpblacklist.service
|
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable bgpblacklist.service
|
|
|
|
systemctl start bgpblacklist.service
|
|
|
|
```
|
|
|
|
|
|
|
|
**Long install with config**
|
|
|
|
|
|
|
|
First, checkout the repository:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
git clone https://git.funil.de/sinuspl/bgpblist /opt/bgpblist
|
|
|
|
```
|
2024-07-17 17:06:56 +00:00
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
Copy the default config to create your own:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
cp /opt/bgpblist/etc/default/config.ini /opt/bgpblist/etc/config.ini
|
|
|
|
```
|
2024-07-17 17:11:13 +00:00
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
Edit the config.ini, if you are a customer:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
vim /opt/bgpblist/etc/config.ini
|
|
|
|
```
|
2024-07-17 22:29:31 +00:00
|
|
|
If not, dont't edit it, it will use the defaults. Edit it, particulary, when you have an user uuid from the site.
|
2024-07-17 22:25:43 +00:00
|
|
|
Default is "00000000-0000-0000-0000-000000000000" and it gets all feeds by default without any registration.
|
2024-07-17 17:11:13 +00:00
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
Copy the systemd unit file:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
cp /opt/bgpblist/etc/systemd/bgpblacklist.service /etc/systemd/system/bgpblacklist.service
|
|
|
|
```
|
2024-07-17 17:11:13 +00:00
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
Reload the systemd:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
systemctl daemon-reload
|
|
|
|
```
|
2024-07-17 17:11:13 +00:00
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
Enable the unit:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
systemctl enable bgpblacklist.service
|
|
|
|
```
|
2024-07-17 17:11:13 +00:00
|
|
|
|
2024-07-17 17:53:00 +00:00
|
|
|
Start the daemon:
|
2024-07-17 17:49:43 +00:00
|
|
|
```
|
|
|
|
systemctl start bgpblacklist.service
|
2024-07-17 20:12:59 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Init and not systemd**
|
|
|
|
|
|
|
|
There is also an Init version of the script
|
|
|
|
|
|
|
|
```
|
|
|
|
ln -s /opt/bgpblist/etc/init.d/bgpblacklist /etc/init.d/bgpblacklist
|
|
|
|
```
|
|
|
|
|
|
|
|
Use your system's way to enable that, e.g. with "update-rc.d"
|