Apache 2.2.6 auf MacOS installieren. Aber wie?

xantam

xantam

Aktives Mitglied
Thread Starter
Dabei seit
08.01.2006
Beiträge
179
Reaktionspunkte
4
Hi,

ich würde gern meinen 1.3 Apache (der der bei Mac OS dabei ist) durch den 2.2.6er Apache ersetzen.

Auf dem 1.3er läuft PHP 5.2.2 und MySQL 4.1.22-max.

Und jetzt möchte ich halt nen 2.2.6er mit PHP 5.2.4 und MySQL 4.1.22-max.
Ich hab auch schon etwas gefunden allerdings muß man dort den Sourcecode selbst kompilieren was ich noch nie gemacht habe.

Siehe hier: KLICK

PHP5 und MySQL habe ich schon als Binary aber halt kein Apache 2.2.6.
 
Am einfachsten wird es wohl sein XAMPP zu nutzen...

www.xampp.org

Gruß
 
XAMPP fand ich schon unter Win schrecklich.
Also scheidet das für mich aus.
 
das Einfachste wäre es doch den Apple-Apache anzuhalten und mit darwinport sich einen aktuellen Apache2 nebst PHP5 auf den Rechner zu holen und diesen zu starten!
 
da es nicht so viele leute gibt, die apache 2 pakete für den mac bereit stellen, musst du halt warten bis mamp/xamp pakete stellen oder halt selbst compilieren.
allerdings kannst du dann nicht mehr so bequem den apache starten über das sharing prefspane....
 
das Einfachste wäre es doch den Apple-Apache anzuhalten und mit darwinport sich einen aktuellen Apache2 nebst PHP5 auf den Rechner zu holen und diesen zu starten!

Könntest du das einwenig genauer erklären?
 
1. xcode installieren
2. macports installieren
3. portauthority installieren und darüber die pakete installieren
 
Also ich hab das mit dem Kompilieren und dem Installieren hinbekommen.

Aber wenn ich jetzt als "root" folgendes eingebe:

Code:
/usr/local/apache2/bin/apachectl -k start

startet mein 1.3er Apache und nicht mein frisch installierter 2.2.6.

Gebe ich das selbe als normaler User kommt das:

Code:
MacBook-Pro:/usr/local/apache2/bin xantam$ apachectl -k start

