Created
July 23, 2013 00:56
-
-
Save anonymous/6059035 to your computer and use it in GitHub Desktop.
Simple CURLOPT_READFUNCTION setup script
This file contains 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
#!/bin/bash | |
# Launch a default Amazon EC2 instance | |
# Configuration variables | |
nodeversion="v0.10.13" | |
basedir=/var/www | |
# Install PHP | |
yum install php -y | |
# Install Node.js | |
mkdir -p $basedir && cd $basedir | |
wget http://nodejs.org/dist/$nodeversion/node-$nodeversion-linux-x64.tar.gz | |
tar xvf node-$nodeversion-linux-x64.tar.gz | |
ln -s $basedir/node-$nodeversion-linux-x64/bin/node /usr/bin/node | |
# Download and start test server | |
wget https://raw.github.com/guzzle/guzzle/master/tests/Guzzle/Tests/Http/server.js | |
node server.js & | |
# Output version information | |
php -v | |
curl --version | |
# Install and run test script | |
wget 'https://gist.github.com/mtdowling/6059009/raw/5cc013a74c157d0b2cad0cab2db434c030d2466e/readfuction_perf.php' | |
php readfuction_perf.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment