Skip to content

Instantly share code, notes, and snippets.

@vadim-v
Forked from akitaonrails/gist:1724673
Created February 14, 2013 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vadim-v/4957356 to your computer and use it in GitHub Desktop.
Save vadim-v/4957356 to your computer and use it in GitHub Desktop.
Install fixed apache bench on OSX Lion
# If you're getting this error trying to use ApacheBench on OS X Lion:
# Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54)
#
# You need to download the latest beta version of Apache and rebuild ab.
# Here's how (assuming you have homebrew installed).
# Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support
brew install pcre
# Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it
curl -O http://ftp.unicamp.br/pub/apache//httpd/httpd-2.3.16-beta.tar.bz2
tar xvfj httpd-2.3.16-beta.tar.bz2
cd httpd-2.3.16-beta
./configure
make
# backup the original 'ab' command and replace it for the new one
sudo mv /usr/sbin/ab /usr/sbin/ab.old
sudo cp support/ab /usr/sbin/ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment