<commit_before>How to use the Typo Rails installer
===================================

Typo 4.0 includes an installer that makes it easy to install Typo.

Quick Start
-----------

Here's the short version:

  $ gem install typo
  $ typo install /var/www/my_typo_site


Prerequisites
-------------

You'll need the following software installed on your system:

1.  Ruby 1.8.4
2.  RubyGems (http://www.rubygems.org)
3.  SWIG (http://www.swig.org)
4.  SQLite 3

Most modern Unix systems should have all four of these easily available in pre-built form.


Installing Typo
---------------

1. Install the Typo GEM.

   Run 'gem install typo'.  This will install the current version of Typo
   along with all dependencies.

2. Create a working Typo installation in a directory somewhere.

   Run 'typo install DIRECTORY'.  Replace DIRECTORY with the name of the
   directory that you want Typo to live in.  This will copy all of Typo's
   files into DIRECTORY, create a new database for Typo to use, and start
   Typo running on a random port number.

3. Verify that Typo works for you.  The installer will print a URL at the end
   of the installation process; load it in a browser to test out Typo.

4. Once you're happy with Typo's configuration, follow the directions in
   installer/apache.conf.example to run your Typo installation under Apache.


Starting and Stopping Typo
--------------------------

To stop Typo from running, run `typo stop /path/to/typo`. To restart it, run
`typo start /path/to/typo`. Since this Typo install uses Mongrel, not FastCGI,
you can't depend on your web server restarting it automatically on reboot.  You'll need to either create an init script or cron reboot entry to restart it, depending on your host and/or privilege level.


TODO
----

1.  Actually write the Apache HTTP proxy instructions (for 1.3 and 2.x)
2.  Add lighttpd proxy directions.
3.  Figure out how to best have Typo restart on reboot.
4.  Handle the "missing swig" problem better.<commit_msg>Doc updates<commit_after>How to use the Typo Rails installer
===================================

Typo 4.0 includes an installer that makes it easy to install Typo.

Quick Start
-----------

Here's the short version:

  $ gem install typo
  $ typo install /var/www/my_typo_site


Prerequisites
-------------

You'll need the following software installed on your system:

1.  Ruby 1.8.4
2.  RubyGems (http://www.rubygems.org)
3.  SWIG (http://www.swig.org)
4.  SQLite 3

Most modern Unix systems should have all four of these easily available in pre-built form.


Installing Typo
---------------

1. Install the Typo GEM.

   Run 'gem install typo'.  This will install the current version of Typo
   along with all dependencies.

2. Create a working Typo installation in a directory somewhere.

   Run 'typo install DIRECTORY'.  Replace DIRECTORY with the name of the
   directory that you want Typo to live in.  This will copy all of Typo's
   files into DIRECTORY, create a new database for Typo to use, and start
   Typo running on a random port number.

3. Verify that Typo works for you.  The installer will print a URL at the end
   of the installation process; load it in a browser to test out Typo.

4. Once you're happy with Typo's configuration, follow the directions in
   installer/apache.conf.example to run your Typo installation under Apache.


Upgrading Typo
--------------

The Typo installer can upgrade an existing installer-created Typo install by 
simple running 'typo install DIRECTORY'.  The installer will automatically
detect that it's upgrading an existing install and will attempt to preserve
the existing configuration as much as possible.


Starting and Stopping Typo
--------------------------

To stop Typo from running, run `typo stop /path/to/typo`. To restart it, run
`typo start /path/to/typo`. Since this Typo install uses Mongrel, not FastCGI,
you can't depend on your web server restarting it automatically on reboot.  You'll need to either create an init script or cron reboot entry to restart it, depending on your host and/or privilege level.


Configuration Variables
-----------------------

Each Typo installation maintains a list of configuration variables.  To see
the list for an existing install, run 'typo config DIRECTORY'.  You can change
them via 'typo config DIRECTORY name1=value1 name2=value2...'  For example:

  typo config /var/www/typo web-server=mongrel_cluster


TODO
----

1.  Figure out how to best have Typo restart on reboot.
2.  Handle the "missing swig" problem better.
{'fraction_non_alphanumeric': 0.10152284263959391, 'fraction_numerical': 0.00904877510483337, 'mean_word_length': 3.1087941976427924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 7, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2833702', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1225, 'n_words': 647}