Front page
Archive
Silflay Hraka?


Bigwig is a systems administrator at a public university
Hrairoo is the proprietor of a quality used bookstore
Kehaar is.
Woundwort is a professor of counseling at a private university

The Hraka RSS feed

Email
bigwig AT nc.rr.com

Friends of Hraka
InstaPundit
Daily Pundit
cut on the bias
Meryl Yourish
This Blog Is Full Of Crap
Winds of Change
A Small Victory
Silent Running
Dr. Weevil
Little Green Footballs
ColdFury
Oceanguy
Fragments from Floyd
VodkaPundit
Allah
The Feces Flinging Monkey
the skwib
Dean's World
Little Tiny Lies
The Redsugar Muse
Sperari
Natalie Solent
From the Mrs.
ErosBlog
The Anti-Idiotarian Rottweiler
On the Third Hand
Public Nuisance
Not a Fish
Rantburg
AMCGLTD
WeckUpToThees!
Electric Venom
Skippy, The Bush Kangaroo
Common Sense and Wonder
Neither Here Nor There
Wizbang!
Bogieblog
ObscuroRant
RocketJones
The Greatest Jeneration
Ravenwolf
Ipse Dixit
TarHeelPundit
Blog On the Run
blogatron
Redwood Dragon
Notables
Greeblie Blog
Have A Cuppa Tea
A Dog's Life
IMAO
Zonitics.com
Iberian Notes
Midwest Conservative Journal
A Voyage to Arcturus
HokiePundit
Trojan Horseshoes
In Context
dcthornton.blog
The People's Republic of Seabrook
Country Store
Blog Critics
Chicago Boyz
Hippy Hill News
Kyle Still Free Press
The Devil's Excrement
The Fat Guy
War Liberal
Assume the Position
Balloon Juice
Iron Pen In A Velvet Glove
IsraPundit
Freedom Lives
Where Worlds Collide
Knot by Numbers
How Appealing
South Knox Bubba
Heretical Ideas
The Kitchen Cabinet
Dustbury.com
tonecluster
Bo Cowgill
mtpolitics.net
Raving Atheist
The Short Strange Trip
Shark Blog
Hoplites
Jimspot
Ron Bailey's Weblog
Cornfield Commentary
Testify!
Northwest Notes
pseudorandom
The Blog from the Core
Ain'tNoBadDude
CroMagnon
The Talking Dog
WTF Is It Now??
Blue Streak
Smarter Harper's Index
nikita demosthenes
Bloviating Inanities
Sneakeasy's Joint
Ravenwood's Universe
The Eleven Day Empire
World Wide Rant
All American
Pdawwg
The Rant
The Johnny Bacardi Show
The Head Heeb
Viking Pundit
Mercurial
Oscar Jr. Was Here
Just Some Poor Schmuck
Katy & Bruce Loebrich
But How's The Coffee?
Roscoe Ellis
Foolsblog
Sasha Castel
Dodgeblogium
Susskins Central Dispatch
DoggerelPundit
Josh Heit
Attaboy
Aaron's Rantblog
MojoMark
As I was saying...
Blog O' Dob
Dr. Frank's Blogs Of War
Betsy's Page
A Knob for Brightness
Fresh Bilge
The Politburo Diktat
Drumwaster's rants
Curt's Page
The Razor
An Unsealed Room
The Legal Bean
Helloooo chapter two!
As I Was Saying...
SkeptiLog AGOG!
Tong family blog
Vox Beth
Velociblog
I was thinking
Judicious Asininity
This Woman's Work
Fragrant Lotus
DaGoddess
Single Southern Guy
Caerdroia
GrahamLester.Com
Jay Solo's Verbosity
TacJammer
Snooze Button Dreams
Horologium
You Big Mouth, You!
From the Inside looking Out
Night of the Lepus
No Watermelons Allowed
From The Inside Looking Out
Lies, Damn Lies, and Statistics
Suburban Blight
Aimless
The SmarterCop
Dog of Flanders
From Behind the Wall of Sleep
Beaker's Corner
Bad State of Gruntledness
Who Tends The Fires
Granny Rant
Elegance Against Ignorance
Moxie.nu
Eccentricity
Say What?
Blown Fuse
Wait 'til Next Year
The Pryhills
The Whomping Willow
The National Debate
The Skeptician
Zach Everson
MonkeyWatch
Geekward Ho
Argghhh!!!
Life in New Orleans
Rotten Miracles
Fringe
The Biomes Blog
illinigirl
See What You Share
Truthprobe
Blog d’Elisson
Your Philosophy Sucks
Watauga Rambler
Socialized Medicine
Consternations
Verging on Pertinence
Read My Lips
ambivablog
Soccerdad
The Flannel Avenger
Butch Howard's WebLog
Castle Argghhh!
Andrew Hofer
kschlenker.com
Moron Abroad
White Pebble
Darn Floor
Wizblog
tweedler
Pajama Pundits
BabyTrollBlog
Cadmusings
Goddess Training 101
A & W
Medical Madhouse
Slowly Going Sane
The Oubliette
American Future
Right Side Redux
See The Donkey
Newbie Trucker
The Right Scale
Running Scared
Ramblings Journal
Focus On Reality
Wyatt's Torch

November 05, 2003

Installing Movable Type To Personal Space at UNC

This is what I've spent the last day and a half doing.

Preliminary Notes

1. These directions are meant to be used in conjunction with the Movable Type Installation Instructions, and are laid out in a fashion similar to those instructions. Always Read the Fine Manual.

2. Capitalization makes a difference. The systems running Movable Type are not Windows machines. Differences in lowercase and uppercase usage will affect them.

3. Before you download and install Movable Type you will need to subscribe to the personal cgi service at Onyen.unc.edu

Usage

In the directions below, replace all instances of < onyen > with your personal onyen.

Prior to Download

Create a directory named "mt-static" in your public_html directory. Once that is done you'll need to add an entry to the AFS access control list for the new directory. This is the entry you will need:

< onyen >.cgi rldiw

A tutorial on AFS permissions and how to change them is available here.

Once you have added the correct entry to the mt-static directory, create an "archives" folder within it. It will inherit the changed permissions on the mt-static folder, so you will not have to change the AFC access permissions on it.

Downloading

Download the files needed from Movable Type's download page. You do not need to download the "Full Version with Libraries," as the Full Version is sufficient, and takes up less space. However, if you wish to use the PostgreSQL database backend, the SQLite database, or the Image::Magick perl module, which is needed if you would like to be able to create thumbnails of uploaded images, then you will need to download the "Full Version with Libraries."

Save the .zip or .gz file you've chosen to your public_cgi directory.

Finding Perl on your Server

Once your blog is up and running, the main UNC web servers will be serving your content to the world, and perl does not reside at /usr/bin/perl on those machines. They instead use the perl binary residing in this location:

/afs/isis/pkg/isis/bin/perl

You will have to change the path to perl on the following scripts: mt-add-notify.cgi, mt-check.cgi, mt-comments.cgi, mt-load.cgi, mt-send-entry.cgi, mt-tb.cgi, mt-search.cgi, mt.cgi, mt-xmlrpc.cgi, and mt-view.cgi scripts. Don't worry about doing this yet.


Installation Directories

Both examples below will install Movable Type into your personal cgi-bin (the public_cgi folder in your home directory), and use the default Berkeley DB as its database. UNC uses a customized cgi protection script known as "k-wrap" that is the equivalent of the cgiwrap and suexec applications mentioned by the Movable Type directions

Command Line
$ cd ~< onyen >/public_cgi
$ gunzip MT-2.64.tar.gz
$ tar -xvf MT-2.64.tar (this will create a folder named MT-2.64 in your public_cgi directory)
$ cd MT-2.64
$ mv images ../../public_html/mt-static/
$ mv docs ../../public_html/mt-static/
$ mv styles.css ../../public_html/mt-static/
$ mv index.html ../../public_html/mt-static/
$ mkdir db

Windows

Double-click on the MT-2.64.zip file in your public_cgi folder. If nothing happens, download and install winzip, then try again.

Once winzip opens, extract all the files to your public_cgi folder. Once you close Winzip, a MT-2.64 folder will be present in that folder. Open it. Move the "docs" folder, the "images" folder, the "styles.css" file and the "index.html" file to the "mt-static" folder you created earlier in your public_html directory.

Once all that is done, create a new folder inside the MT-2.64 directory. Name it "db".

Note to both Command Line and Windows users. At this point the AFS permissions for the folders you just moved and the one you just created need to be changed, much as they were for the "mt-static" folder above.

Add "atn:webhosts rl" to the access control list on "images" and "docs."

Also add "atn:webhosts rl" to the access control list on the "lang-en-us" folder that is inside the "images" directory.

Change this entry on the "db" folder
< onyen >.cgi rl

to this
< onyen >.cgi rlidwk

Once again, a tutorial on afs permissions and how to change them is available here.


Configuration

1. Open mt.cfg
So far, so good. The situation now becomes slightly more complicated, however.

If you use Microsoft Word or Wordpad to open mt.cfg, the program will add a "^M" to the end of each line when you save it, and MT will choke on it later. See this document for more details. Basically, you will have to run the program the help document above mentions against every file that you alter using Microsoft Word or Wordpad before Movable Type will function, and that program runs from the command line.

As far as I'm concerned, it's easier just to learn vi and alter the files that way. Note that you can use Notepad without gumming up the files, but the layout of the file in Notepad is confusing.

