Advertisement
IchHabRecht

[BASH] Update Apache from source

Jan 12th, 2015
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.97 KB | None | 0 0
  1. # Update Apache
  2. service httpd stop
  3. yum erase httpd
  4. rm -f /etc/httpd/conf/httpd.conf.rpmsave
  5. yum install pcre-devel
  6. wget http://mirror.netcologne.de/apache.org//httpd/httpd-2.2.29.tar.gz
  7. tar -xzvf httpd-2.2.29.tar.gz
  8. cd httpd-2.2.29
  9. ./configure \
  10.         "--prefix=/etc/httpd" \
  11.         "--exec-prefix=/etc/httpd" \
  12.         "--bindir=/usr/bin" \
  13.         "--sbindir=/usr/sbin" \
  14.         "--sysconfdir=/etc/httpd/conf" \
  15.         "--enable-so" \
  16.         "--enable-dav" \
  17.         "--enable-dav-fs" \
  18.         "--enable-dav-lock" \
  19.         "--enable-suexec" \
  20.         "--enable-deflate" \
  21.         "--enable-unique-id" \
  22.         "--enable-mods-static=most" \
  23.         "--enable-reqtimeout" \
  24.         "--with-mpm=prefork" \
  25.         "--with-suexec-caller=apache" \
  26.         "--with-suexec-docroot=/" \
  27.         "--with-suexec-gidmin=100" \
  28.         "--with-suexec-logfile=/var/log/httpd/suexec_log" \
  29.         "--with-suexec-uidmin=100" \
  30.         "--with-suexec-userdir=public_html" \
  31.         "--with-suexec-bin=/usr/sbin/suexec" \
  32.         "--with-included-apr" \
  33.         "--with-pcre=/usr" \
  34.         "--includedir=/usr/include/apache" \
  35.         "--libexecdir=/usr/lib/apache" \
  36.         "--datadir=/var/www" \
  37.         "--localstatedir=/var" \
  38.         "--enable-logio" \
  39.         "--enable-ssl" \
  40.         "--enable-rewrite" \
  41.         "--enable-proxy" \
  42.         "--enable-expires" \
  43.         "--with-ssl=/usr" \
  44.         "--enable-headers"
  45. make && make install
  46. cd /etc/httpd/
  47. find . -type f -exec sed -i 's:/var/logs/:/var/log/httpd/:' {} +
  48. nano conf/httpd.conf
  49. >>PidFile /var/log/httpd/httpd.pid
  50. >>Include conf/extra/httpd-vhosts.conf
  51. nano conf/extra/httpd-vhosts.conf
  52. >><VirtualHost *:80>
  53.         ServerName localhost
  54.         DocumentRoot "/var/www/htdocs/"
  55.  
  56.         LogLevel warn
  57.         ErrorLog "/var/logs/httpd/localhost-error_log"
  58.         CustomLog "/var/logs/httpd/localhost-access_log" common
  59. </VirtualHost>
  60. >>Include sites-enabled/*
  61. rm -Rf /var/logs
  62. apachectl start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement