[TYPO3-dev] auto-installer support

Rowan Crawford rowan at sumaleth.com
Wed Jan 24 01:48:04 CET 2007


"Christopher Torgalson" wrote:
> I also think you will not get very many useful responses unless you
> say what these 'hoops' /are/.
>
> I admit that I don't actually understand what would be particularly
> difficult about an automated TYPO3 installer--essentially, you have a
> set group of files and directories to write at the initial install,
> and a smaller set to overwrite at upgrade. System config information
> is stored in a text file. These requirements are essentially identical
> in outline with Drupal, Xaraya and many other web apps.
>
> What is it about TYPO3 makes this process particularly demanding?

Sorry, I should have been more descriptive.

The steps we currently take to auto-install typo3 are:

1. pre-make .sql file.

I install typo3 by hand, then use phpmyadmin to extract a .sql file. This is 
then archived and cached on the server along with the src and dummy 
archives.

2. collect user information

This is install location, database details, password, accept license.

3. extract archives

Src, dummy and the database archives are extracted.

4. remake directories

We use the zip archives for the installer, and when a zip file is extracted 
on most linux systems the empty directories are deleted. So with each typo3 
release I go through the archives looking for empty directories, and 
recreate them at this step.

Most scripts put index.htm files in empty directories to stop them being 
deleted, that might be something you'd consider?

5. chmods

6. update localconf.php

Here it makes the changes to localconf.php that typo3's install process 
would have done, including changing the default password, adding the 
database stuff, adding the encryption key, and changing the compat_version 
to 4.0.

7. database

Edit the .sql file to add the user's password, then import the .sql into the 
database that was created for this install.

--

That was as complete as I was able to make the install. When the user logs 
into administration they'll see a typo3 warning about the Reference Index 
table, which can be fairly easily fixed by following the information, though 
the path it gives to the fix tool isn't completely verbatim so there's a 
little uncertainty in completing that manual step.

The script refindex_cli.phpsh is provided to perform that task 
automatically, though I was never able to get that script to work, even when 
run manually from the shell.

--

There's a lot of uncertainty in the steps listed above, meaning that I'm 
never quite sure if I've accurately replicated enough to result in a perfect 
install, and the number of fixes I've had to make suggests that I've got it 
wrong more times than I'd like. Which lead to the decision to drop the 
installer, but when I saw 4.1 was in the works I thought I'd see what the 
final form of that looks like first.

Typo3's 3.8.x series was actually a bit easier to auto-install. That iTron 
installer simply added the database values to localconf.php and then sent 
the user to this:

typo3/install/index.php?TYPO3_INSTALL[type]=database&mode=123&step=3

It wasn't perhaps quite as nice as a proper auto-install would have been 
(where it's all performed internally -- the ideal for an auto-installer is 
to completely install/upgrade a script without the user needing to read 
anything, and without the user needing think about what they're doing), but 
that link took the user straight to a page that let them click a button that 
run the rest of the install. It was pretty foolproof, though unfortunately 
that approach didn't work with the release of 4.0.

--

For comparison, the auto-install steps for most scripts is something like 
either this:

1. extract archive(s)
2. chmod
3. add db information to config file
4. import .sql (provided as part of the release)
5. edit db table cell to add password

or:

1. extract archive(s)
2. chmod
3. add db information to config file
4. call install.php script over a socket (perhaps with url like 
install.php?step=2 to skip a prompt; socket means there's no user 
interaction or visual output)
5. edit db table cell to add password

And upgrading would be:

1. extract archive(s)
2. re-chmod
3. import .sql to make db changes

or:

1. extract archive(s)
2. re-chmod
3. call upgrade.php over a socket

--

That basically covers everything I think. I can go into more detail if it's 
useful, just let me know.

If it's not something you're interested in adding support for that's cool, I 
just thought I'd ask.

Rowan.






More information about the TYPO3-dev mailing list