Chapter 1: Installation and Upgrade
Configuring the System
Problem
You need to configure a Movable Type system.
Solution
Add to and modify the configuration directives in mt-config.cgi, the Movable Type configuration file.
Discussion
Configuration directives define the baseline information Movable Type needs to run in any given environment. These should not be confused with the system and weblog settings accessed through the MT interface. The configuration contains only the basic information that MT needs to get running.
The following steps detail the basic configuration each installation will initially need in order to get running.
- Open mt-config.cgi
Movable Type's configuration is stored as a text file named mt-config.cgi found in the MT application's directory. If this is your first time configuring the system you can rename mt-config.cgi-original, a sample and annotated configuration, or create one from scratch. Open this file with a text editor such as BBEdit, Notepad or vi.
- Configure the CGI Path
Set the
CGIPathdirective with the URL of MT without the script name. For example if your site is http://www.example.com/ and you are installing MT in its own subdirectory mt, under the CGI directory, you would use:CGIPath http://www.example.com/cgi/mt/With this directive you will be able to access MT with the URL http://www.example.com/cgi/mt/mt.cgi.
- Configure Database Options
Movable Type needs some information about your database setup in order to access your content and settings. How you handle this step may vary slightly due to the nature of each option.
- MySQL
ObjectDriver DBI::mysql Database mt_database_name DBUser database_user DBPassword secret_password DBHost database_server_name_or_IPThe database that you specify must already exist. Movable Type cannot create it automatically. MT will initialize the database by creating all necessary tables and indices later. See Initializing the System.
- PostgreSQL
Configuring your system for PostgreSQL is identical to MySQL except for a PostgreSQL-only ObjectDriver value.
ObjectDriver DBI::postgresLike MySQL, the database that you specify must already exist.
- SQLite
ObjectDriver DBI::sqlite Database /full/path/to/database/file.dbSQLite is a file-based database system that runs on the same machine as the MT software. Directives such as
DBUserandDBHostare not needed. Placed in a directory with Write permission, MT should be able to create the file during initialization. - Berkeley DB
DataSource /full/path/to/database/directory
Berkeley DB is Movable Type's default database option because of its near universal availability and easy configuration. It is still recommended that you consider using one of the other database options if at all possible. Berkeley DB is significantly slower and older versions are prone to data corruption issues.
- MySQL
- Configure the URL path for the static system files
Static files are resources such as style sheets, images and JavaScript libraries that are loaded by the browser in the process of presenting the MT system interface. By default MT assumes the static files are in mt-static, the same directory as your application in the distribution file.
That said, many system administrators will shut down the ability of static files to be served from CGI directories such as the one where the MT code would reside. This is a security precaution to avoid the potential of code being dumped to a browser screen, possibly revealing information such as passwords that users generally shouldn't be privy to. (See knowledge base article "Images, Styles, and Documentation Do Not Show Up" for further explanation of this problem.)
Therefore, while theoretically optional, it's highly recommended that the
StaticWebPathbe set to a location outside of any scripts directory.For example:
StaticWebPath http://www.example.com/mt-static/ - Save and exit mt-config.cgi
Upon saving the configuration file, MT will be able to make use of the new settings. It is a good idea to keep a backup copy of your configuration in case it gets overwritten or inadvertently changed.
If you are using SQLite or Berkeley DB, the initial system configuration is now complete.




Comments
I've noticed a bunch of people having the same error when upgrading.
When you go to "initialize" you system after you've installed all of your files, many people's upgrade stalls at the screen that says
"Upgrading database from version 3.1"
People have suggested that you move your packaged "mt-static" directory to "your-site.com/mt/mt-static"
This only works for people who have that directory set as your static directory in your old installation!
If your mt.cfg file has the static directory pointing somewhere else, (e.g., mine was your-site.com/cgi-bin/mt/static) then you need to put the contents of the packaged "mt-static" directory into the static directory that you specified in your mt.cfg. After doing this everything went smoothly.
I hope this helps people. I'm also going to cross-post this at my website: http://www.photovox.com/archives/20_260805.html
Posted by: roderick -
|
August 26, 2005 04:57 PM
As of 3.2 the default CGIMaxUpload size has changed from "1000000 (1MB)" to "500000 (0.5MB)". The comments in the configuration file have not been updated to reflect this change.
Posted by: DanielR
|
August 28, 2005 07:10 PM