Install-webconf

Résolu
Bonjour,

bojour,
j'ai commencé l'instalation de nagios en suivant le guide d'instalation dans le site officiel de nagios3.0b5 mais j'ai rencontré un pbm lors de la configuration du l'interface web de nagios .
lorsque j'ai executé la commande
make install-webconf
ce message ma était afficher :
make: *** Pas de règle pour fabriquer la cible « install-webconf ». Arrêt.
je ne comprend rien
aidez moi svp
merci d'avance .

15 réponses

  1. Modérateur
    Bah je pense qu'il faut mettre les chances de son côté dans ce cas-là et s'empresser de regarder sur wikipedia ce qu'est un makefile.
    https://fr.wikipedia.org/wiki/Make

    Et même si tu ne comprends pas, tu peux au moins me reporter comme je te l'ai demandé le contenu de ce fichier Makefile, sinon je vais avoir du mal à t'aider :-)
    1. Modérateur
      Peux-tu nous donner le lien vers ton tutoriel et le contenu du fichier Makefile situé dans le répertoire dans lequel tu tapes "make install-webconf".

      En gros cette commande consiste à exécuter la séquence de commande contenue dans ce fichier Makefile et située derrière la balise :

      install-webconf:


      Vu le message d'erreur cette balise (cible) n'existe pas. Vérifie que tu n'as pas fait une coquille en tapant le nom de la cible (il suffit de regarder la liste des balises présente dans ce fichier).

      Bonne chance
      1. je ne comprend rien a ce ke vous dites car suis un debutant et je suis en plein stage .SVP si vous pouvez m'aidé a resoudr probleme.
        merçi de votre aide
        1. voici le site ou j'ai pris le tuto http://blog.nicolargo.com/2007/10/installation-de-nagios-3-sous-ubuntu.html
          1. Modérateur
            Il me faut toujours le contenu du makefile parce que je n'ai pas spécialement envie de m'enregistrer sur le site de Nagios pour récupérer les sources et reproduire tout ce que tu as fait.

            Tu es sûr que ton invite de commande est positionnée dans un répertoire contenant un fichier Makefile (nagios-3.0.2 ?) ?

            Si le fichier makefile y figure bien reporte-moi son contenu.
            1. Contributeur
              Salut mamie,

              Pas la peine de s'enregistrer, suffit de skipper l'email ;-))
          2. j'ai appliqué exactement ce qui etai sur le lien donc je t'ai envmais je suis bloqué au nieau de la commande make install-webconf.
            si tu pouvais m'aidé en constituant un tutoriel qui marcherai pour moi.
            SVP sui vraimen bloqué et c'est un travail a remettre vendredi c'est a dire demain.
            MERçI POUR VOTRE AIDE
            1. Modérateur
              Bon moi j'abandonne. Ça fait juste 4 fois que je te demande de me donner le contenu tu fichier Makefile, tu ne veux pas, je ne peux pas t'aider. Bonne chance pour la suite.
          3. escuze moi je ne connait pas ou ce trouve le fichier makefile oriente moi et je le copie pou te le donner.sourtou nabandonne pas STP.sui novice et je ne maitrise pa encore le systeme linux
            1. Modérateur
              Bon dans le répertoire nagios que tu as décompressé se trouve un fichier Makefile. C'est d'ailleurs pour ça que la commande make fonctionne. Ouvre avec ton explorateur de fichiers (comme sous windows) le fichier Makefile avec un éditeur texte et copie-colle moi son contenu.

              Si tu n'as pas de mode graphique, tu peux récupérer son contenu avec la commande :

              more Makefile
              1. Contributeur
                ###############################
                # Makefile for Nagios
                #
                # Last Modified: 04-13-2008
                ###############################
                
                
                # Source code directories
                SRC_BASE=@srcdir@/base
                SRC_CGI=@srcdir@/cgi
                SRC_HTM=@srcdir@/html
                SRC_MODULE=@srcdir@/module
                SRC_INCLUDE=@srcdir@/include
                SRC_COMMON=@srcdir@/common
                SRC_XDATA=@srcdir@/xdata
                SRC_CONTRIB=@srcdir@/contrib
                SRC_TTAP=@srcdir@/t-tap
                
                CC=@CC@
                CFLAGS=@CFLAGS@ @DEFS@
                LDFLAGS=@LDFLAGS@ @LIBS@
                
                prefix=@prefix@
                exec_prefix=@exec_prefix@
                LOGDIR=@localstatedir@
                CHECKRESULTDIR=@CHECKRESULTDIR@
                CFGDIR=@sysconfdir@
                BINDIR=@bindir@
                CGIDIR=@sbindir@
                LIBEXECDIR=@libexecdir@
                HTMLDIR=@datarootdir@
                INSTALL=@INSTALL@
                INSTALL_OPTS=@INSTALL_OPTS@
                COMMAND_OPTS=@COMMAND_OPTS@
                HTTPD_CONF=@HTTPD_CONF@
                INIT_DIR=@init_dir@
                INIT_OPTS=-o root -g root
                CGICFGDIR=$(CGIDIR)
                PERLDIR=@PERLDIR@
                
                USE_EVENTBROKER=@USE_EVENTBROKER@
                USE_LIBTAP=@USE_LIBTAP@
                
                INSTALLPERLSTUFF=@INSTALLPERLSTUFF@
                
                CGIEXTRAS=@CGIEXTRAS@
                
                SNPRINTF_O=@SNPRINTF_O@
                
                CP=@CP@
                
                @SET_MAKE@
                
                none:
                		@echo "Please supply a command line argument (i.e. 'make all').  Other targets are:"
                		@echo "   nagios cgis contrib modules"
                		@echo "   clean"
                		@echo "   install install-base install-cgis install-html install-config install-init install-commandmode fullinstall"
                #		@echo "   uninstall"
                
                # FreeBSD make does not support -C option, so we'll use the Apache style... (patch by Stanley Hopcroft 12/27/1999)
                
                all:
                	cd $(SRC_BASE) && $(MAKE)
                	cd $(SRC_CGI) && $(MAKE)
                	cd $(SRC_HTM) && $(MAKE)
                	if [ x$(USE_EVENTBROKER) = xyes ]; then \
                		cd $(SRC_MODULE) && $(MAKE); \
                	fi
                
                	@echo ""
                	@echo "*** Compile finished ***"
                	@echo ""
                	@echo "If the main program and CGIs compiled without any errors, you"
                	@echo "can continue with installing Nagios as follows (type 'make'"
                	@echo "without any arguments for a list of all possible options):"
                	@echo ""
                	@echo "  make install"
                	@echo "     - This installs the main program, CGIs, and HTML files"
                	@echo ""
                	@echo "  make install-init"
                	@echo "     - This installs the init script in $(DESTDIR)$(INIT_DIR)"
                	@echo ""
                	@echo "  make install-commandmode"
                	@echo "     - This installs and configures permissions on the"
                	@echo "       directory for holding the external command file"
                	@echo ""
                	@echo "  make install-config"
                	@echo "     - This installs *SAMPLE* config files in $(DESTDIR)$(CFGDIR)"
                	@echo "       You'll have to modify these sample files before you can"
                	@echo "       use Nagios.  Read the HTML documentation for more info"
                	@echo "       on doing this.  Pay particular attention to the docs on"
                	@echo "       object configuration files, as they determine what/how"
                	@echo "       things get monitored!"
                	@echo ""
                	@echo "  make install-webconf"
                	@echo "     - This installs the Apache config file for the Nagios"
                	@echo "       web interface"
                	@echo ""
                	@echo ""
                	@echo "*** Support Notes *******************************************"
                	@echo ""
                	@echo "If you have questions about configuring or running Nagios,"
                	@echo "please make sure that you:"
                	@echo ""
                	@echo "     - Look at the sample config files"
                	@echo "     - Read the HTML documentation"
                	@echo "     - Read the FAQs online at http://www.nagios.org/faqs"
                	@echo ""
                	@echo "before you post a question to one of the mailing lists."
                	@echo "Also make sure to include pertinent information that could"
                	@echo "help others help you.  This might include:"
                	@echo ""
                	@echo "     - What version of Nagios you are using"
                	@echo "     - What version of the plugins you are using"
                	@echo "     - Relevant snippets from your config files"
                	@echo "     - Relevant error messages from the Nagios log file"
                	@echo ""
                	@echo "For more information on obtaining support for Nagios, visit:"
                	@echo ""
                	@echo "       https://www.nagios.org/support/"
                	@echo ""
                	@echo "*************************************************************"
                	@echo ""
                	@echo "Enjoy."
                	@echo ""
                
                nagios:
                	cd $(SRC_BASE) && $(MAKE)
                
                config:
                	@echo "Sample config files are automatically generated once you run the"
                	@echo "configure script.  You can install the sample config files on your"
                	@echo "system by using the 'make install-config' command."
                
                cgis:
                	cd $(SRC_CGI) && $(MAKE)
                
                html:
                	cd $(SRC_HTM) && $(MAKE)
                
                contrib:
                	cd $(SRC_CONTRIB) && $(MAKE)
                
                modules:
                	cd $(SRC_MODULE) && $(MAKE)
                
                clean:
                	cd $(SRC_BASE) && $(MAKE) $@
                	cd $(SRC_CGI) && $(MAKE) $@
                	cd $(SRC_COMMON) && $(MAKE) $@
                	cd $(SRC_XDATA) && $(MAKE) $@
                	cd $(SRC_HTM) && $(MAKE) $@
                	cd $(SRC_INCLUDE) && $(MAKE) $@
                	cd $(SRC_CONTRIB) && $(MAKE) $@
                	cd $(SRC_MODULE) && $(MAKE) $@
                	cd $(SRC_TTAP) && $(MAKE) $@
                	rm -f *.cfg core
                	rm -f *~ *.*~ */*~ */*.*~ */*/*.*~
                
                distclean: clean
                	cd $(SRC_BASE) && $(MAKE) $@
                	cd $(SRC_CGI) && $(MAKE) $@
                	cd $(SRC_COMMON) && $(MAKE) $@
                	cd $(SRC_XDATA) && $(MAKE) $@
                	cd $(SRC_HTM) && $(MAKE) $@
                	cd $(SRC_INCLUDE) && $(MAKE) $@
                	cd $(SRC_CONTRIB) && $(MAKE) $@
                	cd $(SRC_MODULE) && $(MAKE) $@
                	cd $(SRC_TTAP) && $(MAKE) $@
                	rm -f sample-config/*.cfg  sample-config/*.conf sample-config/template-object/*.cfg
                	rm -f daemon-init pkginfo
                	rm -f Makefile subst
                	rm -f config.log config.status config.cache
                
                devclean: distclean
                
                test:
                	$(MAKE) test-perl
                	$(MAKE) test-tap
                
                test-tap: tap/src/tap.o
                	@if [ x$(USE_LIBTAP) = xyes ]; then \
                		cd $(SRC_TTAP) && $(MAKE) test; \
                	else \
                		echo "NOTE: You must run configure with --enable-libtap to run the C tap tests"; \
                	fi
                
                tap/src/tap.o:
                	cd tap && $(MAKE)
                
                test-perl:
                	cd t && $(MAKE) test
                
                install-html:
                	cd $(SRC_HTM) && $(MAKE) install
                
                install-base:
                	cd $(SRC_BASE) && $(MAKE) install
                
                install-cgis:
                	cd $(SRC_CGI) && $(MAKE) install
                
                install:
                	cd $(SRC_BASE) && $(MAKE) $@
                	cd $(SRC_CGI) && $(MAKE) $@
                	cd $(SRC_HTM) && $(MAKE) $@
                	$(MAKE) install-basic
                
                install-unstripped:
                	cd $(SRC_BASE) && $(MAKE) $@
                	cd $(SRC_CGI) && $(MAKE) $@
                	cd $(SRC_HTM) && $(MAKE) $@
                	$(MAKE) install-basic
                
                install-basic:
                	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR)
                	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)
                	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives
                	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CHECKRESULTDIR)
                	if [ $(INSTALLPERLSTUFF) = yes ]; then \
                		$(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(BINDIR); \
                	fi;
                
                	@echo ""
                	@echo "*** Main program, CGIs and HTML files installed ***"
                	@echo ""
                	@echo "You can continue with installing Nagios as follows (type 'make'"
                	@echo "without any arguments for a list of all possible options):"
                	@echo ""
                	@echo "  make install-init"
                	@echo "     - This installs the init script in $(DESTDIR)$(INIT_DIR)"
                	@echo ""
                	@echo "  make install-commandmode"
                	@echo "     - This installs and configures permissions on the"
                	@echo "       directory for holding the external command file"
                	@echo ""
                	@echo "  make install-config"
                	@echo "     - This installs sample config files in $(DESTDIR)$(CFGDIR)"
                	@echo ""
                
                
                install-config:
                	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
                	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg
                	$(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg
                	$(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg
                
                	@echo ""
                	@echo "*** Config files installed ***"
                	@echo ""
                	@echo "Remember, these are *SAMPLE* config files.  You'll need to read"
                	@echo "the documentation for more information on how to actually define"
                	@echo "services, hosts, etc. to fit your particular needs."
                	@echo ""
                
                install-webconf:
                	$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/nagios.conf
                
                	@echo ""
                	@echo "*** Nagios/Apache conf file installed ***"
                	@echo ""
                
                install-init: install-daemoninit
                
                install-daemoninit:
                	$(INSTALL) -m 755 -d $(INIT_OPTS) $(DESTDIR)$(INIT_DIR)
                	$(INSTALL) -m 755 $(INIT_OPTS) daemon-init $(DESTDIR)$(INIT_DIR)/nagios
                
                	@echo ""
                	@echo "*** Init script installed ***"
                	@echo ""
                
                
                install-commandmode:
                	$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
                	chmod g+s $(DESTDIR)$(LOGDIR)/rw
                
                	@echo ""
                	@echo "*** External command directory configured ***"
                	@echo ""
                
                
                fullinstall: install install-init install-commandmode install-webconf
                
                # Uninstall is too destructive if base install directory is /usr, etc.
                #uninstall:
                #	rm -rf $(DESTDIR)$(BINDIR)/nagios $(DESTDIR)$(CGIDIR)/*.cgi $(DESTDIR)$(CFGDIR)/*.cfg $(DESTDIR)$(HTMLDIR)
                
                #
                # Targets for creating packages on various architectures
                #
                
                # Solaris pkgmk
                PACKDIR=@PACKDIR@
                VERSION=@VERSION@
                
                Prototype:
                	if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
                	if [ ! -d $(PACKDIR)/etc ] ; then mkdir $(PACKDIR)/etc; fi
                	if [ ! -d $(PACKDIR)/etc/init.d ] ; then mkdir $(PACKDIR)/etc/init.d; fi
                	if [ ! -d $(PACKDIR)/etc/nagios ] ; then mkdir $(PACKDIR)/etc/nagios; fi
                	$(MAKE) all
                	$(MAKE) DESTDIR=$(PACKDIR) INIT_OPTS='' INSTALL_OPTS='' COMMAND_OPTS='' nagios_grp='' nagios_usr='' fullinstall
                	$(INSTALL) -m 644 sample-config/nagios.cfg $(PACKDIR)$(CFGDIR)/nagios.cfg.$(VERSION)
                	$(INSTALL) -m 644 sample-config/cgi.cfg $(PACKDIR)$(CFGDIR)/cgi.cfg.$(VERSION)
                	$(INSTALL) -m 640 sample-config/resource.cfg $(PACKDIR)$(CFGDIR)/resource.cfg.$(VERSION)
                	$(INSTALL) -m 664 sample-config/template-object/bigger.cfg $(PACKDIR)$(CFGDIR)/bigger.cfg.$(VERSION)
                	$(INSTALL) -m 664 sample-config/template-object/minimal.cfg $(PACKDIR)$(CFGDIR)/minimal.cfg.$(VERSION)
                	$(INSTALL) -m 664 sample-config/template-object/checkcommands.cfg $(PACKDIR)$(CFGDIR)/checkcommands.cfg.$(VERSION)
                	$(INSTALL) -m 664 sample-config/template-object/misccommands.cfg $(PACKDIR)$(CFGDIR)/misccommands.cfg.$(VERSION)
                	cd contrib; $(MAKE) all; $(MAKE) DESTDIR=$(PACKDIR) INIT_OPTS='' INSTALL_OPTS='' COMMAND_OPTS='' nagios_grp='' nagios_usr='' install
                	echo i pkginfo> Prototype
                	if [ -f checkinstall ] ; then echo i checkinstall>> Prototype; fi
                	if [ -f preinstall ] ; then echo i preinstall>> Prototype; fi
                	if [ -f postinstall ] ; then echo i postinstall>> Prototype; fi
                	pkgproto $(PACKDIR)=/ | sed -e "s|$(LOGNAME) $(GROUP)$$|root root|" | egrep -v "(s|d) none (/|/etc|/var|/usr|/usr/local) " >> Prototype
                
                pkg/nagios/pkgmap: Prototype
                	mkdir $(PACKDIR)/nagios
                	pkgmk -o -r / -f Prototype -d $(PACKDIR) nagios
                
                nagios.SPARC.pkg.tar.gz: pkg/nagios/pkgmap
                	cd $(PACKDIR) && tar -cf - nagios | gzip -9 -c > ../nagios.SPARC.pkg.tar.gz
                
                pkgset: nagios.SPARC.pkg.tar.gz
                
                pkgclean:
                	rm -rf pkg Prototype nagios.SPARC.pkg.tar.gz
                
              2. Modérateur
                Merci zipe31 ! Ouf heureusement que tu es là :-)

                poillulove : la cible "install-webconf" est bien présente c'est donc que tu as dû faire une faute de frappe en tapant ta commande :

                make install-webconf


                ... ou que ton shell n'est pas positionné dans le répertoire qui contient ce fichier Makefile. Quand tu tapes la commande "ls", tu dois voir apparaître un fichier Makefile sinon c'est sûr que tu n'es pas dans le bon répertoire. S'il apparaît vérifie que c'est le bon répertoire, ie que le Makefile contient bien une cible Makefile. Si c'est le cas une ligne doit apparaître quand tu tapes :

                grep "install-webconf" Makefile


                Sinon c'est que tu n'es pas dans le bon répertoire.

                En tout cas je pense qu'avant de te lancer dans l'installation de nagios, tu devrais te familiariser un peu avec les commandes linux....
              3. Contributeur
                Ouf heureusement que tu es là :-)
                T'avais dû sauter une case, sans quoi t'aurais trouvé seule comme une grande ;-))
              4. Modérateur
                Ah effectivement :-)
            2. quand je me met dans le repertoire nagios-3.2.3 voici se ke le systeme m'envoie comme erreur

              root@franck-ubuntu:/home/franck/nagios-3.2.3# ls
              base configure.in install-sh OutputTrap.pm tap
              cgi contrib LEGAL p1.pl THANKS
              Changelog daemon-init LICENSE pkginfo tools
              common daemon-init.in Makefile pkginfo.in t-tap
              config.guess download Makefile.in README update-version
              config.log functions make-tarball sample-config UPGRADING
              config.status html mkpackage subst xdata
              config.sub include module subst.in
              configure INSTALLING nagios.spec t
              root@franck-ubuntu:/home/franck/nagios-3.2.3# make install-webconf
              /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
              /usr/bin/install: cannot create regular file '/etc/httpd/conf.d/nagios.conf': No such file or directory
              make: *** [install-webconf] Error 1
              root@franck-ubuntu:/home/franck/nagios-3.2.3#
              1. Modérateur
                Ah bien, on avance ! Donc là tu as bien tapé la bonne commande :

                root@franck-ubuntu:/home/franck/nagios-3.2.3# make install-webconf
                /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
                /usr/bin/install: cannot create regular file '/etc/httpd/conf.d/nagios.conf': No such file or directory 


                ... mais le script plante car le répertoire /etc/httpd/conf.d n'existe pas. Bon ce n'est pas forcément choquant quand on sait qu'aujourd'hui la configuration serait plutôt dans /etc/apache2/conf.d.

                C'est assez bizarre. Bon installe apache2 :
                http://www.mistra.fr/tutoriel-linux-serveur-web-apache2.html

                ... puis :

                cd /etc
                ln -s apache2 httpd


                Ensuite retourne dans le répertoire de nagios et relance la commande d'installation

                make install-webconf


                Bonne chance
                1. salut j'ai la mm problem mais rien ce passe apres tout
              2. Modérateur
                Ah parfait ! Mais qu'est ce qui t'avait bloqué ? Une faute de frappe ? Ou quelque chose de plus subtil ?
                1. enfet ce jai fait c'est reinstallé completement nagios pas a pas et la commande a fonctioné.mais pou le moment jai un léger probleme:puisque par la suite jai installé aussi centreon qui c'est installé parfaitement je narive pa a voir les hots sous forme graphique.
                  merci de morienté mamiemando
                  1. Modérateur
                    Ah désolé je n'ai jamais utilisé centreon ni nagios. Je pense que tu devrais ouvrir un nouveau sujet avec un titre plus approprié sur le forum linux, d'autant que celui-ci est résolu.