{"id":2704,"date":"2019-10-04T15:30:54","date_gmt":"2019-10-04T21:30:54","guid":{"rendered":"https:\/\/ugit.siua.ac.cr\/?p=2704"},"modified":"2019-10-04T15:32:41","modified_gmt":"2019-10-04T21:32:41","slug":"librenms-instalacion-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/sada.services\/?p=2704","title":{"rendered":"LIBRENMS: Instalaci\u00f3n Ubuntu 18.04"},"content":{"rendered":"\n<p>NOTA: Estas instrucciones asumen que se esta en el usuario root de la m\u00e1quina<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Instalar paquetes requeridos<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install software-properties-common\nadd-apt-repository universe\napt update\napt install curl apache2 composer fping git graphviz imagemagick libapache2-mod-php7.2 mariadb-client mariadb-server mtr-tiny nmap php7.2-cli php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-mysql php7.2-snmp php7.2-xml php7.2-zip python-memcache python-mysqldb rrdtool snmp snmpd whois<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">A\u00f1adir usuario de librenms<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd librenms -d \/opt\/librenms -M -r\nusermod -a -G librenms www-data<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Descargar LibreNMS<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\ngit clone https:\/\/github.com\/librenms\/librenms.git\n\ncp -r \/opt\/librenms \/var\/www\/html\/\ncd \/var\/www\/html<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Dar permisos<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R librenms:librenms \/var\/www\/html\/librenms\nchmod 770 \/var\/www\/html\/\nsetfacl -d -m g::rwx \/var\/www\/html\/librenms\/rrd \/var\/www\/html\/librenms\/logs \/var\/www\/html\/librenms\/bootstrap\/cache\/ \/var\/www\/html\/librenms\/storage\/\nsetfacl -R -m g::rwx \/var\/www\/html\/librenms\/rrd \/var\/www\/html\/librenms\/logs \/var\/www\/html\/librenms\/bootstrap\/cache\/ \/var\/www\/html\/librenms\/storage\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Instalar dependencias de PHP<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>su - librenms\n.\/scripts\/composer_wrapper.php install --no-dev\nexit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configurar Base de Datos<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart mysql\nmysql -uroot -p<\/code><\/pre>\n\n\n\n<p>NOTA: Cambie los datos que vienen por defecto<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;\nCREATE USER 'librenms'@'localhost' IDENTIFIED BY 'password';\nGRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost';\nFLUSH PRIVILEGES;\nexit;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/mysql\/mariadb.conf.d\/50-server.cnf<\/code><\/pre>\n\n\n\n<p>En la secci\u00f3n [mysqld] agregue:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>innodb_file_per_table=1\nlower_case_table_names=0\n\nsystemctl restart mysql<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configuraci\u00f3n de PHP<\/h3>\n\n\n\n<p>Asegurarse de establecer el timezone en el archivo php.ini<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/php\/7.2\/apache2\/php.ini\nnano \/etc\/php\/7.2\/cli\/php.ini\n\na2enmod php7.2\na2dismod mpm_event\na2enmod mpm_prefork<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configurar Apache<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/apache2\/sites-available\/librenms.conf<\/code><\/pre>\n\n\n\n<p>A\u00f1adir lo siguiente en el archivo<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n  DocumentRoot \/var\/www\/html\/librenms\/html\n  ServerName  librenms.example.com\n\n  AllowEncodedSlashes NoDecode\n  &lt;Directory \"\/var\/www\/html\/librenms\/html\/\">\n    Require all granted\n    AllowOverride All\n    Options FollowSymLinks MultiViews\n  &lt;\/Directory>\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<p>Si este es el \u00fanico sitio que el servidor esta hosteando, entonces se puede deshabilitar el sitio por defecto <em>a2dissite 000-default<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2ensite librenms.conf\na2enmod rewrite\nsystemctl restart apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configurar snmpd<\/h3>\n\n\n\n<p>Editar el texto que dice RANDOMSTRINGGOESHERE y establezca el nombre de su comunidad<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/var\/www\/html\/librenms\/snmpd.conf.example \/etc\/snmp\/snmpd.conf\nnano \/etc\/snmp\/snmpd.conf<\/code><\/pre>\n\n\n\n<p>Descargue el agente de snmp y reinicie el servicio<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -o \/usr\/bin\/distro https:\/\/raw.githubusercontent.com\/librenms\/librenms-agent\/master\/snmp\/distro\nchmod +x \/usr\/bin\/distro\nsystemctl restart snmpd<\/code><\/pre>\n\n\n\n<p>Copiar los siguientes archivos necesarios<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/var\/www\/html\/librenms\/librenms.nonroot.cron \/etc\/cron.d\/librenms\n\ncp \/var\/www\/html\/librenms\/misc\/librenms.logrotate \/etc\/logrotate.d\/librenms<\/code><\/pre>\n\n\n\n<p>Antes de acceder al medio de instalaci\u00f3n web se debe dar los permisos a la carpeta de \/logs<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/librenms\nchmod 777 \/logs<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Acceder a la configuraci\u00f3n Web<\/h3>\n\n\n\n<p> Entrar al navegador y colocar la direcci\u00f3n http:\/\/librenms.example.com\/install.php<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LibreNMS es un monitoreo de red basado en PHP \/ MySQL \/ SNMP de detecci\u00f3n autom\u00e1tica para m\u00faltiples equipos incluyendo CISCO.<\/p>\n","protected":false},"author":2,"featured_media":2705,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[207],"tags":[],"class_list":["post-2704","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-librenms"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/2704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2704"}],"version-history":[{"count":2,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/2704\/revisions"}],"predecessor-version":[{"id":2708,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/2704\/revisions\/2708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/media\/2705"}],"wp:attachment":[{"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}