Skip to content

Installation: Windows

thegeekiestmark edited this page Sep 13, 2010 · 23 revisions

NOTE: We’re making certain assumptions about what your environment looks like and your mileage may vary. If you want to access ThinkTank at a URL other than yourdomain.com/thinktank, or on a subdomain, you’ll have to adjust accordingly.

I’m sure there are errors to be found and clarifications to be made—please help clean this page up!

Contents

  1. General Assumptions
  2. The short version
  3. The long version
  4. Cron enhancement

General Assumptions:

  1. You have a Windows computer that is accessible from the internet. For best security, your computer should be up to date with all available patches and updates.
  2. You have access to an SMTP (mail) server, either locally on your server or accessible via your network. Otherwise, ThinkTank can’t send any email and much of its functionality will be disabled.

The short version:

  1. Install Git for Windows (http://help.github.com/win-git-installation/)
  2. Generate SSH Keys (http://help.github.com/msysgit-key-setup/)
  3. Install XAMPP (http://www.apachefriends.org/en/xampp.html)
  4. Get the latest ThinkTank files from GitHub git clone git://github.com/ginatrapani/thinktank.git
  5. Make a MySQL database
  6. Edit httpd.conf to point to webapp directory
  7. Register the app with Twitter:
    Application Website: http://yourdomain.com/thinktank
    Application Type: Browser
    Callback URL: http://yourdomain.com/thinktank/account/oauth.php
    Copy the Consumer key and Consumer secret
  8. Rename webapp/config.sample.inc.php to webapp/config.inc.php, and enter the oauth_consumer_key and oauth_consumer_secret as above, plus:
    log_location: /home/yourusername/thinktank/logs/
    site_root_path: /thinktank/
    And the db_host, db_user, db_password, and db_name from Step 2.
  9. Browse to http://yourdomain.com/thinktank/session/register.php and create an account.
  10. Wait for the activation email, click on the link it contains to activate your account and log in, then jump through the hoops to authorize ThinkTank to access your Twitter account.
  11. Create a batch file to run crawler automatically

The long version:

1. Install GIT for Windows

In a nutshell, just follow the instructions for downloading and installing GIT for Windows at http://help.github.com/win-git-installation/ . Don’t worry about any of the installation options – simply choosing all of the defaults during installation will give you a GIT environment that will work just fine with ThinkTank.

2. Generate SSH Keys

Once again, just follow instructions http://help.github.com/msysgit-key-setup/ . Be sure that it is setup correctly before continuing (i.e.: you can ssh git@github.com and receive a “successful authentication” message).

3. Install XAMPP

XAMPP is an nicely packaged and easy to install Apache distribution containing, among other programs, MySQL and PHP, which are necessary for ThinkTank. For the purposes of this guide, we’re going to assume that you’re using XAMPP as your serving platform.

You can download XAMPP from http://www.apachefriends.org/en/xampp-windows.html . Get the basic (not XAMPP Lite) package.

Go ahead and start the XAMPP installation. Simply choosing the defaults will give you all the tools you need to run ThinkTank. Note: by default, the XAMPP will say that it will install at c:\ . However, this will actually create the folder c:\xampp and install all files into it. For the rest of this guide, we’ll assume this is where the XAMPP files are.

After the installation is finished, press 1 (start control panel). This opens up the XAMPP Control Panel. (Note: you should also have shortcuts on your desktop to launch the XAMPP Control Panel as well). We’re going to start the Apache and MySQL servers, which are all you need to run ThinkTank. First, start the Apache server. You’ll probably get a Windows firewall warning stating that the program’s trying to communicate to the network. You’ll have the option to allow access to local and public networks. If you want your server to be accessible from the internet (probably yes), make sure the “public” option is selected. Next, start the MySQL server. Once again, you’ll probably get another firewall warning. However, the MySQL server does NOT have to be accessible on the network for ThinkTank to work. Therefore, we’d recommend setting the firewall to block all network access.

ThinkTank needs PHP’s Curl extension to work. However, by default this extension is disabled. Enabling it is easy, though. Just open the php.ini file in your favorite text editor (located at c:\xampp\php\php.ini, if you’re following the defaults. Just find this line:

;extension=php_curl.dll

And replace it with this:

extension=php_curl.dll

Go back to the XAMPP Control Panel, and stop Apache. Then, start it again.

One last thing – We highly recommend you read XAMPP’s security notes http://www.apachefriends.org/en/xampp-windows.html#1221, especially if you’re going to be live on the internet.

4. Get the latest ThinkTank files from github

First, create a folder on your hard drive to store the files from git for ThinkTank (say, c:\git). Then, start Git Bash. At the command line, change into your directory …

cd c:\git

… and type this command to get the ThinkTank files:

git clone git://github.com/ginatrapani/thinktank.git

You now have all of the latest ThinkTank files in the folder c:\git\thinktank .

5. Make a database for ThinkTank

The default installation of XAMPP includes phpMyAdmin, a web-based MySQL client. We’ll use this to create and setup the database for ThinkTank.

  • In a web browser, go to phpMyAdmin: http://127.0.0.1/phpmyadmin/
  • From the main page, create a new database (we’ll call it tt_thinktank_db for the rest of this guide).
  • In the left panel, select the ThinkTank database; then in the right pane, click the Import tab.
  • In the box “File to Import”, browse for the ThinkTank database creation script (c:\git\thinktank\sql\build-db_mysql.sql). Then, press Go. This creates all of the tables and such ThinkTank needs.

Now we need to create a special database user to access the ThinkTank database

  • Go back to phpMyAdmin’s home screen.
  • Click the Privileges tab to create a new user for accessing the database (say, thinktank). Give this new user a good password.
  • Give it SELECT, INSERT, UPDATE and DELETE privileges on the tt_thinktank_db database.

Additional Notes

Notes from Mark on the mailing list:

I though I’d try installing it on my Windows 2003 server box, and it looks like I’ve got the webapp portion working. If you’ve been having problems installing it on a windows box, here’s some of my observations from my install:

(Note: this assumes you already have PHP and MySQL installed and running correctly on your server. Yes, that’s a pretty big assumption,
but you can google lots of tutorials to help get you started. Also, I’m using IIS and the SMTP server built into Windows – you may need to install these if they’re not already running on your system)

  • After you’ve downloaded the web files and set up permissions for the ThinkTank files, you need to grant MODIFY permissions on your
    template_c directory (webapp/template_c) to your internet guest account (SERVER_NAME\IUSR_SERVER). Read and write privileges are not enough. Otherwise, you’ll get lots of strange and frustrating errors from Smarty :)
  • The SMTP server built into Windows 2003 doesn’t like “complex” email addresses. I had to modify line 59 in register.php from:

“From: \”Auto-Response\" <notifications@$host>\r\n" .

To: “From: notifications@$host\r\n” .

  • In your php.ini file, to enable curl and gd, uncomment the lines “extension=php_curl.dll” and “extension=php_gd2.dll”
  • To schedule the crawler, I created a one-line .bat file:

c:\path\to\php\php.exe “c:\path\to\twitalytic\crawler\crawl.php”

By default, you can’t schedule tasks to run more than once daily, but you can get around that: http://support.microsoft.com/kb/226795

Clone this wiki locally