Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Zainstalowałem sobie apache2 i wcześniej normalnie się resetował, teraz gdy chcę zrobić reset mam coś takiego.
root@fp:~# /etc/init.d/apache2 restart -bash: /etc/init.d/apache2: /bin/sh^M: bad interpreter: No such file or directory
w apache2 mam po wpisaniu
cat -A /etc/init.d/apache2
Mam
fi^M$ ^I;;^M$ ^Ireload | force-reload | graceful)^M$ ^I^Iif ! $APACHE2CTL configtest > /dev/null 2>&1; then^M$ $APACHE2CTL configtest || true^M$ log_end_msg 1^M$ exit 1^M$ fi^M$ log_daemon_msg "Reloading web server config" "apache2"^M$ ^I^Iif pidof_apache > /dev/null ; then^M$ if $APACHE2CTL graceful $2 ; then^M$ log_end_msg 0^M$ else^M$ log_end_msg 1^M$ fi^M$ fi^M$ ^I;;^M$ ^Irestart)^M$ ^I^Iif ! $APACHE2CTL configtest > /dev/null 2>&1; then^M$ ^I^I $APACHE2CTL configtest || true^M$ ^I^I log_end_msg 1^M$ ^I^I exit 1^M$ ^I^Ifi^M$ ^I^Iif check_htcacheclean ; then^M$ ^I^I^Ilog_daemon_msg "Restarting web server" "htcacheclean"^M$ ^I^I^Istop_htcacheclean^M$ ^I^I^Ilog_progress_msg apache2^M$ ^I^Ielse^M$ ^I^I^Ilog_daemon_msg "Restarting web server" "apache2"^M$ ^I^Ifi^M$ ^I^IPID=$(pidof_apache) || true^M$ ^I^Iif ! apache_wait_stop; then^M$ log_end_msg 1 || true^M$ fi^M$ ^I^Iif $APACHE2CTL start; then^M$ ^I^I^Iif check_htcacheclean ; then^M$ ^I^I^I^Istart_htcacheclean || log_end_msg 1^M$ ^I^I^Ifi^M$ log_end_msg 0^M$ else^M$ log_end_msg 1^M$ fi^M$ ^I;;^M$ ^Istart-htcacheclean)^M$ ^I^Ilog_daemon_msg "Starting htcacheclean"^M$ ^I^Istart_htcacheclean || log_end_msg 1^M$ ^I^Ilog_end_msg 0^M$ ^I;;^M$ ^Istop-htcacheclean)^M$ ^I^Ilog_daemon_msg "Stopping htcacheclean"^M$ ^I^I^Istop_htcacheclean^M$ ^I^I^Ilog_end_msg 0^M$ ^I;;^M$ ^Istatus)^M$ ^I^IPID=$(pidof_apache) || true^M$ ^I^Iif [ -n "$PID" ]; then^M$ ^I^I^Iecho "Apache2$DIR_SUFFIX is running (pid $PID)."^M$ ^I^I^Iexit 0^M$ ^I^Ielse^M$ ^I^I^Iecho "Apache2$DIR_SUFFIX is NOT running."^M$ ^I^I^Iif [ -e "$PIDFILE" ]; then^M$ ^I^I^I^Iexit 1^M$ ^I^I^Ielse^M$ ^I^I^I^Iexit 3^M$ ^I^I^Ifi^M$ ^I^Ifi^M$ ^I;;^M$ ^I*)^M$ ^I^Ilog_success_msg "Usage: /etc/init.d/apache2$DIR_SUFFIX {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}"^M$ ^I^Iexit 1^M$ ^I;;^M$ esac^M$
po wpisaniu
root@fp:~# pico /etc/init.d/apache2
to plik inaczej wygląda
Próbowałem jeszcze tak
root@fp:~# apt-get install apache2 --reinstall Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 40 not upgraded. Need to get 0 B/1394 B of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 39609 files and directories currently installed.) Preparing to replace apache2 2.2.16-6+squeeze11 (using .../apache2_2.2.16-6+squeeze11_i386.deb) ... Unpacking replacement apache2 ... Setting up apache2 (2.2.16-6+squeeze11) ...
root@fp:~# apt-get remove apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apache2 0 upgraded, 0 newly installed, 1 to remove and 40 not upgraded. After this operation, 36.9 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 39609 files and directories currently installed.) Removing apache2 ... root@fp:~# apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apache2 0 upgraded, 1 newly installed, 0 to remove and 40 not upgraded. Need to get 0 B/1394 B of archives. After this operation, 36.9 kB of additional disk space will be used. Selecting previously deselected package apache2. (Reading database ... 39605 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.2.16-6+squeeze11_i386.deb) ... Setting up apache2 (2.2.16-6+squeeze11) ... root@fp:~# /etc/init.d/apache2 restart -bash: /etc/init.d/apache2: /bin/sh^M: bad interpreter: No such file or directory
Ale to też nic nie dało
Ostatnio edytowany przez shizo (2013-03-21 06:42:32)
Offline
Wygląda jak byś miał zepsuty plik /etc/init.d/apache2 (złe znaki końca lini?).
Spróbuj:
apt-get purge apache2 apt-get install apache2
Ostatnio edytowany przez pioki (2013-03-21 06:47:16)
Offline
Może spod Windowsa coś dłubał odnośnie tego pliku?
W Squeeze ten skrypt siedzi w pakiecie apache2.2-common, a nie apache2.
Offline
root@fp:~# apt-get purge apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apache2* 0 upgraded, 0 newly installed, 1 to remove and 40 not upgraded. After this operation, 36.9 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 39609 files and directories currently installed.) Removing apache2 ... root@fp:~# apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apache2 0 upgraded, 1 newly installed, 0 to remove and 40 not upgraded. Need to get 0 B/1394 B of archives. After this operation, 36.9 kB of additional disk space will be used. Selecting previously deselected package apache2. (Reading database ... 39605 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.2.16-6+squeeze11_i386.deb) ... Setting up apache2 (2.2.16-6+squeeze11) ... root@fp:~# /etc/init.d/apache2 restart -bash: /etc/init.d/apache2: /bin/sh^M: bad interpreter: No such file or directory
Dalej nic. Nie robiłem z nim nic,chyba że kolega coś w tym grzebał,będę musiał się zapytać.
Offline
W Squeeze ten skrypt siedzi w pakiecie apache2.2-common, a nie apache2.
Offline
a na pewno nie ruszałeś /etc/init.d/apache2 ?
jak możesz zrobić coś takiego:
dos2unix /etc/init.d/apache2
poprawi znaki końca linii jak i inne znaki niedrukowane które mógł M$ popsuć.
ja mam coś takiego:
root@debian1:~# cat -A /etc/init.d/apache2 #!/bin/sh$ ### BEGIN INIT INFO$ # Provides: apache2$ # Required-Start: $local_fs $remote_fs $network $syslog $named$ # Required-Stop: $local_fs $remote_fs $network $syslog $named$ # Default-Start: 2 3 4 5$ # Default-Stop: 0 1 6$ # X-Interactive: true$ # Short-Description: Start/stop apache2 web server$ ### END INIT INFO$ $ set -e$ $ SCRIPTNAME="${0##*/}"$ SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}"$ if [ -n "$APACHE_CONFDIR" ] ; then$ ^Iif [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then$ ^I^IDIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}"$ ^Ielse$ ^I^IDIR_SUFFIX=$ ^Ifi$ elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then$ ^IDIR_SUFFIX="-${SCRIPTNAME##apache2-}"$ ^IAPACHE_CONFDIR=/etc/apache2$DIR_SUFFIX$ else$ ^IDIR_SUFFIX=$ ^IAPACHE_CONFDIR=/etc/apache2$ fi$ if [ -z "$APACHE_ENVVARS" ] ; then$ ^IAPACHE_ENVVARS=$APACHE_CONFDIR/envvars$ fi$ export APACHE_CONFDIR APACHE_ENVVARS$ $ ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin"$ if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then$ ^IENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR"$ fi$ if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then$ ^IENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS"$ fi$ $ $ #edit /etc/default/apache2 to change this.$ HTCACHECLEAN_RUN=auto$ HTCACHECLEAN_MODE=daemon$ HTCACHECLEAN_SIZE=300M$ HTCACHECLEAN_DAEMON_INTERVAL=120$ HTCACHECLEAN_PATH=/var/cache/apache2$DIR_SUFFIX/mod_disk_cache$ HTCACHECLEAN_OPTIONS=""$ $ APACHE_HTTPD=$(. $APACHE_ENVVARS && echo $APACHE_HTTPD)$ if [ -z "$APACHE_HTTPD" ] ; then$ ^IAPACHE_HTTPD=/usr/sbin/apache2$ fi$ if [ ! -x $APACHE_HTTPD ] ; then$ ^Iecho "No apache MPM package installed"$ ^Iexit 0$ fi$ $ . /lib/lsb/init-functions$ $ test -f /etc/default/rcS && . /etc/default/rcS$ $ if [ -f /etc/default/apache2$DIR_SUFFIX ] ; then$ ^I. /etc/default/apache2$DIR_SUFFIX$ elif [ -f /etc/default/apache2 ] ; then$ ^I. /etc/default/apache2$ fi$ $ APACHE2CTL="$ENV /usr/sbin/apache2ctl"$ HTCACHECLEAN="$ENV /usr/sbin/htcacheclean"$ $ PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE)$ if [ -z "$PIDFILE" ] ; then$ ^Iecho ERROR: APACHE_PID_FILE needs to be defined in $APACHE_ENVVARS >&2$ ^Iexit 2$ fi$ $ $ check_htcacheclean() {$ ^I[ "$HTCACHECLEAN_MODE" = "daemon" ] || return 1$ $ ^I[ "$HTCACHECLEAN_RUN" = "yes" ] && return 0$ $ ^IMODSDIR=$(. $APACHE_ENVVARS && echo $APACHE_MODS_ENABLED)$ ^I[ "$HTCACHECLEAN_RUN" = "auto" \$ ^I -a -e ${MODSDIR:-$APACHE_CONFDIR/mods-enabled}/disk_cache.load ] && \$ ^I^Ireturn 0$ ^I$ ^Ireturn 1$ }$ $ start_htcacheclean() {$ ^Iif [ ! -d "$HTCACHECLEAN_PATH" ] ; then$ ^I^Iecho "... directory $HTCACHECLEAN_PATH does not exist!" >&2$ ^I^Ireturn 1$ ^Ifi^I$ ^I$HTCACHECLEAN $HTCACHECLEAN_OPTIONS -d$HTCACHECLEAN_DAEMON_INTERVAL \$ ^I^I^I-i -p$HTCACHECLEAN_PATH -l$HTCACHECLEAN_SIZE$ }$ $ stop_htcacheclean() {$ ^Ipkill -P 1 -f "htcacheclean.* -p$HTCACHECLEAN_PATH " 2> /dev/null || echo ...not running$ }$ $ pidof_apache() {$ ^I# if there is actually an apache2 process whose pid is in PIDFILE,$ ^I# print it and return 0.$ ^Iif [ -e "$PIDFILE" ]; then$ ^I^Iif pidof apache2 | tr ' ' '\n' | grep -w $(cat $PIDFILE); then$ ^I^I^Ireturn 0$ ^I^Ifi$ ^Ifi$ ^Ireturn 1$ }$ $ apache_stop() {$ ^Iif $APACHE2CTL configtest > /dev/null 2>&1; then$ ^I^I# if the config is ok than we just stop normaly$ $APACHE2CTL stop 2>&1 | grep -v 'not running' >&2 || true$ ^Ielse$ ^I^I# if we are here something is broken and we need to try$ ^I^I# to exit as nice and clean as possible$ ^I^IPID=$(pidof_apache) || true$ $ ^I^Iif [ "${PID}" ]; then$ ^I^I^I# in this case it is everything nice and dandy and we kill apache2$ ^I^I^Iecho$ ^I^I^Ilog_warning_msg "The apache2$DIR_SUFFIX configtest failed, so we are trying to kill it manually. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!"$ kill $PID$ ^I^Ielif [ "$(pidof apache2)" ]; then$ ^I^I^Iif [ "$VERBOSE" != no ]; then$ echo " ... failed!"$ ^I^I^I echo "You may still have some apache2 processes running. There are"$ ^I^I^I echo "processes named 'apache2' which do not match your pid file,"$ ^I^I^I echo "and in the name of safety, we've left them alone. Please review"$ ^I^I^I echo "the situation by hand."$ fi$ return 1$ ^I^Ifi$ ^Ifi$ }$ $ apache_wait_stop() {$ ^I# running ?$ ^IPIDTMP=$(pidof_apache) || true$ ^Iif kill -0 "${PIDTMP:-}" 2> /dev/null; then$ ^I PID=$PIDTMP$ ^Ifi$ $ ^Iapache_stop$ $ ^I# wait until really stopped$ ^Iif [ -n "${PID:-}" ]; then$ ^I^Ii=0$ ^I^Iwhile kill -0 "${PID:-}" 2> /dev/null; do$ ^I^Iif [ $i = '60' ]; then$ ^I^I^Ibreak;$ ^I ^Ielse$ ^I^I^Iif [ $i = '0' ]; then$ ^I^I^Iecho -n " ... waiting "$ ^I^I^Ielse$ ^I ^I^Iecho -n "."$ ^I^I ^Ifi$ ^I^I^Ii=$(($i+1))$ ^I^I^Isleep 1$ ^I fi$ ^I^I done$ ^Ifi$ }$ $ case $1 in$ ^Istart)$ ^I^Ilog_daemon_msg "Starting web server" "apache2"$ ^I^Iif $APACHE2CTL start; then$ ^I^I^Iif check_htcacheclean ; then$ ^I^I^I^Ilog_progress_msg htcacheclean$ ^I^I^I^Istart_htcacheclean || log_end_msg 1$ ^I^I^Ifi$ log_end_msg 0$ else$ log_end_msg 1$ fi$ ^I;;$ ^Istop)$ ^I^Iif check_htcacheclean ; then$ ^I^I^Ilog_daemon_msg "Stopping web server" "htcacheclean"$ ^I^I^Istop_htcacheclean$ ^I^I^Ilog_progress_msg "apache2"$ ^I^Ielse$ ^I^I^Ilog_daemon_msg "Stopping web server" "apache2"$ ^I^Ifi$ ^I^Iif apache_wait_stop; then$ log_end_msg 0$ else$ log_end_msg 1$ fi$ ^I;;$ ^Igraceful-stop)$ ^I^Iif check_htcacheclean ; then$ ^I^I^Ilog_daemon_msg "Stopping web server" "htcacheclean"$ ^I^I^Istop_htcacheclean$ ^I^I^Ilog_progress_msg "apache2"$ ^I^Ielse$ ^I^I^Ilog_daemon_msg "Stopping web server" "apache2"$ ^I^Ifi$ ^I^Iif $APACHE2CTL graceful-stop; then$ log_end_msg 0$ else$ log_end_msg 1$ fi$ ^I;;$ ^Ireload | force-reload | graceful)$ ^I^Iif ! $APACHE2CTL configtest > /dev/null 2>&1; then$ $APACHE2CTL configtest || true$ log_end_msg 1$ exit 1$ fi$ log_daemon_msg "Reloading web server config" "apache2"$ ^I^Iif pidof_apache > /dev/null ; then$ if $APACHE2CTL graceful $2 ; then$ log_end_msg 0$ else$ log_end_msg 1$ fi$ fi$ ^I;;$ ^Irestart)$ ^I^Iif ! $APACHE2CTL configtest > /dev/null 2>&1; then$ ^I^I $APACHE2CTL configtest || true$ ^I^I log_end_msg 1$ ^I^I exit 1$ ^I^Ifi$ ^I^Iif check_htcacheclean ; then$ ^I^I^Ilog_daemon_msg "Restarting web server" "htcacheclean"$ ^I^I^Istop_htcacheclean$ ^I^I^Ilog_progress_msg apache2$ ^I^Ielse$ ^I^I^Ilog_daemon_msg "Restarting web server" "apache2"$ ^I^Ifi$ ^I^IPID=$(pidof_apache) || true$ ^I^Iif ! apache_wait_stop; then$ log_end_msg 1 || true$ fi$ ^I^Iif $APACHE2CTL start; then$ ^I^I^Iif check_htcacheclean ; then$ ^I^I^I^Istart_htcacheclean || log_end_msg 1$ ^I^I^Ifi$ log_end_msg 0$ else$ log_end_msg 1$ fi$ ^I;;$ ^Istart-htcacheclean)$ ^I^Ilog_daemon_msg "Starting htcacheclean"$ ^I^Istart_htcacheclean || log_end_msg 1$ ^I^Ilog_end_msg 0$ ^I;;$ ^Istop-htcacheclean)$ ^I^Ilog_daemon_msg "Stopping htcacheclean"$ ^I^I^Istop_htcacheclean$ ^I^I^Ilog_end_msg 0$ ^I;;$ ^Istatus)$ ^I^IPID=$(pidof_apache) || true$ ^I^Iif [ -n "$PID" ]; then$ ^I^I^Iecho "Apache2$DIR_SUFFIX is running (pid $PID)."$ ^I^I^Iexit 0$ ^I^Ielse$ ^I^I^Iecho "Apache2$DIR_SUFFIX is NOT running."$ ^I^I^Iif [ -e "$PIDFILE" ]; then$ ^I^I^I^Iexit 1$ ^I^I^Ielse$ ^I^I^I^Iexit 3$ ^I^I^Ifi$ ^I^Ifi$ ^I;;$ ^I*)$ ^I^Ilog_success_msg "Usage: /etc/init.d/apache2$DIR_SUFFIX {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}"$ ^I^Iexit 1$ ^I;;$ esac$
Ostatnio edytowany przez djjanek (2013-03-21 08:37:04)
Offline
zrobiłem teraz tak
root@fp:~# apt-get purge apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apache2* 0 upgraded, 0 newly installed, 1 to remove and 40 not upgraded. After this operation, 36.9 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 39630 files and directories currently installed.) Removing apache2 ... root@fp:~# apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apache2 0 upgraded, 1 newly installed, 0 to remove and 40 not upgraded. Need to get 0 B/1394 B of archives. After this operation, 36.9 kB of additional disk space will be used. Selecting previously deselected package apache2. (Reading database ... 39626 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.2.16-6+squeeze11_i386.deb) ... Setting up apache2 (2.2.16-6+squeeze11) ... root@fp:~# dos2unix /etc/init.d/apache2 dos2unix: converting file /etc/init.d/apache2 to UNIX format ... root@fp:~# /etc/init.d/apache2 restart /etc/init.d/apache2: 92: Syntax error: newline unexpected
ale nadal się nie resetuje
zrobiłem teraz tak
apt-get purge apache2 rm -rf /etc/apache2
i
root@fp:~# apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apache2 0 upgraded, 1 newly installed, 0 to remove and 40 not upgraded. Need to get 0 B/1394 B of archives. After this operation, 36.9 kB of additional disk space will be used. Selecting previously deselected package apache2. (Reading database ... 39626 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.2.16-6+squeeze11_i386.deb) ... Setting up apache2 (2.2.16-6+squeeze11) ... root@fp:~# cd /etc/init.d/apache2 -bash: cd: /etc/init.d/apache2: Not a directory root@fp:~# /etc/init.d/apache2 restart .: 51: Can't open /etc/apache2/envvars root@fp:~#
Ostatnio edytowany przez shizo (2013-03-21 14:38:23)
Offline
root@fp:~# /etc/init.d/apache2 restart /etc/init.d/apache2: 92: Syntax error: newline unexpected
Co masz w 92 linijce tego "/etc/init.d/apache2" pliku?
pokaż kilka linijek przed i po.
Offline
u góry zaktualizowałem post z nowym błędem
root@fp:~# /etc/init.d/apache2 restart .: 51: Can't open /etc/apache2/envvars
a z tamtej 92 linijki to jest tu
http://pastebin.com/4MufUyid
Ostatnio edytowany przez shizo (2013-03-21 14:51:55)
Offline
W Squeeze ten skrypt siedzi w pakiecie apache2.2-common, a nie apache2.
Offline
Próbujesz pozbyć się uwalonego pliku usuwając/reinstalując pakiet apache2, który nie zawiera tego pliku. Zrób to z pakietem który go zawiera – apache2.2-common.
Offline
To będzie to http://packages.debian.org/squeeze/i386/apache2.2-common/download ? (mam ostemplate debian-6.0-i386-minimal )
i potem wget security.debian.org/debian-security/pool/updates/main/a/apache2/apache2.2-common_2.2.16-6+squeeze11_i386.deb ?
Ostatnio edytowany przez shizo (2013-03-21 15:09:15)
Offline
apt-get purge apache2.2-common apt-get install apache2.2-common
(jeśli apache2 przy tym poleci, to też zainstaluj potem)
Ewentualnie coś w tym stylu:
aptitude -o DPkg::Options::=--force-confmiss -o DPkg::Options::=--force-confask -o DPkg::Options::=--force-confnew reinstall apache~i
Offline
root@fp:~# aptitude -o DPkg::Options::=--force-confmiss -o DPkg::Options::=--force-confask -o DPkg::Options::=--force-confnew reinstall apache~i The following packages will be REINSTALLED: apache2 apache2-mpm-itk apache2-utils apache2.2-bin apache2.2-common libapache2-mod-auth-mysql libapache2-mod-php5 libapache2-svn 0 packages upgraded, 0 newly installed, 8 reinstalled, 0 to remove and 40 not upgraded. Need to get 0 B/4912 kB of archives. After unpacking 0 B will be used. (Reading database ... 39630 files and directories currently installed.) Preparing to replace apache2 2.2.16-6+squeeze11 (using .../apache2_2.2.16-6+squeeze11_i386.deb) ... Unpacking replacement apache2 ... Preparing to replace apache2-utils 2.2.16-6+squeeze11 (using .../apache2-utils_2.2.16-6+squeeze11_i386.deb) ... Unpacking replacement apache2-utils ... Preparing to replace apache2.2-bin 2.2.16-6+squeeze11 (using .../apache2.2-bin_2.2.16-6+squeeze11_i386.deb) ... Unpacking replacement apache2.2-bin ... Preparing to replace apache2.2-common 2.2.16-6+squeeze11 (using .../apache2.2-common_2.2.16-6+squeeze11_i386.deb) ... Unpacking replacement apache2.2-common ... Preparing to replace libapache2-mod-auth-mysql 4.3.9-13+b1 (using .../libapache2-mod-auth-mysql_4.3.9-13+b1_i386.deb) ... Unpacking replacement libapache2-mod-auth-mysql ... Preparing to replace libapache2-mod-php5 5.3.3-7+squeeze15 (using .../libapache2-mod-php5_5.3.3-7+squeeze15_i386.deb) ... Unpacking replacement libapache2-mod-php5 ... Preparing to replace libapache2-svn 1.6.12dfsg-6 (using .../libapache2-svn_1.6.12dfsg-6_i386.deb) ... Unpacking replacement libapache2-svn ... Preparing to replace apache2-mpm-itk 2.2.16-6+squeeze11 (using .../apache2-mpm-itk_2.2.16-6+squeeze11_i386.deb) ... Stopping web server: apache2. Unpacking replacement apache2-mpm-itk ... Processing triggers for man-db ... Setting up apache2-utils (2.2.16-6+squeeze11) ... Setting up apache2.2-bin (2.2.16-6+squeeze11) ... Setting up apache2.2-common (2.2.16-6+squeeze11) ... Setting up libapache2-mod-auth-mysql (4.3.9-13+b1) ... Setting up libapache2-svn (1.6.12dfsg-6) ... Considering dependency dav for dav_svn: Module dav already enabled Module dav_svn already enabled Setting up apache2-mpm-itk (2.2.16-6+squeeze11) ... Starting web server: apache2Syntax error on line 160 of /etc/apache2/apache2.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Action 'start' failed. The Apache error log may have more information. failed! invoke-rc.d: initscript apache2, action "start" failed. Setting up apache2 (2.2.16-6+squeeze11) ... Setting up libapache2-mod-php5 (5.3.3-7+squeeze15) ... Action 'configtest' failed. The Apache error log may have more information. Your apache2 configuration is broken, so we're not restarting it for you.
root@fp:~# /etc/init.d/apache2 restart Syntax error on line 160 of /etc/apache2/apache2.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. failed!
tutaj kawalek z apache2.conf
</IfModule> # These need to be set in /etc/apache2/envvars User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files> # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is
Ostatnio edytowany przez shizo (2013-03-21 15:15:59)
Offline
mv /etc/apache2/apache2.conf /root
Potem jeszcze raz to samo. Jeśli też nie złapie, to można spróbować usunąć to wszystko:
aptitude purge apache~i
Offline
Przy tym
aptitude purge apache~i
jest informacja
──────────────────────────────────┤ Configuring phpmyadmin ├──────────────────────────────────────────────────────────────┐ │ │ │ Since you are removing phpmyadmin, it's possible that you no longer want the underlying database. │ │ │ │ If you like, database removal can be handled with dbconfig-common. │ │ │ │ If you know that you do want to keep this database, or if you want to handle the removal of this database manually, you should refuse this option. │ │ │ │ Deconfigure database for phpmyadmin with dbconfig-common? │ │ │ │ <Yes> <No> │ │
Czy jest możliwość abym tej bazy danych nie stracił? Mam już tam trochę rzeczy i nie chciałbym ich stracić
Offline
Zatem wybierz „No”. Pierwsze nie pomogło czy nie próbowałeś i od razu do drugiego przeszedłeś?
Offline
Nie pomogło. Teraz zrobiłem tak;
root@fp:~# aptitude -o DPkg::Options::=--force-confmiss -o DPkg::Options::=--force-confask -o DPkg::Options::=--force-confnew reinstall apache~i No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 40 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. root@fp:~# /etc/init.d/apache2 restart -bash: /etc/init.d/apache2: No such file or directory root@fp:~# apt-get install apache2.2-common Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-utils apache2.2-bin libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libpcre3 ssl-cert Suggested packages: www-browser apache2-doc apache2-suexec apache2-suexec-custom openssl-blacklist The following NEW packages will be installed: apache2-utils apache2.2-bin apache2.2-common libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libpcre3 ssl-cert 0 upgraded, 8 newly installed, 0 to remove and 40 not upgraded. Need to get 0 B/2140 kB of archives. After this operation, 6894 kB of additional disk space will be used. Do you want to continue [Y/n]? y Preconfiguring packages ... Selecting previously deselected package libcap2. (Reading database ... 37576 files and directories currently installed.) Unpacking libcap2 (from .../libcap2_1%3a2.19-3_i386.deb) ... Selecting previously deselected package libpcre3. Unpacking libpcre3 (from .../libpcre3_8.02-1.1_i386.deb) ... Selecting previously deselected package apache2-utils. Unpacking apache2-utils (from .../apache2-utils_2.2.16-6+squeeze11_i386.deb) ... Selecting previously deselected package libaprutil1-dbd-sqlite3. Unpacking libaprutil1-dbd-sqlite3 (from .../libaprutil1-dbd-sqlite3_1.3.9+dfsg-5_i386.deb) ... Selecting previously deselected package libaprutil1-ldap. Unpacking libaprutil1-ldap (from .../libaprutil1-ldap_1.3.9+dfsg-5_i386.deb) ... Selecting previously deselected package apache2.2-bin. Unpacking apache2.2-bin (from .../apache2.2-bin_2.2.16-6+squeeze11_i386.deb) ... Selecting previously deselected package apache2.2-common. Unpacking apache2.2-common (from .../apache2.2-common_2.2.16-6+squeeze11_i386.deb) ... Selecting previously deselected package ssl-cert. Unpacking ssl-cert (from .../ssl-cert_1.0.28_all.deb) ... Processing triggers for man-db ... Setting up libcap2 (1:2.19-3) ... Setting up libpcre3 (8.02-1.1) ... Setting up apache2-utils (2.2.16-6+squeeze11) ... Setting up libaprutil1-dbd-sqlite3 (1.3.9+dfsg-5) ... Setting up libaprutil1-ldap (1.3.9+dfsg-5) ... Setting up apache2.2-bin (2.2.16-6+squeeze11) ... Setting up apache2.2-common (2.2.16-6+squeeze11) ... Enabling site default. Enabling module alias. Enabling module autoindex. Enabling module dir. Enabling module env. Enabling module mime. Enabling module negotiation. Enabling module setenvif. Enabling module status. Enabling module auth_basic. Enabling module deflate. Enabling module authz_default. Enabling module authz_user. Enabling module authz_groupfile. Enabling module authn_file. Enabling module authz_host. Enabling module reqtimeout. Setting up ssl-cert (1.0.28) ... root@fp:~# /etc/init.d/apache2 restart No apache MPM package installed root@fp:~#
Offline
apt-get install apache2
Offline
root@fp:~# /etc/init.d/apache2 restart Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 80.72.43.201 for ServerName ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 80.72.43.201 for ServerName .
Tylko teraz mam problem bo phpmyadmin coś nie działa, tzn jest
Not Found
The requested URL /pma/ was not found on this server.
Apache/2.2.16 (Debian)
Offline
W tym to już Ci nie pomogę, nic nie wiem na jego temat. Musisz tak zrobić jak wcześniej robiłeś pewnie. :)
Offline
A czy jeśli nie zrobiłem najświeższej kopi z phpmyadmin i jeśli go zreinstaluje to strace wszystkie dane?
Edit:
Tam przy wcześniejszej opercji co robiłem zgodnie z instrukcją pisało
(Reading database ... 39630 files and directories currently installed.) Removing apache2 ... (Reading database ... 39626 files and directories currently installed.) Removing phpmyadmin ... Removing php5 ...
A więc jeśli ponownie zainstaluje to będę musiał wszystko od nowa?
Ostatnio edytowany przez shizo (2013-03-21 15:44:13)
Offline
A bo Ty go nie masz zainstalowanego w ogóle? To zainstaluj. Jeśli coś tam jeszcze przy okazji zostało usunięte, to zainstaluj te pakiety z powrotem via:
apt-get install nazwa_pakietu
Usuwanie z konfigami było tylko na pakiety z „apache” w nazwie, reszta konfigów powinna zostać.
Offline
No właśnie miałem zainstalowanego, ale czy jeśli ponownie go zainstaluje to baza sama się pojawi w phpmyadminie?
folder dalej istnieje w /etc/phpmyadmin i pliki są
Ostatnio edytowany przez shizo (2013-03-21 15:57:29)
Offline