Advertisement
ehime

FuckYouOSX

May 27th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.03 KB | None | 0 0
  1. Steps
  2.  
  3. ##Purge old apache
  4.  
  5. for pid in $(ps aux |grep httpd |awk '{print$2}');do sudo kill -9 $pid; done
  6. sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
  7.  
  8. ##Build new apache
  9. brew tap djl/homebrew-apache2
  10. brew install djl/apache2/apache24
  11. echo 'httpd="/usr/local/Cellar/apache24/2.4.9/bin/httpd/httpd"' >> ~/.bash_profile && exec bash
  12.  
  13.   ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pcre-8.35.mavericks.b
  14.   ######################################################################## 100.0%
  15.   ==> Pouring pcre-8.35.mavericks.bottle.tar.gz
  16.   ?  /usr/local/Cellar/pcre/8.35: 146 files, 5.8M
  17.   ==> Installing apache24
  18.   ==> Downloading http://mirror.cc.columbia.edu/pub/software/apache/httpd/httpd-2.4.9.tar.gz
  19.   ######################################################################## 100.0%
  20.   ==> tar -xzf httpd-2.4.9-deps.tar.gz
  21.   ==> ./configure --prefix=/usr/local/Cellar/apache24/2.4.9 --mandir=/usr/local/Cellar/apach
  22.   ==> make
  23.   ==> make install
  24.   ?  /usr/local/Cellar/apache24/2.4.9: 1379 files, 27M, built in 95 seconds
  25.   bash-3.2$
  26.  
  27.  
  28. ## run my glob patcher
  29.  
  30.  sudo atom /System/Library/LaunchDaemons/org.apache.httpd.plist
  31.  
  32.   <?xml version="1.0" encoding="UTF-8"?>
  33.   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  34.   <plist version="1.0">
  35.   <dict>
  36.     <key>Disabled</key>
  37.     <true/>
  38.     <key>Label</key>
  39.     <string>org.apache.httpd</string>
  40.     <key>EnvironmentVariables</key>
  41.     <dict>
  42.         <key>XPC_SERVICES_UNAVAILABLE</key>
  43.         <string>1</string>
  44.     </dict>
  45.     <key>ProgramArguments</key>
  46.     <array>
  47. -->   <string>/usr/local/Cellar/apache24/2.4.9/bin/httpd</string>
  48.         <string>-D</string>
  49.         <string>FOREGROUND</string>
  50.     </array>
  51.     <key>OnDemand</key>
  52.     <false/>
  53.   </dict>
  54.   </plist>
  55.  
  56. terminal exit/restart (exec bash does NOT work here)
  57.  
  58. sudo mkdir /usr/local/etc/apache2/available &&\
  59. sudo echo -e "\nInclude /usr/local/etc/apache2/*.conf" >> /usr/local/etc/apache2/httpd.conf
  60.  
  61. sudo apachectl restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement