@jobrieniii

RSS
Jan 3

How to install yourTwapperKeeper on a Rackspace Cloud Server

Here is a quick step-by-step on how to install yourTwapperKeeper (https://github.com/540co/yourTwapperKeeper) on Rackspace Cloud servers.

——-

Create your server

1. Go ahead and setup a Rackspace Cloud account.  It does require a call back from them to validate you exist, so it may take 30 or so minutes to complete this step.

2. Login to your Rackspace account.  Goto Hosting | Cloud Server and click Add Server.  

3. Pick Centos 6.0 and name the server (i.e. yourtwapperkeeperserver), pick 256MB / 10GB option (this is usually enough for most people) and click Create Server.

4. Write down your password and IP address.

——-

Login to your new server and change password

5. Secure shell to your server (using Terminal, Putty, etc).

ssh root@xxx.xxx.xxx.xxx 

where xxx.xxx.xxx.xxx is your IP address.  Type in your password when prompted.

6.  Change your password

passwd

and follow the prompts and write down your password

——-

Install Pre-requisites

7.  First lets update your new Centos 6.0 server.

  yum update

  when prompted select [y] to install

8.  Next, lets install MySQL.

  yum install mysql-server mysql

when prompted select [y] to install

9. Lets install php and some other stuff.

  yum install php php-gd php-imap php-mysql php-pear php-xml phpxmlrps curl libxml2php-mbstring php-mcrypt

when prompted select [y] to install

——-

Lets do a few misc things like setup DB password, etc.

10. Lets start MySQL, set password, and create database.

  service mysqld start

  ensure it shows “Starting mysqld: [ OK ]”

  mysql

  mysql> USE mysql;

  mysql> UPDATE user SET Password=PASSWORD(’your_db_password’) WHERE user=’root’;

  mysql> flush privileges;

  mysql> create database yourtwapperkeeper;

  mysql> exit;

write down your_db_password

11. Lets start apache and turn off ip tables (yes, I know this isn’t the smartest thing, but trying to make this install as simple as possible).

  service httpd start

  service iptables stop

12. Install git to help download

  yum install git

  when prompted select [y] to install

——- 

Install yourTwapperKeeper

13. Download yourTwapperKeeper

  cd /var/www/html

git clone git://github.com/jobrieniii/yourTwapperKeeper.git

  cd yourTwapperKeeper

14. Create necessary db tables

  mysql -u root -p -h localhost yourtwapperkeeper < SQL

  enter your_db_password when prompted

15. Make sure db and webserver auto start

chkconfig httpd on
chkconfig mysqld on
chkconfig iptables off
——- 

Configure yourTwapperKeeper Install

16. Login to Twitter with the account you want to use for archiving, and [Register a new application] - http://dev.twitter.com/apps/new

  - Application Name = Change to your liking

  - Description = Change to your liking

  - Application Website = Your URL where the site will be hosted (i.e. http://yourtwapperkeeperexample.com/)

- Organization = Change to your liking

- Application Type = Browser

- Callback URL = Your_URL/callback.php (i.e. http://yourtwapperkeeperexample.com/callback.php)

- Default Access Type = Read & Write

- Application Icon = Change or leave default

17. After application is successfully created, write down: Consumer Key, Consumer Secret

18. Select “My Access Token” on right hand side. Write down: Access Token (oauth_token), Access Token Secret (oauth_token_secret)

19. Edit the /var/www/html/yourTwapperKeeper/config.php file on your server. Make sure to change the following:

/* Host Information */

Change the host information based upon your host.

/* Administrators - Twitter screen name(s) who can administer / start / stop archiving */

Users in this list are allowed to start / stop the archiving processes on the server. Must be at least one. Recommend using the same twitter account used to create application.

/* Users - Twitter screen names that are allowed to use Your Twapper Keeper site - leaving commented means anyone can use site*/

Users in this list are allowed to create archives and edit / delete archives they own. Leaving blank means anyone can create archives and edit / delete ones they own.

/* Your Twapper Keeper Twitter Account Information used to query for tweets (this is common for the site) */ 

This should be the account information for the user who created the Twitter application. Also, use the oauth information captured in step 5.

/* Your Twapper Keeper Application Information - setup at http://dev.twitter.com/apps and copy in consumer key and secret */

Update with the information captured in step 4.

/* MySQL Database Connection Information */

Update with your DB information

You are now ready to archive.  You can access your installation at:

http://xxx.xxx.xxx.xxx/yourTwapperKeeper/

If you have any questions or issues when running thru the install, please leave a comment.  

Also, you will see throughout the documentation I have turned off iptables.  This will leave your web server somewhat exposed- but I did this to simplify the install.  

If you want to further protect your install, you will need to configure iptables to allow for port 80 traffic in / out and re-enable iptables to protect other ports.  Also, the use of root to install things / etc isn’t exactly best practice… but trying to keep it simple for folks.