Typo Installation (Dedicated cPanel Server)

Posted by Miraenda Sun, 04 Jun 2006 03:27:00 GMT

This version of Typo requires Ruby 1.8.2 or later and Rails 1.1 with FastCGI. If your dedicated server does not already have Ruby and Rails installed on it, you can contact dedicated@lunarpages.com to request an installation. Please provide the last 4 digits of your card on file for ownership confirmation along with your dedicated server domain name or account username. Managed addon customers have 1 free script installation available to them. Non-managed addon customers would pay $75 per hour for the script. Ruby and Rails with FastCGI support takes approximately 1 hour to install.

A. Creating your database for Typo:

  1. Log into cPanel and click on MySQL Databases icon:
  2. MySQL Databases
  3. As per the example below, enter typo in the "New Database" field under Current Databases area, then click "Create Database" button. Your full database name will then show as cPaneluser_typo.
  4. Curent Databases
  5. Under Current Users area as seen in the example below, enter typo for the "Username" field and enter a password that you write in your notes for the "Password" field, then click "Create User" button. Your full database user's name will then show as cPaneluser_typo.
  6. Curent Users
  7. Under Add Users to Your Database area as shown below, select in the "User" dropdown cPaneluser_typo and select in the "Database" dropdown cPaneluser_typo, then click "Add User to Database" button.
  8. Add Users to Your Databases

B. Checkout typo via subversion:

If you do not already have subversion installed, please see this tutorial on how to do so.

In shell SSH as root, run the following command, remembering to replace user with the username for the account onto which you are installing Typo:
cd /home/user
svn checkout svn://typosphere.org/typo/trunk typo

This will create a directory called typo at /home/user/ with the newest copy of Typo available.

C. Edit dispatch.fcgi:
cd /home/user/typo/public
vi dispatch.fcgi

D. Change the top variable:
#!/usr/bin/env ruby
to
#!/usr/local/bin/ruby

(You can also change dispatch.rb in the same folder from #!/usr/bin/ruby to #!/usr/local/bin/ruby if you would like)

E. Ensure dispatch.fcgi has the right file permissions:
chmod 755 dispatch.fcgi

F. Ensure .htaccess has right dispatch.fcgi entry:
vi .htaccess

#RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

to
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

G. Copy the database.yml.example file to database.yml and edit it:
cd /home/user/typo/config
cp database.yml.example database.yml
vi database.yml

H. Replace whatever it has with the following (the 2 spaces to the left of some of the lines are spaces not tabs, so do not change them to tabs):

login: &login
  adapter: mysql
  host: localhost
  username: cPaneluser_typo
  password: database user's pass here

development:
  database: cPaneluser_typo
  <<: *login

test:
  database: cPaneluser_tests
  <<: *login

production:
  database: cPaneluser_typo
  <<: *login

I. Edit the environment.rb file:
cd /home/user/typo/config
vi environment.rb

#ENV['RAILS_ENV'] = 'production'

to
ENV['RAILS_ENV'] = 'production'

If instead of commented out it says 'development' change to 'production'.

J. Run the following to import the database (or open /home/user/typo/db/schema.mysql-v3.sql and copy the contents, then go into PHPMyAdmin and SQL, then enter the contents of that file into the SQL box):
cd /home/user/typo/db
mysql -u cPaneluser_typo -p cPaneluser_typo<schema.mysql-v3.sql

Enter your database user's password at the password prompt you get if you run the command in shell.

K. Migrate the database:
cd /home/user/typo
rake migrate

You should get a return like the following:

(in /home/user/typo)
== FixupDefaultSidebars: migrating ======================
== FixupDefaultSidebars: migrated (0.0065s) =============

== RemoveSidebarStagedConfig: migrating =================
-- remove_column(:sidebars, :staged_config)
   -> 0.0022s
-- rename_column(:sidebars, :active_config, :config)
   -> 0.0021s
== RemoveSidebarStagedConfig: migrated (0.0045s) ========

== CreateTriggers: migrating ============================
-- create_table(:triggers)
   -> 0.0017s
== CreateTriggers: migrated (0.0018s) ===================

== AddPublishedAtToContent: migrating ===================
-- add_column(:contents, :published_at, :datetime)
   -> 0.0042s
-- About to call find_and_update
== AddPublishedAtToContent: migrated (0.0057s) ==========

== FixContentsPublishedDefault: migrating ===============
-- change_column(:contents, :published, :boolean, {:default=>false})
   -> 0.0042s
== FixContentsPublishedDefault: migrated (0.0043s) ======

== FixupForthcomingPublications: migrating ==============
== FixupForthcomingPublications: migrated (0.0029s)======

L. Symlink the directories (if you will be using typo at http://domain.com):
cd /home/user
mv public_html public_html.bak
ln -s /home/user/typo/public public_html
mkdir public_html/cgi-bin
chown -R user:user public_html
chown user:nobody public_html

If you will be using typo at http://domain.com/folder do the following instead:
cd /home/user/public_html
ln -s ../typo/public foldername

M. Loading up Typo in a browser:

You should now be able to navigate to typo at either http://domain.com/ or http://domain.com/folder/, depending on which you chose in Step L, and you will see a signup box with Desired Login, Display name, Email, and Password details.

The administrative area will be at http://domain.com/typo/admin/.

Have fun blogging!

Posted in  | no comments | no trackbacks

Older posts: 1 ... 4 5 6