Processing config directory: /private/etc/httpd/users/*.conf
 Processing config file: /private/etc/httpd/users/+entropy-php.conf
 Processing config file: /private/etc/httpd/users/xantam.conf
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started

Ich habe mich strickt an diese Anleitung gehalten: http://blog.calganx.net/2007/05/20/apache-2-php-5-und-mysql-5-fr-macos-x/
Was hab ich da jetzt falsch gemacht?

PS: kann man das alte Entropy PHP5 Modul deinstallieren?
 
wenn du apachectl so eingibst, dann nimmt der das was zuerst im pfad ist...
entweder dann ./apachectl in dem verzeichnis oder du packst du /usr/local/apache2/bin vorher in den pfad...
 
wenn du apachectl so eingibst, dann nimmt der das was zuerst im pfad ist...
entweder dann ./apachectl in dem verzeichnis oder du packst du /usr/local/apache2/bin vorher in den pfad...

Wie meinst du das ich bin doch in:

Code:
/usr/local/apache2/bin/

und dort gebe ich das ein:

Code:
apachectl -k start

trotzdem startet (nur mithilfe von root rechten, als normaler Admin geht gar nichts) mein 1.3er Apache.

Ich bin doch im richtigem Ordner oder?

Hier das was mir das Terminal nach der Eingabe von "apachectl -k start" ausgibt:

Code:
MacBook-Pro:/usr/local/apache2/bin root# apachectl -k start
usage: /usr/sbin/apachectl (start|stop|restart|fullstatus|status|graceful|configtest|help)

start      - start httpd
stop       - stop httpd
restart    - restart httpd if running by sending a SIGHUP or start if 
             not running
fullstatus - dump a full status screen; requires lynx and mod_status enabled
status     - dump a short status screen; requires lynx and mod_status enabled
graceful   - do a graceful restart by sending a SIGUSR1 or start if not running
configtest - do a configuration syntax test
help       - this screen

Processing config directory: /private/etc/httpd/users/*.conf
 Processing config file: /private/etc/httpd/users/+entropy-php.conf
 Processing config file: /private/etc/httpd/users/xantam.conf
/usr/sbin/apachectl start: httpd started
 
Ich bin doch im richtigem Ordner oder?

ja, bist du du.
allerdings:

Hier das was mir das Terminal nach der Eingabe von "apachectl -k start" ausgibt:

Code:
MacBook-Pro:/usr/local/apache2/bin root# apachectl -k start
usage: /usr/sbin/apachectl

wie du siehst nimmt der den /usr/sbin/apachectl, wenn du nur apachectl eingibst.
du musst da ./apachectl eingeben, damit auch das apachectl aus dem ordner genommen wird.

wobei, heisst der nicht apache2ctl für den apache2?
 
wobei, heisst der nicht apache2ctl für den apache2?

bei mir gibts nur apachectl lein apache2ctl.

wenn ich aber jetzt das eingebe:

Code:
MacBook-Pro:/usr/local/apache2/bin root# ./apachectl -k start

Kommt diese Meldung:

Code:
./apachectl: line 102: 21175 Segmentation fault      $HTTPD $ARGV

Was hab ich jetzt falsch gemacht?
 
Nachdem Du, xantam, nun schon ordentlich rumgebastelt hast, willst Du ja evtl. nicht mehr auf eine andere Lösung umschwenken. Trotzdem sei mir der Hinweis gestattet, dass es auf serverlogistics.com eine komplette Apache 2 Installer Package für MacOS X gibt. Ausprobiert habe ich das allerdings noch nicht.



Nachtrag: Upps, ich sehe gerade, dass Du explizit den Apache 2.2.6 haben möchtest. Den gibt es bei serverlogistics leider nicht, die sind offensichtlich bei 2.0.52 stehengeblieben. :-(
 
Nachdem Du, xantam, nun schon ordentlich rumgebastelt hast, willst Du ja evtl. nicht mehr auf eine andere Lösung umschwenken. Trotzdem sei mir der Hinweis gestattet, dass es auf serverlogistics.com eine komplette Apache 2 Installer Package für MacOS X gibt. Ausprobiert habe ich das allerdings noch nicht.



Nachtrag: Upps, ich sehe gerade, dass Du explizit den Apache 2.2.6 haben möchtest. Den gibt es bei serverlogistics leider nicht, die sind offensichtlich bei 2.0.52 stehengeblieben. :-(

Wie geschrieben hänge ich jetzt an diesem komischen "Segmentation fault".

Hier mal der bash-code meiner apachectl (die vom 2.2.6er natürlich):

Code:
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache.  Written by Marc Slemko, 1997/08/23
# 
# The exit codes returned are:
#   XXX this doc is no longer correct now that the interesting
#   XXX functions are handled by httpd
#	0 - operation completed successfully
#	1 - 
#	2 - usage error
#	3 - httpd could not be started
#	4 - httpd could not be stopped
#	5 - httpd could not be started during a restart
#	6 - httpd could not be restarted during a restart
#	7 - httpd could not be restarted during a graceful restart
#	8 - configuration syntax error
#
# When multiple arguments are given, only the error from the _last_
# one is reported.  Run "apachectl help" for usage info
#
ARGV="$@"
#
# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
# --------------------                              --------------------
# 
# the path to your httpd binary, including options if necessary
HTTPD='/usr/local/apache2/bin/httpd'
#
# pick up any necessary environment variables
if test -f /usr/local/apache2/bin/envvars; then
  . /usr/local/apache2/bin/envvars
fi
#
# a command that outputs a formatted text version of the HTML at the
# url given on the command line.  Designed for lynx, however other
# programs may work.  
LYNX="lynx -dump"
#
# the URL to your server's mod_status status page.  If you do not
# have one, then status and fullstatus will not work.
STATUSURL="http://localhost:80/server-status"
#
# Set this variable to a command that increases the maximum
# number of file descriptors allowed per child process. This is
# critical for configurations that use many file descriptors,
# such as mass vhosting, or a multithreaded server.
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
# --------------------                              --------------------
# ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||

# Set the maximum number of file descriptors allowed per child process.
if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
    $ULIMIT_MAX_FILES
fi

ERROR=0
if [ "x$ARGV" = "x" ] ; then 
    ARGV="-h"
fi

case $ARGV in
start|stop|restart|graceful|graceful-stop)
    $HTTPD -k $ARGV
    ERROR=$?
    ;;
startssl|sslstart|start-SSL)
    echo The startssl option is no longer supported.
    echo Please edit httpd.conf to include the SSL configuration settings
    echo and then use "apachectl start".
    ERROR=2
    ;;
configtest)
    $HTTPD -t
    ERROR=$?
    ;;
status)
    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
    ;;
fullstatus)
    $LYNX $STATUSURL
    ;;
*)
    $HTTPD $ARGV
    ERROR=$?
esac

exit $ERROR
 
Wie geschrieben hänge ich jetzt an diesem komischen "Segmentation fault".

der steht mit Sicherheit im error_log vom Apache!
 
Also mein /usr/local/apache2/logs/ Ordner ist leider leer.
Oder kann die noch wo anders liegen?
 
Also mein /usr/local/apache2/logs/ Ordner ist leider leer.
Oder kann die noch wo anders liegen?

Das Standard-Logverzeichnis wird vor dem compilieren festgelegt und hängt also auch davon ab! Das kann aber auch schon die Erklärung sein! Kann es sein das die Rechte nicht ausreichen für Apache um am gewünschten Ort error.log und access.log zu erstellen und zu nutzen? Wäre nicht ungewöhnlich wenn sowas in einem SegFault endet!
 
Also ich hab mir nochmal die Source downgeloaded und kompiliert und installiert und schon gehts. :D
 
Zuletzt bearbeitet:
Also mitlerweile läuft mein 2.2.6er Apache.
Auch PHP5 und MySQL tuen ihren Dienst.

Allerdings erhalte ich immer noch wenn ich im Safari folgendes eingebe:
Code:
http://127.0.0.1/~xantam/

Eine "Forbidden" Meldung.

In meiner httpd.conf steht folgendes:

Code:
Include conf/extra/httpd-userdir.conf

Und in der "httpd-userdir.conf" ist folgendes:
Code:
# Settings for user home directories
#
# Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir public_html

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/Users/*/Sites/">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
Das Modul "mod_userdir.so" wird auch geladen.
 
Zuletzt bearbeitet:
So, hab mal die Fehlerbeschreibung im oberen Beitrag etwas geändert.

EDIT: Hab grad den Fehler gefunden

Das:

Code:
UserDir public_html

muß so lauten:

Code:
UserDir Sites
 
Zuletzt bearbeitet:
Zurück
Oben Unten