Topic: HOWTO: Install Typo 4 on shared hosting

Some hosts are still on rails 1.0. Some others do not have the typo gem available for you to easily install a new blog. The good thing is that is very easy to install typo with subversion and you need not to worry about which gems are available.
I installed Typo on site5 but these steps can be followed (not without some tweaking) for other hosts. The basic idea is still the same.

1.ssh to your server and checkout the source code

svn checkout svn:// myblog

2. Jump over to your site's admin panel and create a database for typo to use and a new user if you need to. Let's assume we just created a database called blog_production and a new user blog_user with full privileges. Now you need to edit some files (remember, everything is happening on the server, so open and edit the proper files)

3. Edit the file config/database.yml.example and enter the proper database name, user and password. Rename this file to database.yml

login: &login
  adapter: mysql
  host: localhost
  username: blog_user
  password: password
  database: blog_production
  <<: *login

4. Edit the files public/dispatch.fcgi and public/dispatch.rb and change the very first line to:


5. Edit the file config/environment.rb or you migh get told off! Just uncomment this line:

ENV['RAILS_ENV'] = 'production'

6. Create a symlink from the apps public folder to where your blog will be publicly accessed

ln -s ~/myblog/public ~/public_html/blog

7. Still at the command  line, we reed to populate the database:

rake migrate RAILS_ENV=production

That should be it.

Re: HOWTO: Install Typo 4 on shared hosting

I've moved this to the Tutorials forum where it might get more views. smile

Josh Catone helps run this place
Rails Forum - Rails Jobs

Re: HOWTO: Install Typo 4 on shared hosting

Just a quick update: The rails core team announced earlier today a major security hole affecting all versions of rails. They did not give any further explanation just recommended all rails users to upgrade to version 1.1.5. If you are just about to install typo using svn go ahead and do so. You will be installing typo 4.0.1 that ships with rails 1.1.5

If you are running typo 4.0.0 you just need to freeze the newest version of rails.

rake rails:freeze:edge TAG=rel_1-1-5

That's it.
If you are running a blog on typo prior to version 4, freezing rails 1.1.5 will break it. If this is your case the only solution you have is to upgrade typo to 4.0.1

btw, thanks Josh.

Last edited by alce (2006-08-10 00:20:36)

Re: HOWTO: Install Typo 4 on shared hosting


For those interested, there is a translation (with some addendum) of this post to spanish over at roll.over