Set up Movable Type on 1and1

October 29, 2003

In the last few weeks online communities in general, and the blog world in particular, have been splattered with reactions to the news that a host called 1and1 is giving away three years worth of premium hosting. 1and1 are a huge hosting service in Europe (they claim to be the world's largest) and this promotion is part of their strategy for moving into the American market. Netizens were understandably skeptical about the offer, after all, how good could a service that is totally free be?

Never one to pass up a bargain, I signed up and even finally got around to registering my own domain which cost a modest $6. I had been wanting to play around with movable type for some time, not to keep a "dear diary", but as a way to display some photographs and as a way to create a dynamic repository for anything I wished to publish (like this information). 1and1, unlike most other cheap or free hosts, seemed to provide all the resource I needed to be able to do this at no cost or risk. Too good to be true? It turns out you can still get something for nothing on the web and that the quality of the hosting is not always determined by the price you pay. The fact that you can read this missive is proof enough that 1and1's offer is straight up and can host movable type. If you too are looking to play with MT or just want 3 years of something for nothing too and you're a US resident I suggest you sign up for 1an1's offer before it ends at the year's end.

How do you set it up? I did not keep notes while I setup MT on 1and1 but I will try to lay down some pointers as to how I got it running:

First off you obviously need a 1and1 account. Sign up for the offer and you get back an email telling you how to activate your account. This involves giving 1and1 a US phone number where you can be reached in the next few minutes. An automated call is placed by 1and1 to that number giving you a pass code. You then enter this code into the authorization page and your account is ready to use.

Through 1and1 you can then get a domain you already own redirected to your new host. 1and1 can also be the host for more than one domain or for various sub-domains. As I didn't own a domain I wanted to use for this site I bought one through 1and1 which took about 24 hours to be registered and activated.

The next thing you need is the Movable Type program. I downloaded the latest full version with libraries from movabletype.org and started following their installation instructions. The instructions can be a little overwhelming if, like me, this is your first experience of installing movable type but, as long as you go through them carefully it is an easy install. Here are 1and1 specific instructions to augment MT's own instructions:

  • Finding Perl on your Server - don't worry about it, Perl is in its default location on 1and1 so you don't need to change your cgi scripts to point to a different perl location.
     
  • Installation Directories - The application - in 1and1 your whole directory is cgi enabled, not just a specific cgi-bin, so you don't need to worry about relocating your static files. As for the installation directory itself, I chose a sub-directory under my home directory, called "moveabletype". This was for my own sanity and to keep the MT files apart from and static pages I may want on my site.
     
  • The database - I used MySQL so there was no need to create external directories.
     
  • Configuration - Configure Movable Type URL - I used the subdirectory moveabletype again for this.
     
  • Configure Database options - before you set this you need to go to your 1and1 control panel and enable the MySQL database. Now go to the "webspace" menu on the control panel and select "MySQL Configuration" and note your database name, user name, password and host name. Use these values to set the mt.cfg values for ObjectDriver (DBI::mysql), Database, DBUser and DBHost.
     
  • You can now skip all steps to "Set your SQL database password". Open mt-db-pass.cgi and replace the password with the password you noted down from you control panel.
     
  • Uploading files and setting permissions is just as described in the MT instructions. Do remember to be specific about whether the transfer is ASCII or Binary. I used smartftp and it was very easy to transfer the files in two loads; one for each style of transfer.
     
  • Create your Movable Type database directory - skip this step.
     
  • Checking for Perl Modules - running the http://www.your-site.com/mt/mt-check.cgi url worked first time for me as it will, hopefully for you.
     
  • If all goes well you are now ready to start using movable type.
Posted by mhtaylor at October 29, 2003 3:22 PM
Comments

Hey, thanks for this. I'm setting up MT for my sister on a 1&1 account and I was worried about messing it up. I appreciate it!

Posted by: Aristan at December 11, 2003 11:01 PM

Worked perfectly, thanks for the tips. By the way, I don't think "amateur" does your work justice- great photos!

Posted by: Graham at December 14, 2003 7:07 AM

Martin,

Your few suggestions made a huge difference. To top that off you have earned a place in history as my new home's first commenter.

The problem I faced getting mt-load.cgi to execute succesfully arose out of my failure to realize that the database I was pointing MT to was hosted elsewhere. Once I saw that, all was well again.

BTW, "Abandoned Dog Toy" is fascinating.

P-

Posted by: Philip at December 17, 2003 12:35 PM

Wonderful! I have been letting my 1&1 site languish while trying to figure this out. Now I have it working and it's all thanks to you!

Posted by: Mike at December 30, 2003 12:38 AM

Its also possible to get image support going, even though 1and1 doesn't support ImageMagick. See either of:

http://groups.yahoo.com/group/1and1/message/3

http://s88567960.onlinehome.us/forums/index.php?showtopic=114

for info.

Posted by: Another Mike at December 30, 2003 9:47 PM

Any thoughts on why mt.cgi would return:

Got an error: Can't locate MT/App/CMS.pm in @INC (@INC contains: /homepages/20/d90854451/htdocs/wsc90854459/movabletype/extlib /homepages/20/d90854451/htdocs/wsc90854459/movabletype/lib /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 /usr/local/lib/site_perl .) at /homepages/20/d90854451/htdocs/wsc90854459/movabletype/mt.cgi line 21.

Or mt-load.cgi would give me:

An error occurred while loading data:

Can't find default template list; where is 'default-templates.pl'?
Error: Can't locate MT/default-templates.pl in @INC (@INC contains: /homepages/20/d90854451/htdocs/wsc90854459/movabletype/extlib /homepages/20/d90854451/htdocs/wsc90854459/movabletype/lib /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 /usr/local/lib/site_perl .) at /homepages/20/d90854451/htdocs/wsc90854459/movabletype/mt-load.cgi line 30.


Posted by: John at January 5, 2004 2:56 PM

Oh, and mt-check.cgi works fine :-\

Posted by: John at January 5, 2004 2:58 PM

Argh. Easy solution - mv isn't recursive :D

Posted by: John at January 5, 2004 3:43 PM

John - sorry you had problems but I'm glad they're sorted out now.

Another Mike - I don't use any automated image support as I prefer to scale, sharpen and optimise each image individually but that's good information to know nonetheless.

Phillip - I'm proud to be your first commentor.


Graham - thanks for the complement. I'm taking back the word "amateur" for the serious enthusiast. I hate that "amateur", in the US at least, is an insult. Just because you're proffessional and get paid for something doesn't mean your work is great and visa versa.

Regards - Martin

Posted by: Martin at January 7, 2004 7:10 PM

I'm getting this error:

Loading initial data into system...

An error occurred while loading data:

Connection error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Haven't got a clue where to go from here. Any ideas?

Posted by: Darryl at January 19, 2004 2:04 PM

One thing to keep in mind though about buying a domain from 1and1 -- you can't change the nameservers. You are stuck with hosting that domain there. Be warned. :)

Posted by: Micah Goulart at January 22, 2004 2:02 PM

1. Micah, just so you know 1and1 recently changed that, you can now go in and point your domain name to another ip.

2. Darryl, I'm having the same problem, no ideas here yet =\

Posted by: Rich at January 28, 2004 8:52 PM

Darryl figured it out. Check out the following lines in the instructions from MT:

If your SQL database server is on a different host, you can use DBHost to specify the hostname:

DBHost database_host

For me this meant adding
"DBHost db72.perfora.net" at the bottom of mt.cfg and hitting mt-load again. Worked like a champ

Posted by: Rich at January 28, 2004 9:05 PM

I'm using MySQL and have done everything to the T and all cgis have run properly, however, Rebuild does not work. Please advise.

Posted by: David at February 25, 2004 9:55 AM

Hey Rich, thanks for the DBHost database_host tip. I kept getting errors all weekend trying to figure this out but now my blog is working. =)

