mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Markdown linting of docs (#10595)
* Remove trailing spaces * Markdown linting of docs
This commit is contained in:
@@ -54,13 +54,13 @@ If you are deploying a separate database server, you need to change
|
||||
the `bind-address`. If your MySQL database resides on the same server
|
||||
as LibreNMS, you should skip this step.
|
||||
|
||||
```
|
||||
```bash
|
||||
vim /etc/mysql/my.cnf
|
||||
```
|
||||
|
||||
Within the [mysqld] section please add:
|
||||
|
||||
```
|
||||
```mysql
|
||||
innodb_file_per_table=1
|
||||
```
|
||||
|
||||
@@ -71,7 +71,7 @@ listen on. Restart MySQL:
|
||||
|
||||
If you see a line that starts `sql-mode` then change this to `sql-mode=""`.
|
||||
|
||||
```
|
||||
```bash
|
||||
service mysql restart
|
||||
```
|
||||
|
||||
@@ -82,7 +82,7 @@ the same machine as your database server.
|
||||
|
||||
Install the required software:
|
||||
|
||||
```
|
||||
```bash
|
||||
apt-get install nginx-full php5-fpm php5-cli php5-mysql php5-gd php5-snmp php-pear php5-curl php5-mcrypt php5-json php-net-ipv4 php-net-ipv6 snmp snmpd graphviz fping imagemagick whois mtr-tiny nmap python-mysqldb rrdtool git
|
||||
```
|
||||
|
||||
@@ -92,7 +92,7 @@ were necessary on a clean install of Ubuntu 12.04/14.04.
|
||||
You need to configure snmpd appropriately if you have not already done
|
||||
so. An absolute minimal config for snmpd is:
|
||||
|
||||
```
|
||||
```snmp
|
||||
rocommunity public 127.0.0.1
|
||||
```
|
||||
|
||||
@@ -109,9 +109,9 @@ needed for LibreNMS include
|
||||
|
||||
# Adding the librenms-user
|
||||
|
||||
```
|
||||
useradd librenms -d /opt/librenms -M -r
|
||||
usermod -a -G librenms www-data
|
||||
```bash
|
||||
useradd librenms -d /opt/librenms -M -r
|
||||
usermod -a -G librenms www-data
|
||||
```
|
||||
|
||||
# Cloning
|
||||
@@ -125,7 +125,7 @@ You can clone the repository via HTTPS or SSH. In either case, you
|
||||
need to ensure that the appropriate port (443 for HTTPS, 22 for SSH)
|
||||
is open in the outbound direction for your server.
|
||||
|
||||
```
|
||||
```bash
|
||||
cd /opt
|
||||
git clone https://github.com/librenms/librenms.git librenms
|
||||
cd /opt/librenms
|
||||
@@ -144,7 +144,7 @@ repos), but if you're not planning to develop for LibreNMS it's an
|
||||
acceptable option. To perform the initial clone without full history,
|
||||
run the following instead:
|
||||
|
||||
```
|
||||
```bash
|
||||
cd /opt
|
||||
git clone --depth 1 https://github.com/librenms/librenms.git librenms
|
||||
cd /opt/librenms
|
||||
@@ -157,9 +157,11 @@ to create and chown a directory as well as create a Nginx vhost.
|
||||
|
||||
First, create and chown the `rrd` directory and create the `logs` directory:
|
||||
|
||||
mkdir rrd logs
|
||||
chown -R librenms:librenms /opt/librenms
|
||||
chmod 775 rrd
|
||||
```bash
|
||||
mkdir rrd logs
|
||||
chown -R librenms:librenms /opt/librenms
|
||||
chmod 775 rrd
|
||||
```
|
||||
|
||||
> NOTE: If you're not running Ubuntu or Debian, you will need to
|
||||
> change `www-data` to the user and group which run the Nginx web
|
||||
@@ -202,7 +204,7 @@ On at least Ubuntu 14.04 (and possibly other distributions and
|
||||
versions as well), mcrypt is not enabled on install. Run the
|
||||
following to enable it:
|
||||
|
||||
```
|
||||
```bash
|
||||
php5enmod mcrypt
|
||||
```
|
||||
|
||||
@@ -213,13 +215,13 @@ to your DNS or hosts file.)
|
||||
|
||||
Restart nginx:
|
||||
|
||||
```
|
||||
```bashg
|
||||
service nginx restart
|
||||
```
|
||||
|
||||
Restart php5-fpm:
|
||||
|
||||
```
|
||||
```bash
|
||||
service php5-fpm restart
|
||||
```
|
||||
|
||||
@@ -231,7 +233,7 @@ instructions then skip to the 'Add localhost' section. Alternatively
|
||||
if you want to continue the setup manually then just keep following
|
||||
these instructions.
|
||||
|
||||
```
|
||||
```bash
|
||||
cp config.php.default config.php
|
||||
vim config.php
|
||||
```
|
||||
@@ -251,7 +253,7 @@ graphs will break otherwise. **
|
||||
|
||||
Initiate the follow database with the following command:
|
||||
|
||||
```
|
||||
```bash
|
||||
php build-base.php
|
||||
```
|
||||
|
||||
@@ -259,7 +261,7 @@ php build-base.php
|
||||
|
||||
Create the admin user - priv should be 10
|
||||
|
||||
```
|
||||
```bash
|
||||
php adduser.php <name> <pass> 10 <email>
|
||||
```
|
||||
|
||||
@@ -270,7 +272,7 @@ leave the angled brackets off.
|
||||
|
||||
Run validate.php as root in the librenms directory
|
||||
|
||||
```
|
||||
```bash
|
||||
php validate.php
|
||||
```
|
||||
|
||||
@@ -278,7 +280,7 @@ This will check your install to verify it is set up correctly.
|
||||
|
||||
# Add localhost
|
||||
|
||||
```
|
||||
```bash
|
||||
php addhost.php localhost public v2c
|
||||
```
|
||||
|
||||
@@ -289,7 +291,7 @@ come).
|
||||
|
||||
Discover localhost::
|
||||
|
||||
```
|
||||
```bash
|
||||
php discovery.php -h all
|
||||
```
|
||||
|
||||
@@ -302,13 +304,13 @@ the thread count needs to be changed, you can do so by editing the
|
||||
cron file (`/etc/cron.d/librenms`). Just add a number after
|
||||
`poller-wrapper.py`, as in the example below:
|
||||
|
||||
```
|
||||
```bash
|
||||
/opt/librenms/poller-wrapper.py 12 >> /dev/null 2>&1
|
||||
```
|
||||
|
||||
Create the cronjob
|
||||
|
||||
```
|
||||
```bash
|
||||
cp librenms.nonroot.cron /etc/cron.d/librenms
|
||||
```
|
||||
|
||||
@@ -326,7 +328,7 @@ LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can
|
||||
become large and be rotated out. To rotate out the old logs you can
|
||||
use the provided logrotate config file:
|
||||
|
||||
```
|
||||
```bash
|
||||
cp misc/librenms.logrotate /etc/logrotate.d/librenms
|
||||
```
|
||||
|
||||
@@ -337,13 +339,13 @@ every day, a `git pull --no-edit --quiet` is performed. You can
|
||||
override this default by editing your `config.php` file. Remove the
|
||||
comment (the `#` mark) on the line:
|
||||
|
||||
```
|
||||
```php
|
||||
#$config['update'] = 0;
|
||||
```
|
||||
|
||||
so that it looks like this:
|
||||
|
||||
```
|
||||
```php
|
||||
$config['update'] = 0;
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user