2. Configure Movable Type URL

The line should look similar to this:
CGIPath http://www.unc.edu/usr-bin/< onyen >/MT-2.64

3. Configure Database options

Skip.

4. Configure path to Database directory (for Berkeley DB).

Skip.

5. Configure path to Static files

Change this line
# StaticWebPath /path/to/static-files/

to this line
StaticWebPath http://www.unc.edu/~< onyen >/mt-static/

6. Enable security features.
Change the following lines in the mt.cfg from
# DBUmask 0022
# HTMLUmask 0022
# UploadUmask 0022
# DirUmask 0022

to
DBUmask 0022
HTMLUmask 0022
UploadUmask 0022
DirUmask 0022

7. Save and exit mt.cfg.
Remember to run the win2unix program if you used Word or Wordpad to make the changes.

8. Set your SQL database password
Skip

Uploading Files
Skip

Checking for Perl Modules
The following perl Modules are NOT installed as of 11/04/2003. Note than none of them are necessary for the setup described above.

DBD::Pg...
DBD::SQLite...
Image::Magick

Now, update the path to perl on the mt-add-notify.cgi, mt-check.cgi, mt-comments.cgi, mt-load.cgi, mt-send-entry.cgi, mt-tb.cgi, mt-search.cgi, mt.cgi, mt-xmlrpc.cgi, and mt-view.cgi scripts. Remember to run the win2unix program against each file if you used Word or Wordpad to make the changes.

Initializing the System

There are two ways to initialize the Movable Type system, either by using the browser to load http://www.unc.edu/usr-bin/< onyen >/MT-2.64/mt-load.cgi or by running it from the command line.

$./mt-load.cgi

However, in order for the script to run correctly, and for Movable type function correctly afterwards, the AFS permissions must be correct on the "db" folder.

If the permissions are incorrect on that folder, any attempt to run the mt-load.cgi from the browser will result in the following message:

Loading initial data into system...
Loading weblog...

An error occurred while loading data:

Tie 'db/blog.db' failed: Permission denied

This error will not occur if the script is called from the command line, but all attempts to login to Movable Type afterwards will fail with the words "Invalid Login."

If either of these errors occurs, re-read the "Installation Directories" section on the correct AFS permissions for the "db" folder.

Once the mt-load.cgi script has run successfully, you should be able to sign in to Movable Type using the Melody/Nelson account/password at this url:

http://www.unc.edu/usr-bin/< onyen >/MT-2.64/mt.cgi

However, further configuration is need before you will be able to post messages.

Running Movable Type

Once you have added yourself as an author and removed the Melody Nelson account (make sure you assign all available permissions to yourself first!), click on "Manage Weblog", then on "Weblog Config." You will see 6 text boxes.

The first text box allows you to change the name of your weblog.

The second text box is the path to your main index file. Replace "public_cgi/MT-2.64" with "public_html/mt-static".

The third text box is the URL of your public website. Change "http://www.unc.edu/" to "http://www.unc.edu/~< onyen >/mt-static".

The fourth text box is the path to your archive files. Replace "public_cgi/MT-2.64" with "public_html/mt-static". Be sure not to delete the word "archives" at the end of the path.

The fifth text box is the url of your archives. Change "http://www.unc.edu/archives" to "http://www.unc.edu/~< onyen >/mt-static/archives".

The sixth text box is for your local time. Set it to whatever you like.

Save the changes and rebuild when the application prompts you to. As none of the other configurations are critical to site functionality, this document will not address them.

Update: Another take on the process, for those with less experience in UNIX, from Leaking Pure White Noise.

Posted by Bigwig at November 5, 2003 02:08 PM | TrackBack
Postscript:
First time visitor to House Hraka? Wondering if everything we produce could possibly be as brilliant/stupid/evil/pedantic/insipid/inspired as the post you just read? Check out the Hraka Essentials, the (mostly) reader-selected guide to Hraka's best posts, and decide for yourself.
Comments

Hopefully someone will see this.

I'm trying out your directions on installing moveable type to my UNC onyen account. I'm stuck on editing the different files (mt.cfg and the cgi-scripts). The link on how to run VI editors seems to asume UNIX access and knowledge. Is there a non-unix way to edit the files? I've looked at the win2unix help file but to my unelucidated mind it looks like more UNIX action to me.

Suggestions?

Posted by: Andy Pennock at November 7, 2003 11:56 PM

I just wanted to say thank you for writing all this. I'm working on setting up a blog at Iowa State that also uses AFS, and I don't know whether I would have been successful without your help. It'll probably be a bit yet before it goes up, but I'm well on my way.

Posted by: Drew Miller at March 15, 2005 10:15 PM
Post a comment Note: Comments with more than two dashes per line will be blocked as spam.









Remember personal info?