Instalar o apache2 falha com o Debian 8

1

Eu tenho que instalar o apache2 para instalar o sslh (um multiplexador SSL / SSH para Linux) seguindo este guia link mas obtenho resultado seguindo com $ sudo apt-get install apache2 :

    Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
apache2 est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Paramétrage de apache2 (2.4.10-10) ...        
insserv: warning: script 'unbound' missing LSB tags and overrides
        insserv: There is a loop between service cups-browsed and unbound if stopped
        insserv:  loop involving service unbound at depth 2
        insserv:  loop involving service cups-browsed at depth 1
        insserv:  loop involving service sendsigs at depth 4
        insserv: exiting now without changing boot order!
        update-rc.d: error: insserv rejected the script header
        dpkg: erreur de traitement du paquet apache2 (--configure) :
         le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
        Traitement des actions différées (« triggers ») pour systemd (215-17) ...
        Des erreurs ont été rencontrées pendant l'exécution :
         apache2
        needrestart is being skipped since dpkg has failed
        E: Sub-process /usr/bin/dpkg returned an error code (1)

Uma ideia, por favor, porque nada parece funcionar. O SSLH funciona com ssh -p 443 user@machine do Debian 8, mas não funciona se eu tentar com uma outra máquina como o Kubuntu 15.10 ou o Mac OS X, por exemplo. Eu uso o VirtualBox para meus testes.

Mensagem estranha porque sudo /etc/init.d/apache2 restart fornece

[ ok ] Restarting apache2 (via systemctl): apache2.service.

Também recebo uma resposta com lynx http://localhost do lado do Debian (guest OS), mas não do Mac OS X (meu host) com o mesmo comando.

Debian Logo Apache2 Debian Default Page
   It works!

   This is the default welcome page used to test the correct operation of
   the Apache2 server after installation on Debian systems. If you can
   read this page, it means that the Apache HTTP server installed at this
   site is working properly. You should replace this file (located at
   /var/www/html/index.html) before continuing to operate your HTTP
   server.

   If you are a normal user of this web site and don't know what this page
   is about, this probably means that the site is currently unavailable
   due to maintenance. If the problem persists, please contact the site's
   administrator.
   Configuration Overview

   Debian's Apache2 default configuration is different from the upstream
   default configuration, and split into several files optimized for
   interaction with Debian tools. The configuration system is fully
   documented in /usr/share/doc/apache2/README.Debian.gz. Refer to this

Talvez um problema com missing LSB tags e / ou update-rc.d: error: insserv rejected the script header

Meu apache2.conf: link

Um more /etc/init.d/unbound dá:

#!/bin/sh
#
# unbound This shell script takes care of starting and stopping
# unbound (DNS server).

exec="/usr/local/sbin/unbound"
prog="unbound"
config="/var/unbound/unbound.conf"
pidfile="/var/run/unbound.pid"
rootdir="/var/unbound"

case "$1" in
start)
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "

# setup root jail
if [ -s /etc/localtime ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/localtime ] || /usr/bin/cmp -s /etc/localtime ${rootdir
}/etc/localtime; then
cp -fp /etc/localtime ${rootdir}/etc/localtime
fi;
fi;
if [ -s /etc/resolv.conf ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/resolv.conf ] || /usr/bin/cmp -s /etc/resolv.conf ${roo
tdir}/etc/resolv.conf; then
cp -fp /etc/resolv.conf ${rootdir}/etc/resolv.conf
fi;
fi;
if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; th
en
[ -d ${rootdir}/dev ] || mkdir -p ${rootdir}/dev ;
[ -e ${rootdir}/dev/log ] || touch ${rootdir}/dev/log
mount --bind -n /dev/log ${rootdir}/dev/log >/dev/null 2>&1;
fi;
if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts;
 then
[ -d ${rootdir}/dev ] || mkdir -p ${rootdir}/dev ;
[ -e ${rootdir}/dev/random ] || touch ${rootdir}/dev/random
mount --bind -n /dev/random ${rootdir}/dev/random >/dev/null 2>&1;
fi;

# if not running, start it up here
start-stop-daemon --start --quiet --pidfile $pidfile --exec $exec -- -c $config
echo
;;

stop)
echo -n $"Stopping $prog: "
start-stop-daemon --stop --quiet --oknodo --pidfile $pidfile
echo
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; then
umount ${rootdir}/dev/log >/dev/null 2>&1
fi;
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts; t
hen
umount ${rootdir}/dev/random >/dev/null 2>&1
fi;
;;

restart)
start-stop-daemon --stop --quiet --oknodo --pidfile $pidfile
start-stop-daemon --start --quiet --pidfile $pidfile --exec $exec -- -c $config
;;

reload)
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $pidfile --exec $
exec
;;

force_reload)
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $pidfile --exec $
exec
;;

*)
echo $"Usage: $0 {start|stop|restart|reload|force-reload}"
exit 2
;;
esac

exit 0

Como adicionar as tags LSB com as boas informações? wiki.debian.org/LSBInitScripts

#! /bin/sh
### BEGIN INIT INFO
# Provides: unbound
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: unbound recursive Domain Name Server.
# Description:  unbound is a Domain Name Server (DNS)
#               that is used to resolve host names to IP addresses.
### END INIT INFO

Obrigado antecipadamente.

Valorisa

    
por valorisa 11.06.2015 / 16:08

1 resposta

0

Problema corrigido com o link (debian-whezzy-unbound-install) link

### BEGIN INIT INFO até ### END INIT INFO estava ausente no início de /etc/init.d/unbound . Eu adicionei esta parte:

### BEGIN INIT INFO
# Provides: unbound
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Should-Start: $syslog
# Should-Stop: $syslog
# Short-Description: unbound recursive Domain Name Server.
# Description:  unbound is a Domain Name Server (DNS) 
#               that is used to resolve host names to IP addresses.
### END INIT INFO

Agora com sudo apt-get install apache2 , obtenho:

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
apache2 est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.

Esta parte é funcional. Apenas o sslh é até agora problemático e não está totalmente operacional ( ssh -p 443 user@machine do OS X para o Debian falha e ssh user@localhost -p 443 do Debian 8 (loopback) funciona).

    
por 11.06.2015 / 16:09