How To Install Typo

Setting up typo is very easy if you follow the steps below.

  1. Login to cPanel, click on MySQL and create a new database and login for Typo to use.
  2. Now go the subdomain section in cPanel and add a subdomain for your blog. In our example we will use a subdomain called blog.
  3. Now SSH into your account
  4. Grab the typo source code
    wget http://rubyforge.org/frs/download.php/32865/typo-5.0.3.tgz
  5. Extract the source and rename the directory and setup your symbolic link. For the link you would replace the blog directory with the name of your subdomain
    tar xzvf typo-5.0.3.tgz
    mv typo-5.0.3 typo
    rm -rf ~/public_html/blog
    ln -s ~/typo/public ~/public_html/blog
  6. Now, setup your database configuration
    cd typo
    cd config
    vi database.yml
  7. Enter in your database information you setup in the first step.
  8. Next, edit the environment.rb file, and put typo into production mode. Typo 5.0.3 does not work well with Rails 2.1 Make sure to set the Rails version to 2.0.2 in environment.rb file
    RAILS_GEM_VERSION = '2.0.2'
    RAILS_ENV  = ENV['RAILS_ENV'] || 'development'
    RAILS_ENV  = ENV['RAILS_ENV'] || 'production'
  9. Typo doesn’t work very well with FastCGI, so we need to put the application in CGI mode by editing the .htaccess file contained in the typo/public directory. Change dispatch.fcgi to dispatch.cgi
  10. Update: Typo can use FastCGI!
    Edit the public/.htaccess file

    1. Find the line AddHandler fastcgi-script .fcgi and comment it out, this is not needed since this is already configured by Apache.

    #AddHandler fastcgi-script .fcgi

    2. Find the line in the .htaccess file containing dispatch.cgi and change this to dispatch.fcgi

  1. The last thing we need to do is setup our database structure, you may do so using the command line mysql tool.
    cd typo/db
    mysql databasename -u databaseuser -p < schema.mysql.sql

Typo should now be setup and ready to use.

If you receive “require’: no such file to load /public/../config/../vendor/rails/railties/lib/initializer (LoadError)” error when running the dispatch.fcgi ,try removing the rails directory under vendor folder.