Revision [3651]
Last edited on 2010-02-24 06:45:23 by WikiAdminAdditions:
# heartbeat is still under development, perhaps I should skip them during compilation
Revision [3650]
Edited on 2010-02-24 06:42:55 by WikiAdminAdditions:
# --enable-privileges Per-virtualhost Unix UserIDs and enhanced security for Solaris
Deletions:
Revision [3649]
Edited on 2010-02-24 06:35:34 by WikiAdminAdditions:
Here's what I have
# httpd -V
Server version: Apache/2.3.5 (Unix)
Server built: Feb 24 2010 21:27:04
Server's Module Magic Number: 20091230:2
Server loaded: APR 1.4.3-dev, APR-UTIL 1.4.0-dev
Compiled using: APR 1.4.3-dev, APR-UTIL 1.4.0-dev
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
# httpd -V
Server version: Apache/2.3.5 (Unix)
Server built: Feb 24 2010 21:27:04
Server's Module Magic Number: 20091230:2
Server loaded: APR 1.4.3-dev, APR-UTIL 1.4.0-dev
Compiled using: APR 1.4.3-dev, APR-UTIL 1.4.0-dev
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Revision [3648]
Edited on 2010-02-24 06:33:38 by WikiAdminAdditions:
I built apr, apu, and openssl from source. The first two are needed because apache-2.3 requires apr-1.4 and it's only available from snapshots. Without these three, mod_ssl, mod_rewrite, and mod_auth_digest won't work. Openssl is built with the following options:
Deletions:
Revision [3647]
Edited on 2010-02-24 06:15:40 by WikiAdminAdditions:
Something funky with my ubuntu libraries so I decided to build apr, apu, and openssl from source. The first two is pretty straight forward, for openssl, fPIC compile is needed:
sh config no-threads -fPIC --prefix=/opt/ssl
Then compile apache
--enable-mods-shared=most --prefix=/usr/local/apache \
--with-apr=/opt/apr --with-apr-util=/opt/apu --with-ssl=/opt/ssl \
--enable-mpms-shared=event,prefork,worker
sh config no-threads -fPIC --prefix=/opt/ssl
Then compile apache
--enable-mods-shared=most --prefix=/usr/local/apache \
--with-apr=/opt/apr --with-apr-util=/opt/apu --with-ssl=/opt/ssl \
--enable-mpms-shared=event,prefork,worker
Deletions:
Revision [3646]
Edited on 2010-02-23 09:05:51 by WikiAdminAdditions:
--enable-mods-shared=most --prefix=/usr/local/apache --enable-mpms-shared=all
Deletions:
Revision [3645]
Edited on 2010-02-23 08:42:08 by WikiAdminAdditions:
===Apache2.3.5-alpha from source===
./configure --with-ssl=/usr --enable-rewrite --disable-userdir \
--disable-negotiation --enable-vhost-alias --enable-info \
--enable-heartbeat --enable-heartmonitor --enable-lbmethod-heartbeat \
--enable-lbmethod-bybusyness --enable-lbmethod-bytraffic \
--enable-lbmethod-byrequests --enable-static-ab --enable-ssl \
--enable-proxy-ajp --enable-proxy-balancer --enable-proxy-http \
--enable-proxy-connect --enable-proxy --enable-deflate \
--enable-so --enable-cache --enable-disk-cache --enable-file-cache \
--enable-mods-shared=most --prefix=/usr/local
# --enable-privileges
./configure --with-ssl=/usr --enable-rewrite --disable-userdir \
--disable-negotiation --enable-vhost-alias --enable-info \
--enable-heartbeat --enable-heartmonitor --enable-lbmethod-heartbeat \
--enable-lbmethod-bybusyness --enable-lbmethod-bytraffic \
--enable-lbmethod-byrequests --enable-static-ab --enable-ssl \
--enable-proxy-ajp --enable-proxy-balancer --enable-proxy-http \
--enable-proxy-connect --enable-proxy --enable-deflate \
--enable-so --enable-cache --enable-disk-cache --enable-file-cache \
--enable-mods-shared=most --prefix=/usr/local
# --enable-privileges
Revision [3517]
Edited on 2009-09-14 00:04:19 by WikiAdminAdditions:
==What about stupid solaris?==
What does this tell you? Everything that comes with solaris by default don't fking work.
env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \
CC=cc CFLAGS=-fast CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
--enable-cache --enable-disk-cache --enable-mem-cache \
--with-mpm=worker
What does this tell you? Everything that comes with solaris by default don't fking work.
env PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin \
CC=cc CFLAGS=-fast CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
--enable-cache --enable-disk-cache --enable-mem-cache \
--with-mpm=worker
Revision [2239]
Edited on 2009-03-03 00:25:45 by WikiAdminAdditions:
===Apache2.2.11 build rpm===
Download the apache tar bz2 file
Edit httpd.spec and remove a tag that is not supported
Create a tgz archive
....
rpmbuild -tb httpd-2.2.11.tar.gz
Download the apache tar bz2 file
Edit httpd.spec and remove a tag that is not supported
Create a tgz archive
....
rpmbuild -tb httpd-2.2.11.tar.gz
Revision [2163]
Edited on 2009-01-20 01:50:47 by WikiAdminAdditions:
and you'll need a proper init script
#!/bin/bash
#
# httpd Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/httpd ]; then
. /etc/sysconfig/httpd
fi
# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}
# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/apache2/bin/apachectl
httpd=${HTTPD-/usr/local/apache2/bin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0
# check for 1.3 configuration
check13 () {
CONFFILE=/usr/local/apache2/conf/httpd.conf
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
GONE="${GONE}AccessConfig|ResourceConfig)"
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
echo
echo 1>&2 " Apache 1.3 configuration directives found"
echo 1>&2 " please read /usr/share/doc/httpd-2.2.3/migration.html"
failure "Apache 1.3 config directives test"
echo
exit 1
fi
}
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure. So we just do it the way init scripts
# are expected to behave here.
start() {
echo -n $"Starting $prog: "
check13 || exit 1
LANG=$HTTPD_LANG daemon $httpd $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
echo -n $"Stopping $prog: "
killproc -d 10 $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
reload() {
echo -n $"Reloading $prog: "
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
RETVAL=$?
echo $"not reloading due to configuration syntax error"
failure $"not reloading $httpd due to configuration syntax error"
else
killproc $httpd -HUP
RETVAL=$?
fi
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f ${pidfile} ] ; then
stop
start
fi
;;
reload)
reload
;;
graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
exit 1
esac
exit $RETVAL
#!/bin/bash
#
# httpd Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/httpd ]; then
. /etc/sysconfig/httpd
fi
# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}
# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/apache2/bin/apachectl
httpd=${HTTPD-/usr/local/apache2/bin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0
# check for 1.3 configuration
check13 () {
CONFFILE=/usr/local/apache2/conf/httpd.conf
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
GONE="${GONE}AccessConfig|ResourceConfig)"
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
echo
echo 1>&2 " Apache 1.3 configuration directives found"
echo 1>&2 " please read /usr/share/doc/httpd-2.2.3/migration.html"
failure "Apache 1.3 config directives test"
echo
exit 1
fi
}
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure. So we just do it the way init scripts
# are expected to behave here.
start() {
echo -n $"Starting $prog: "
check13 || exit 1
LANG=$HTTPD_LANG daemon $httpd $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
echo -n $"Stopping $prog: "
killproc -d 10 $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
reload() {
echo -n $"Reloading $prog: "
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
RETVAL=$?
echo $"not reloading due to configuration syntax error"
failure $"not reloading $httpd due to configuration syntax error"
else
killproc $httpd -HUP
RETVAL=$?
fi
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f ${pidfile} ] ; then
stop
start
fi
;;
reload)
reload
;;
graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
exit 1
esac
exit $RETVAL
Revision [1963]
Edited on 2008-09-22 09:13:52 by WikiAdminAdditions:
--with-mpm=worker : you need php compiled with thread safety (--enable-experimental-zts)
Deletions:
Revision [1962]
Edited on 2008-09-22 08:44:06 by WikiAdminAdditions:
# Optional
-with-mpm=worker
-with-mpm=worker
Revision [1949]
Edited on 2008-09-16 20:42:06 by WikiAdminAdditions:
--enable-cache --enable-disk-cache --enable-mem-cache
===Apache 2.0 compile===
./configure --prefix=/opt/apache2 --enable-mods-shared=all \
--enable-ssl --enable-rewrite --enable-proxy --enable-deflate \
--enable-cache --enable-disk-cache --enable-file-cache --enable-mem-cache \
--enable-suexec
===Apache 2.0 compile===
./configure --prefix=/opt/apache2 --enable-mods-shared=all \
--enable-ssl --enable-rewrite --enable-proxy --enable-deflate \
--enable-cache --enable-disk-cache --enable-file-cache --enable-mem-cache \
--enable-suexec
Deletions:
--enable-layout=RedHat
Revision [1872]
Edited on 2008-08-05 07:35:15 by WikiAdminAdditions:
==Install from FreeBSD ports==
cd /usr/ports/www/apache22/
make config install distclean
echo 'apache2_enable="YES"' >> /etc/rc.conf
echo 'apache2ssl_enable="YES"' >> /etc/rc.conf
echo 'accf_http_ready="YES"' >> /etc/rc.conf && kldload accf_http
cd /usr/ports/www/apache22/
make config install distclean
echo 'apache2_enable="YES"' >> /etc/rc.conf
echo 'apache2ssl_enable="YES"' >> /etc/rc.conf
echo 'accf_http_ready="YES"' >> /etc/rc.conf && kldload accf_http
Revision [1762]
Edited on 2008-06-12 00:53:36 by WikiAdminAdditions:
--enable-module=so \
--enable-shared=max \
--enable-module=ssl
--enable-shared=max \
--enable-module=ssl
Deletions:
--enable-shared=proxy \
--enable-shared=ssl
Revision [1761]
Edited on 2008-06-10 01:23:52 by WikiAdminAdditions:
--enable-module=proxy
or
--with-apache=../apache_1.3.x \
--expert --with-ssl=/usr
or
env CFLAGS="-Wall -DHARD_SERVER_LIMIT=1024" ./configure \
--enable-module=so \
--enable-shared=proxy \
--enable-shared=ssl
or
--with-apache=../apache_1.3.x \
--expert --with-ssl=/usr
or
env CFLAGS="-Wall -DHARD_SERVER_LIMIT=1024" ./configure \
--enable-module=so \
--enable-shared=proxy \
--enable-shared=ssl
Deletions:
Revision [1675]
Edited on 2008-04-17 20:09:01 by WikiAdminAdditions:
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all \
--enable-ssl --enable-rewrite --enable-proxy --enable-proxy-ajp \
--enable-cache --enable-disk-cache --enable-mem-cache \
--enable-layout=RedHat
--enable-ssl --enable-rewrite --enable-proxy --enable-proxy-ajp \
--enable-cache --enable-disk-cache --enable-mem-cache \
--enable-layout=RedHat
Deletions:
Revision [1571]
Edited on 2008-03-27 07:35:14 by WikiAdminAdditions:
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-ssl --enable-rewrite --enable-proxy --enable-proxy-ajp --enable-layout=RedHat
Deletions:
Revision [1518]
Edited on 2008-03-19 07:56:13 by WikiAdminAdditions:
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-ssl --enable-rewrite --enable-proxy --enable-layout=RedHat