How To Install Typo
Setting up typo is very easy if you follow the steps below.
- Login to cPanel, click on MySQL and create a new database and login for Typo to use.
- Now go the subdomain section in cPanel and add a subdomain for your blog. In our example we will use a subdomain called blog.
- Now SSH into your account
- Grab the typo source code
- 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
- Now, setup your database configuration
- Enter in your database information you setup in the first step.
- 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'
- 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
- 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
- The last thing we need to do is setup our database structure, you may do so using the command line mysql tool.
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.