Posted by: James Reyes at March 14, 2004 8:01 PM

Hey, nice work, wish I had found your tutorial earlier. I had a few days worth of work setting up MT at 1and1. I used the berkeley db option, since I had no clue about how to set up MySql.

Posted by: Stephen at March 20, 2004 9:00 PM

I know this was brought up before, but John, what did you mean by "mv isn't recursive"..? I'm getting the same error...

Posted by: Josh at March 29, 2004 3:38 PM

hehe, i just re-uploaded my lib folder and it's fine... :P

Posted by: josh at March 29, 2004 3:53 PM

i keep getting an internal 500 error, any ideas? I want to think I did everything correct but that obviously isn't the case.

Posted by: Jon Taylor at April 14, 2004 5:24 PM

I'm trying to load up Movable Type and I keep getting this error:

Bad ObjectDriver config: Your DataSource directory ('...') does not exist. (purposely took out folder names)

Ian

Posted by: Ian at October 7, 2004 3:18 PM

I am trying to connect to the MySQL DB through MySQL query browser and am running into some walls here...
So far i've setup a ssh tunnel w/ putty but am still unable to connect. Has anyone out there done this successfully? Any Info will help...

Thanks

Posted by: Ben Sullins at January 19, 2005 9:10 PM

Hi I get the error:
Connection error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

So I added this to my mt.cfg "DBHost db72.perfora.net" like I read up top and I get this error:

Bad ObjectDriver config: Connection error: Access denied for user: 'dbo119334591@infong223.kundenserver.de' (Using password: YES)

Posted by: moxx at February 13, 2005 12:07 AM

nevermind :( I had the wrong db. I'm @ 151 not 72 or whatever i copied.

Posted by: moxx at February 13, 2005 12:47 AM

Solution is here:

http://www.gadgetdope.com/archives/000043_movable_type_database_error.html

Posted by: Vic Gray at September 17, 2005 12:09 PM