-
Notifications
You must be signed in to change notification settings - Fork 5
Home
seshness edited this page Nov 6, 2012
·
19 revisions
$ sudo yum install emacs git
After following http://tumblr.kurttheviking.com/post/30920138314/painless-python-2-7-on-aws-ec2, run
$ sudo easy_install tweepy unicodecsv argparse boto
We want Python 2.7.x as the default:
$ sudo yum install python27
$ sudo rm /usr/bin/python
$ sudo ln -s `which python27` /usr/bin/python
$ sudo mkdir /var/log/twitter
$ sudo chown $USER: /var/log/twitter
$ mkdir /var/log/twitter/old
$ touch /var/log/twitter/tweets.csv
$ sudo touch /var/lib/logrotate.status
$ sudo chown $USER: /var/lib/logrotate.status
Examine twitter_keys.py
and .boto.sample
.
$ crontab -e
Add the following to the crontab file:
*/5 * * * * logrotate /home/ec2-user/data-gathering/logrotate.conf
*/10 * * * * python /home/ec2-user/data-gathering/s3/upload_to_s3.py -D -b [bucket] /var/log/twitter/old
I ran run_twitter_streaming_forever.sh
inside a screen session, then power-detached.