Created
January 22, 2013 01:35
-
-
Save troyk/4591288 to your computer and use it in GitHub Desktop.
Fix apache bench for mt lion
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
| # download and install pcre | |
| # download and unpack (mine was 2.4.3) latest stable apache | |
| cd httpd-2.4.3 | |
| export LTFLAGS='--tag CC' | |
| # might have to symlink this file if you get a toolchain error | |
| # sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain | |
| ./configure --silent --prefix=/usr/local/ --disable-debug --disable-dependency-tracking | |
| cd support | |
| make -s ab | |
| # can run which ab to verify location, mine was /usr/sbin | |
| sudo cp ./ab /usr/sbin | |
| # that fixes ab for erro, but OS X needs to have ports extended | |
| # http://stackoverflow.com/questions/1216267/ab-program-freezes-after-lots-of-requests-why | |
| sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last | |
| # net.inet.ip.portrange.first: 49152 <-- too high, not enpugh ports | |
| # net.inet.ip.portrange.last: 65535 | |
| # TODO: see if this makes lives through a reboot! | |
| sudo sysctl -w net.inet.ip.portrange.first=32768 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment