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
# First, install all of the things | |
sudo su | |
apt-get update | |
apt-get install nginx | |
/etc/init.d/nginx start | |
apt-get install python-dev | |
apt-get install python-pip | |
apt-get install libjpeg-dev libpng-dev libtiff-dev libjasper-dev libgtk2.0-dev python-numpy python-pycurl libwebp-dev python-opencv libjpeg-progs | |
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib |
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
#!/usr/bin/env bash | |
cat /var/log/apache2/access_log | awk '{print $1}' > ips.txt | |
uniq ips.txt > uniqips.txt | |
IPS=`cat uniqips.txt` | |
for i in $IPS | |
do | |
echo "$i,`geoiplookup $i | cut -d "," -f2 | sed -e 's/^[\t]//'`" >> ipinfo.csv | |
done |