Last active
December 18, 2015 03:29
-
-
Save g-alonso/5718544 to your computer and use it in GitHub Desktop.
Compile Apache 2.4.4, Debian 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Compile Apache 2.4.4 | |
Dependences: APR, APR-Util, PCR | |
# Build and install apr | |
./configure --prefix=/usr/local/apr-httpd/ | |
make | |
make install | |
# Build and install apr-util | |
cd apr-util | |
./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/ | |
make | |
make install | |
# Build and install PCR | |
cd pcre-8.32 | |
./configure | |
make | |
sudo make install | |
# Configure httpd | |
cd ../../ | |
./configure --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/ | |
#make init.d script | |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: apache2 webserver | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start apache2 | |
# Description: Start apache2 | |
### END INIT INFO | |
case "$1" in | |
start) | |
echo "Starting Apache ..." | |
/usr/local/apache2/bin/apachectl start | |
;; | |
stop) | |
echo "Stopping Apache ..." | |
/usr/local/apache2/bin/apachectl stop | |
;; | |
graceful) | |
echo "Restarting Apache gracefully..." | |
/usr/local/apache2/bin/apachectl graceful | |
;; | |
restart) | |
echo "Restarting Apache ..." | |
/usr/local/apache2/bin/apachectl restart | |
;; | |
*) | |
echo "Usage: '$0' {start|stop|restart|graceful}" | |
exit 64 | |
;; | |
esac | |
exit 0 | |
#add script to the default runlevel | |
Debian: update–rc.d apache2 defaults |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment