Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc debian 10 updates #11488

Merged
merged 9 commits into from Jun 6, 2020
18 changes: 10 additions & 8 deletions doc/Installation/Installation-Debian-10-Nginx.md
Expand Up @@ -11,7 +11,7 @@ path: blob/master/doc/
# Install Required Packages

```bash
apt install curl composer fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php7.3-cli php7.3-curl php7.3-fpm php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-snmp php7.3-xml php7.3-zip python-memcache python-mysqldb rrdtool snmp snmpd whois python3-pymysql python3-dotenv python3-redis python3-setuptools
apt install acl curl composer fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php7.3-cli php7.3-curl php7.3-fpm php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-snmp php7.3-xml php7.3-zip python-memcache python-mysqldb rrdtool snmp snmpd whois python3-pymysql python3-dotenv python3-redis python3-setuptools
```

# Add librenms user
Expand Down Expand Up @@ -50,7 +50,7 @@ exit
## Configure MySQL

```bash
systemctl restart mysql
service mysql restart
mysql -uroot -p
```

Expand All @@ -76,7 +76,7 @@ lower_case_table_names=0
```

```bash
systemctl restart mysql
service mysql restart
```

# Web Server
Expand All @@ -94,14 +94,14 @@ nano /etc/php/7.3/cli/php.ini
```

```bash
systemctl restart php7.3-fpm
service php7.3-fpm restart
```

## Configure NGINX

```bash
rm /etc/nginx/sites-available/default && rm /etc/nginx/sites-enabled/default
nano /etc/nginx/sites-enabled/librenms.vhost
rm /etc/nginx/sites-enabled/default
nano /etc/nginx/sites-available/librenms.vhost
```

Add the following config, edit `server_name` as required:
Expand Down Expand Up @@ -134,13 +134,15 @@ server {
```

```bash
systemctl reload nginx
ln -s /etc/nginx/sites-available/librenms.vhost /etc/nginx/sites-enabled/librenms.vhost
service nginx reload
```

# Configure snmpd

```bash
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf
chmod 600 /etc/snmp/snmpd.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you change mod to 600 ... doesn't work if snmpd.conf is not owned by snmpd user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you limit access such high a chown is also needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. snmpd is started as root and privileges are dropped after starting. snmpd must be started as root to acquire privileged port 161.

snmpd.conf is read as root, before dropping privileges.

nano /etc/snmp/snmpd.conf
```

Expand All @@ -149,7 +151,7 @@ Edit the text which says `RANDOMSTRINGGOESHERE` and set your own community strin
```bash
curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
chmod +x /usr/bin/distro
systemctl restart snmpd
service snmpd restart
```

# Cron job
Expand Down