您好,登錄后才能下訂單哦!
這篇文章主要介紹了LirbeNMS如何安裝,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
系統版本:CentOS 7.8
web:Nginx
PHP版本:7.3(最低7.3)
數據庫:Mariadb
yum install epel-release yum-utils -y yum localinstall http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y yum-config-manager --enable remi-php74 yum install composer cronie fping git ImageMagick jwhois mariadb mariadb-server mtr MySQL-python net-snmp net-snmp-utils nginx nmap php-fpm php-cli php-common php-curl php-gd php-mbstring php-process php-snmp php-xml php-zip php-memcached php-mysqlnd python-memcached rrdtool python3 python3-pip -y
useradd librenms -d /opt/librenms -M -r usermod -a -G librenms nginx
cd /opt git clone https://github.com/librenms/librenms.git
如果大家出現這個問題,將上文地址由https改為git,但是非常慢
chown -R librenms:librenms /opt/librenms chmod 770 /opt/librenms setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ chgrp apache /var/lib/php/session/
su - librenms ./scripts/composer_wrapper.php install --no-dev exit
yum -y install mariadb-server systemctl start mariadb && systemctl enable mariadb mysql -uroot -p CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'xiaoyu123'; GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost'; FLUSH PRIVILEGES; quit ####修改mariadb配置文件#### vi /etc/my.cnf innodb_file_per_table=1 lower_case_table_names=0 ####wr保存退出#### systemctl restart mariadb
添加配置
1.修改時區
vi /etc/php.ini
修改時區
2.修改php-fpm配置文件
vi /etc/php-fpm.d/www.conf ####改為如下#### ;user = apache user = nginx group = apache ;listen = 127.0.0.1:9000 listen = /run/php-fpm/php-fpm.sock listen.owner = nginx listen.group = nginx listen.mode = 0660
3.重啟php-fpm服務
systemctl enable php-fpm systemctl restart php-fpm
vi /etc/nginx/conf.d/librenms.conf ####添加如下內容#### server { listen 80; server_name librenms.example.com; root /opt/librenms/html; index index.php; charset utf-8; gzip on; gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon; location / { try_files $uri $uri/ /index.php?$query_string; } location /api/v0 { try_files $uri $uri/ /api_v0.php?$query_string; } location ~ \.php { include fastcgi.conf; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; } location ~ /\.ht { deny all; } }
systemctl enable nginx systemctl restart nginx
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf y curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro chmod +x /usr/bin/distro systemctl enable snmpd &&systemctl restart snmpd
cp /opt/librenms/librenms.nonroot.cron /etc/cron.d/librenms
cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms
此時會發現訪問還是Nginx的界面,這里需要調整一些參數
vi /etc/nginx/nginx.conf systemctl restart nginx
將端口改為8080
點擊圖標進行下一步
檢查通過
填寫數據庫信息
通過之后點擊build
點擊紅框才能下一步
正常是空的dashboard
簡單使用
新增設備
感謝你能夠認真閱讀完這篇文章,希望小編分享的“LirbeNMS如何安裝”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。