TYPO3 Enterprise CMS On An ISPConfig Server Within 10 Easy Steps

Version 2.0
Author: <hans> [at] bb-hosting [dot] org>

TYPO3 is an advanced Enterprise class CMS.
I wrote this “how to” for those who want to run this CMS on their ISPConfig server.
Probably you can setup TYPO3 in different ways but I prefer the way descibed here.
I assume also that this is your first TYPO3 setup and that your webs are stored under /var/www/

In this how to, I will use just as an example:
- A TYPO3 version 4.2.0 installation
- Website: www.mytypo3website.tld
- MySQL database: webdb1
- MySQL username: web1u1
- FTP username (administrator for the website): webadmin

Let’s show where our ISPConfig server is capable of, here we go:

STEP 1 - Create a website:

In ISPConfig, create a website via “New site” in the main menu.
On the tab called “Basis” use www for the hostname and mytypo3website.tld for the domain name. Enable MySQL and PHP scripts for this website but disable PHP Safe Mode.

STEP 2 - Create a Administator user for the website:

In ISPConfig, create an Administrator user, so you can upload/download the website later via FTP:
In the main menu select “ISP Manager”, select your new website called mytypo3website.tld in the structure tree and press the tab “User and Email”.
Press “new” and define a new user with the name "webadmin" and its email address. Give this user administrator rights and press “Save”.

STEP 3 - Create a MySQL database for the website:

Click on the tab called “Options” and create a new database for the website.
ISPConfig will show you:

Database name: web1db1
Database user: web1u1

Then you define a password for the database user and press “Save”.

STEP 4 – Download/extract the packages and remove the tar.gz files:

cd /var/www/web1/web/

Download the TYPO3 version 4.2.0 source

wget http://surfnet.dl.sourceforge.net/sourceforge/typo3/typo3_src-4.2.0.tar.gz

(At this point choose your nearest download location at Sourceforge).

Download the TYPO3 version 4.2.0 dummy:

wget http://surfnet.dl.sourceforge.net/sourceforge/typo3/dummy-4.2.0.tar.gz

(At this point choose your nearest download location at Sourceforge).

Unpack the downloaded files:

tar xvfz typo3_src-4.2.0.tar.gz
tar xvfz dummy-4.2.0.tar.gz

Remove the tar.gz files:

rm *.tar.gz

STEP 5 - Move the dummy contents to the web directory and delete the empty directory:

cd dummy-4.2.0
mv * ../
cd ../
rmdir dummy-4.2.0

You can have several TYPO3 installations with just one source package.
So create a global source directory for TYPO3 version 4.2.0, move the TYPO3 source to it and delete the empty directory:

mkdir /var/www/typo3_src-4.2.0
cd typo3_src-4.2.0
mv * /var/www/typo3_src-4.2.0/
cd ../
rmdir typo3_src-4.2.0

STEP 6 - Define the ownership & permissions:

(Remember that web1 and webadmin are just an example for the webnumber and administrator)

cd /var/www/web1/
chown -R -v -f webadmin:web1 web/
cd /var/www/web1/web/
chgrp -R www-data fileadmin typo3conf typo3temp uploads
chmod -R g+w,o-rwx fileadmin typo3conf typo3temp uploads

Create a symlink between the TYPO3 version 4.2.0 source and the typo3_src within your web:
First remove the empty typo3_src file:

rm typo3_src

and then enter the command:

ln -s /var/www/typo3_src-4.2.0 /var/www/web1/web/typo3_src

As you see, different TYPO3-installations (possibly with different domains) can use the same TYPO3 source package. You can even change the source package simply by changing the symlink inside the installation directory.

STEP 8 – Enable the TYPO3 install tool:

If you point to your new TYPO3 website http://mytypo3website.tld you will notice that you can not proceed the installation, because the TYPO3 install tool has been locked for security reasons. To enable the install tool, you must create an empty textfile with the name "ENABLE_INSTALL_TOOL" within the directory /var/www/web1/web/typo3/typo3conf.

STEP 9 – Start TYPO3 installation tool:

In your favourite browser, point to http://mytypo3website.tld where you will see the TYPO3 1-2-3 installation tool.

Fill in the fields with:

Username: web1u1
Password: MySQL password as defined within ISPConfig
Hostname: localhost

Follow the instructions within the TYPO3 1-2-3 installation tool.

After step 3 (within the install tool) and for security reasons, you have to change the default password for the TYPO3 install tool and the admin password, which is needed for the backend of the CMS. After all do NOT forget to remove the file "ENABLE_INSTALL_TOOL" within the directory /var/www/web1/web/typo3/typo3conf, which is necesarry to lock the TYPO3 installer again!

STEP 10 – Change resource limits within your PHP.ini file:

Probably, this final step is only necessary if you have php-memory errors or TYPO3 is not functioning properly.
Logon as root on your ISPConfig server and edit the file /etc/php4/apache2/php.ini
Give the resource limits these values:

max_execution_time = 60
max_input_time = 60
memory_limit = 64M
post_max_size = 12M

After changing your php.ini file you must restart Apache with the command:

/etc/init.d/apache2 restart

Note:
The location of your php.ini file is for Debian Linux systems.
The way you restart Apache2 and the location of your php.ini file can be different on other Linux distros.

Important:
You can not use php5-cgi+suPHP for your TYPO3 website as it conflicts with the suPHP mechanism. To get your TYPO3 site up and running do the following:
Log in to your server as root and enable the php5 module for Apache2:

a2enmod php5

Restart Apache2 with:

/etc/init.d/apache2 force-reload

Within ISPConfig, disable PHP for the TYPO3 website and add the following within the Apache directives field for your TYPO3 site:

<Directory /var/www/web1/web>
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
</Directory>

(Where "web1" is your own web number as provided by ISPConfig)

Now your ISPConfig server with Debian Etch, uses PHP5-mod for your TYPO3 site in stead of php5-cgi+suPHP.

Share this page:

5 Comment(s)