z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Custom Nagios RPM fails to login

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.

Custom Nagios RPM fails to login

Postby MurbiesWalto » Mon Sep 26, 2022 2:14 am

I'm creating my own Nagios RPM but I'm new to packaging. My RPM file created successfully and i'm able to install it.

When going to localhost/nagios I'm not able to login.

This is my spec file

%define debug_package %{nil}
%define _prefix /usr/local/nagios
%define _install /usr/bin/install
%define _httpdconf /etc/httpd/conf.d
%define _libexecdir /usr/local/nagios/libexec
%define _logdir /usr/local/nagios/var
%define _checkresultdir /usr/local/nagios/var/spool/checkresults

Summary: Nagios blabla
Name: nagios
Version: 1
Release: 1
License: PROPRIETARY
Group: Applications/Accessories
Source: nagios-1.tar.gz
Packager: Nicholas Lievens <lievens.nicholas@gmail.com>
AutoReqProv: no
Requires: gcc gcc-c++ glibc glibc-common glibc-devel gd gd-devel php53 php53-cli php53-mysql php53-gd php53-pdo graphviz httpd libdbi-dbd-mysql libdbi-devel mysql mysql-server mysql-devel git

%description
Nagios!
%prep
%setup
%build
./configure --with-init-dir=/etc/init.d \
--with-cgiurl=/nagios/cgi-bin \
--with-htmurl=/nagios \
--with-lockfile=/var/run/nagios.pid \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--prefix=%{_prefix} \
--exec-prefix=%{_prefix}/sbin \
--bindir=%{_prefix}/sbin \
--sbindir=%{_prefix}/sbin \
--libexecdir=%{_prefix}/libexec \
--datadir=%{_prefix}/share/nagios \
--sysconfdir=/etc/nagios \
--localstatedir=/var/log/nagios
make all
%install
make install
make install-init
make install-config
make install-commandmode
make install-webconf
make install-devel

htpasswd -b -c /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin

install -d -m 0775 ${RPM_BUILD_ROOT}/var/spool/nagios
install -d -m 0755 ${RPM_BUILD_ROOT}%{_prefix}/include/nagios
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/init.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/logrotate.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/httpd/conf.d
install -d -m 0755 ${RPM_BUILD_ROOT}%{_prefix}/etc
install -d -m 0755 ${RPM_BUILD_ROOT}%{_prefix}/etc
%files
/etc/init.d/nagios
%{_prefix}/var
%{_prefix}/var/spool/checkresults
%{_prefix}/etc
%{_prefix}/bin
%{_prefix}/sbin
%{_prefix}/libexec
%{_prefix}/lib
%{_prefix}/include/nagios
%{_prefix}/share
%{_prefix}/etc
/etc/nagios
/etc/nagios/objects
%defattr(755,nagios,nagios)
/var/log/nagios
/var/log/nagios/archives
%defattr(2775,nagios,nagios)
/var/spool/nagios
###%files www
%defattr(755,root,root)
%{_prefix}/sbin
%{_prefix}/sbin/*
%{_prefix}/share/nagios
%defattr(-,root,root)
%{_prefix}/share/nagios/*
%config(noreplace) /etc/httpd/conf.d/nagios.conf
It is possible that I'm missing some files to run nagios correctly but as I said I'm not experienced with this so if anyone knows more... Thx

--Edit When looking into the log file I'm omegle.2yu.co getting the error: Error: Could not open external command file for reading via open():(13) -> Permission Denied

Seems I have to chmod omeglz echat something, but what?
MurbiesWalto
 
Posts: 10
Joined: Sun Jun 19, 2022 3:28 am

Return to Open Source Nagios Projects

Who is online

Users browsing this forum: No registered users and 21 guests