Login / Status
developer.Resource
Home . Documentation . Document Library . Installation
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

3.3. .tgz distribution

The tgz distribution is the 'source code only' and is not accompanied with any testsite. It's also intended for Linux/UNIX filesystems because the .tgz-file contains relative symlinks.

The main point is - compared to the .zip distribution - that this directory is stored once in the file-structure (possibly writeprotected) on the UNIX server and then every site using this TYPO3 version symlinks the proper folders to the source. Thus you save space because you avoid redundant files and get easy maintenance if you do it right.

Internal symlinks

This is the internal symlinks in the tarball:

typo3/t3lib/ -> t3lib/
typo3/gfx/ -> typo3/t3lib/gfx/
typo3/thumbs.php -> t3lib/thumbs.php
tslib/ -> typo3/sysext/cms/tslib/

These are shown with gray in the picture. Actually if you extract the .tgz-file with winzip, you'll not see the symlinked folders (gray) in typo3/. They are removed (see notice on previous page about this!)

The folders

t3lib/, tslib/, tslib/media, and typo3/ (red folders) are the main directories which should be symlinked to the actual website running TYPO3.

misc/ contains information from previous TYPO3 releases.

files in the root: Documents related to the current release, eg. changelog.

Using the source distribution effectively

As I wrote the source distribution provides a minimum of space usage and maintenance if used intelligently. This is my suggestion:

  1. Extract the .tgz file somewhere on your server

  2. From the directory holding the root-directory of you site, create a symlink to the source folder. Call it 'typo3_src':

drwxr-xr-x   7 httpd    httpd        4096 Aug  3 10:24 .
drwxr-xr-x  12 httpd    httpd        4096 Aug  1 13:52 ..
drwxr-xr-x   6 httpd    httpd        4096 Aug  1 14:09 testsite-3.6.0
lrwxrwxrwx   1 root     root           15 Aug  1 13:58 typo3_src -> typo3_src-3.6.0/
drwxr-xr-x   9 httpd    httpd        4096 Aug  7 00:37 typo3_src-3.6.0

(The green 'testsite-3.6.0' is the TYPO3 website. The blue 'typo3_src-3.6.0' is the source distribution as it was un-tarred. The red is the symlink to the source distribution. You create such a symlink from shell like this:

ln -s ./typo3_src-3.6.0 typo3_src

)

  1. In the root of your site, create symlinks for t3lib/, tslib/ and typo3/ main-folders to the main-folders in the newly created 'typo3_src' symlink in the parent folder.

drwxr-xr-x   6 httpd    httpd        4096 Aug  1 14:09 .
drwxr-xr-x   7 httpd    httpd        4096 Aug  3 10:24 ..
-rwxr-xr-x   1 httpd    httpd          46 Sep  7  1999 clear.gif
drwxr-xr-x   5 httpd    httpd        4096 Apr 13 00:30 fileadmin
lrwxrwxrwx   1 httpd    httpd          18 Aug  1 13:54 index.php -> tslib/index_ts.php
lrwxrwxrwx   1 httpd    httpd          12 Aug  1 13:54 media -> tslib/media/
-rwxr--r--   1 httpd    httpd          56 Sep 25  2000 mod_rewrite.htaccess
lrwxrwxrwx   1 httpd    httpd          17 Aug  1 13:54 showpic.php -> tslib/showpic.php
lrwxrwxrwx   1 httpd    httpd          19 Aug  1 13:54 t3lib -> ../typo3_src/t3lib/
lrwxrwxrwx   1 httpd    httpd          19 Aug  1 13:54 tslib -> ../typo3_src/tslib/
lrwxrwxrwx   1 httpd    httpd          19 Aug  1 13:54 typo3 -> ../typo3_src/typo3/
drwxr-xr-x   2 httpd    httpd        4096 Aug  6 22:54 typo3conf
drwxr-xr-x   2 httpd    httpd        4096 Aug  6 22:31 typo3temp
drwxr-xr-x   6 httpd    httpd        4096 Nov 12  1999 uploads

  1. In the root of your site, create symlinks to tslib/media/, tslib/showpic.php and tslib/index_ts.php (call this one 'index.php').

drwxr-xr-x   6 httpd    httpd        4096 Aug  1 14:09 .
drwxr-xr-x   7 httpd    httpd        4096 Aug  3 10:24 ..
-rwxr-xr-x   1 httpd    httpd          46 Sep  7  1999 clear.gif
drwxr-xr-x   5 httpd    httpd        4096 Apr 13 00:30 fileadmin
lrwxrwxrwx   1 httpd    httpd          18 Aug  1 13:54 index.php -> tslib/index_ts.php
lrwxrwxrwx   1 httpd    httpd          12 Aug  1 13:54 media -> tslib/media/
-rwxr--r--   1 httpd    httpd          56 Sep 25  2000 mod_rewrite.htaccess
lrwxrwxrwx   1 httpd    httpd          17 Aug  1 13:54 showpic.php -> tslib/showpic.php
lrwxrwxrwx   1 httpd    httpd          19 Aug  1 13:54 t3lib -> ../typo3_src/t3lib/
lrwxrwxrwx   1 httpd    httpd          19 Aug  1 13:54 tslib -> ../typo3_src/tslib/
lrwxrwxrwx   1 httpd    httpd          19 Aug  1 13:54 typo3 -> ../typo3_src/typo3/
drwxr-xr-x   2 httpd    httpd        4096 Aug  6 22:54 typo3conf
drwxr-xr-x   2 httpd    httpd        4096 Aug  6 22:31 typo3temp
drwxr-xr-x   6 httpd    httpd        4096 Nov 12  1999 uploads

The upgrade advantage

The advantages of this approach is apparently that when you wish to upgrade to a new TYPO3 version, you simply change one symlink and every distributed TYPO3 file is upgraded instantly - on as many sites as you like!

Example:

drwxr-xr-x   8 httpd    httpd        4096 Aug  7 01:07 .
drwxr-xr-x  12 httpd    httpd        4096 Aug  1 13:52 ..
drwxr-xr-x   6 httpd    httpd        4096 Aug  1 14:09 testsite
lrwxrwxrwx   1 root     root           15 Aug  1 13:58 typo3_src -> typo3_src-3.5.0/
drwxr-xr-x   9 httpd    httpd        4096 Aug  1 00:37 typo3_src-3.5.0
drwxr-xr-x   9 httpd    httpd        4096 Aug  7 00:37 typo3_src-3.6.0

Then do this from shell:

rm ./typo3_src
ln -s typo3_src-3.6.0 typo3_src

.. and this is what you get:

drwxr-xr-x   8 httpd    httpd        4096 Aug  7 01:07 .
drwxr-xr-x  12 httpd    httpd        4096 Aug  1 13:52 ..
drwxr-xr-x   6 httpd    httpd        4096 Aug  1 14:09 testsite
lrwxrwxrwx   1 root     root           15 Aug  1 13:58 typo3_src -> typo3_src-3.6.0/
drwxr-xr-x   9 httpd    httpd        4096 Aug  1 00:37 typo3_src-3.5.0
drwxr-xr-x   9 httpd    httpd        4096 Aug  7 00:37 typo3_src-3.6.0

Remember the Install Tool!

After switching the sources around you have to enter the Install Tool of every single site that is sharing the upgraded source and updated any changes that is required in the database and clear the cache tables.