Howto install the Typo blog on Linux

Posted by Jason Sat, 14 Oct 2006 16:20:00 GMT

Howto install Typo blogging software on Linux.

I don't consider myself much of a blogger.  Actually, i could care less to let people know who i am and what I'm up to.  So then you might ask why i would be interested in setting up typo.  Well, its ruby on rails based.  Thats why.  This howto is assuming that you are installing typo on a linux distribution, i don't have a mac (yet) so i unfortunately cannot be of any help to the apple folks.  If you are one of the millions of windows users..  Go away now before you hurt your little head.

The best way to install typo is via ruby gems.  This means that you have to have ruby, ruby on rails, and rubygems installed on your server.  You can install ruby and rails via which ever package manager your distribution provides to you.  Yum, apt-get, emerge all have it in stock.  Rubygems however you have to download and install on your own  (at the time of this writing anyhow, but there is talk that gems will soon be included in the ruby package)  Since this isn't a howto on installing rails, i will keep that end of it short and just give you the facts of what your environment needs to support typo.  You need your server to support ruby, rails and fast cgi.  This howto is written assuming that you are using the apache webserver, and that your blog will be set up as a subdomain off of your domain, configured through an apache vhost container.  You need to have access to your DNS to make this work as you have to set up blog.yourdomain.com, assuming you already have a yourdomain.com.  So, to sum up your environment requirements:

  • Ruby
  • Rails
  • RubyGems
  • Apache
  • Fast CGI
  • A domain name

I am not going into setting up these things, as they are out of the scope of this howto and there are lots of howto's out there to help you get this set up.  May i recommend google.  Once you have this environment set up, installing typo is easy.

First, install the typo gem:

gem install typo

Second, install typo to the directory that you want to have it:

typo install /path/to/your/install/directory

The path to your install directory can be anywhere that is accessible by apache.  The apache document root may be a logical place.  After executing the install command, you will see the install scroll by for a few seconds and then it will stop and print out the port that it is running on.  Point your browser over to this port and you will see the installation login window.  Everyones installation of typo will start on a different port, it just looks for one that's open in a given range and binds to it.  So basically, note what the port number is that it gave you for later on.

Next, fill out the login name, username and password.  Click enter and it will let you take a first look at the administrator section of your shiny new web blog.  You can come back to this later and its not overly important to do anything with it now.  Now that you have your admin account set up, we can get back to configuring the server.

I have my apache configurations set up using virtual hosts, as most folks do.  You will need to set up the DNS to point to your new blog.  If you have your DNS handled by someone else, basically all you have to do  (or all you have to tell them)  is to set a CNAME entry.   So, if you domain name is myblog.com, you will want to tell them to set up a CNAME for blog.myblog.com.  The next thing that people normally have trouble with is setting up the vhost config for apache to proxy their new typo install.  Rather than explaining all the fundamentals of apache  (yes, google..)  I will just show you my config that made it all work.


#
below is your ip address
<VirtualHost 66.111.111.xxx>
 
#below is what you have to have the DNS set up for,  ServerAlias is optional
  ServerName blog.myblog.com
  ServerAlias blogs.myblog.com
  UseCanonicalName On

  ServerAdmin your@email.com
 
#the DocumentRoot is where you decieded to install typo, back at your "typo install /path/to/your/directory" command
  DocumentRoot /var/www/localhost/httpd/myblog.com/public

  <Directory /var/www/localhost/httpd/myblog.com/public>
    Options ExecCGI FollowSymLinks
    AllowOverride all
    Order allow,deny
    Allow from all
  </Directory>

  ErrorLog /var/www/localhost/httpd/myblog.com/log/production.log

  ServerSignature On

  RewriteEngine On
  RewriteRule ^/$ /index.html [QSA]
  RewriteRule ^([^.]+)$ $1.html [QSA]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ http://localhost:4205%{REQUEST_URI} [P,QSA,L]
 
#See the 4205 above?  This is the port that i told you to remember, put your port number here.
</VirtualHost>


If you are really new to the game, any of the lines above that start with a "#" character are comments, read them, understand what they are doing.  You don't have to put them in your config, they are there to explain what is going on.

Now, you can point your browser over to blog.myblog.com and you will see your blog  (you don't have to have the port number in the url)  This is because apache is correctly proxying it.  So whats left?  Well, typo has lots of themes you can try, you can adjust your sidebar elements..  And of course, your a little short on content.

Hope it helped, enjoy your new blog!


Composed by Jason K. Jackson


This site completely supported by Google advertising



Posted in  | Tags ,  | no comments