我必须按照本指南安装 apache2 才能安装 sslh(适用于 Linux 的 SSL/SSH 多路复用器)http://www.unixmen.com/sslh-a-sslssh-multiplexer-for-linux/但我得到的结果如下 $ 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)
请提出一个想法,因为似乎没有什么可行。 SSLH 适用于ssh -p 443 user@machine
Debian 8,但如果我尝试使用其他机器(例如 Kubuntu 15.10 或 Mac OS X),则不起作用。我使用 VirtualBox 进行测试。
奇怪的消息,因为sudo /etc/init.d/apache2 restart
给出
[ ok ] Restarting apache2 (via systemctl): apache2.service.
lynx http://localhost
另外,使用相同命令,我从 Debian 端(客户操作系统)获得了答案,但没有从 Mac OS X(我的主机)获得答案。
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
missing LSB tags
或许是和/或的 问题update-rc.d: error: insserv rejected the script header
我的apache2.conf:https://friendpaste.com/KEIIBZ8H1F1t3trdjEyT3
A more /etc/init.d/unbound
给出:
#!/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
如何添加包含有用信息的 LSB 标签?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
提前致谢。
瓦洛丽莎
答案1
修复了链接问题(debian-whezzy-unbound-install)http://labs.hatenablog.com/entry/debian-whezzy-unbound-install
### BEGIN INIT INFO
### END INIT INFO
的开头缺少up to /etc/init.d/unbound
。我添加了以下部分:
### 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
现在有了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.
这部分是可以运行的。只有 sslh 到目前为止存在问题且无法完全运行(ssh -p 443 user@machine
从 OS X 到 Debian 失败,ssh user@localhost -p 443
从 Debian 8(环回)可以运行)。