This page describes how to install all components needed for a Typo3 php environment with debugger on a clean Ubuntu desktop. It assumes that you already have some experience with Linux.
Get ubuntu desktop iso from ubuntu.com and install it on a machine. You can use a free vmware environment to try it first.
The default installation of Ubuntu desktop lacks java, mysql, apache, php and graphicsmagick. You can install them from a terminal screen with the following commands:
sudo apt-get install mysql-server
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install php5-gd
sudo apt-get install php5-mysql
sudo apt-get install php5-xdebug
sudo apt-get install php5-cli
sudo apt-get install graphicsmagick
sudo apt-get install sun-java6-jre
Get PDT (a php ide for eclipse) from this website:
http://www.eclipse.org/pdt/
Get one of the full packages (i used pdt-all-in-one-R20080603-linux-gtk.tar.gz) and save it in your home directory.
While it is downloading, you can continue with setting up Apache2 and php5.
I changed the default directory for typo3 from /var/www to /var/www/typo3. That way, i can setup Typo3 with symlinks.
Enter the following commands to change permissions on the webroot:
sudo chown -R www-data:rob /var/www
sudo chmod -R ug+rw /var/www
Make sure you replace 'rob' with your username. With these commands you make www-data owner of the www directory and give rights to group 'rob' to read and write in it.
Download a typo3 source package and dummy package from typo3.org (i used typo3_src-4.2.1.tar.gz and dummy-4.2.1.tar.gz) and save them in /var/www. Then enter the following commands in a terminal window:
cd /var/www/
sudo tar -xvzf dummy-4.2.1.tar.gz
sudo mv dummy-4.2.1 typo3
sudo tar -xvzf typo3_src-4.2.1.tar.gz
sudo chown -R www-data:rob /var/www
sudo chmod -R ug+rw /var/www
To verify if your setup is right, you can use the following command:
ls -las
The result should be something like:
total 8200
4 drwxrwxr-x 4 www-data rob 4096 2008-08-20 18:04 .
4 drwxr-xr-x 16 root root 4096 2008-08-20 17:20 ..
12 -rw-rw-r-- 1 www-data rob 9436 2008-06-11 10:15 dummy-4.2.1.tar.gz
4 -rw-rw-r-- 1 www-data rob 45 2008-08-20 17:20 index.html
4 drwxrwxr-x 6 www-data rob 4096 2008-06-11 10:15 typo3
4 drwxrwxr-x 5 www-data rob 4096 2008-06-11 10:15 typo3_src-4.2.1
8168 -rw-rw-r-- 1 www-data rob 8351003 2008-06-11 10:15 typo3_src-4.2.1.tar.gz
And the following command:
ls -las typo3
Should give a result similar to:
total 56
4 drwxrwxr-x 6 www-data rob 4096 2008-06-11 10:15 .
4 drwxrwxr-x 4 www-data rob 4096 2008-08-20 18:04 ..
4 -rw-rw-r-- 1 www-data rob 46 2008-06-11 10:14 clear.gif
4 drwxrwxr-x 4 www-data rob 4096 2008-06-11 10:15 fileadmin
8 -rw-rw-r-- 1 www-data rob 5051 2008-06-11 10:14 _.htaccess
0 lrwxrwxrwx 1 www-data rob 19 2008-08-20 18:03 index.php -> typo3_src/index.php
8 -rw-rw-r-- 1 www-data rob 7087 2008-06-11 10:15 INSTALL.txt
8 -rw-rw-r-- 1 www-data rob 7695 2008-06-11 10:15 README.txt
4 -rw-rw-r-- 1 www-data rob 425 2008-06-11 10:15 RELEASE_NOTES.txt
0 lrwxrwxrwx 1 www-data rob 15 2008-08-20 18:03 t3lib -> typo3_src/t3lib
0 lrwxrwxrwx 1 www-data rob 15 2008-08-20 18:03 typo3 -> typo3_src/typo3
4 drwxrwxr-x 4 www-data rob 4096 2008-06-11 10:15 typo3conf
0 lrwxrwxrwx 1 www-data rob 18 2008-08-20 18:03 typo3_src -> ../typo3_src-4.2.1
4 drwxrwxr-x 2 www-data rob 4096 2008-06-11 10:15 typo3temp
4 drwxrwxr-x 5 www-data rob 4096 2008-06-11 10:15 uploads
Now you have to change the webroot in apache2 to the newly created directory. You do that by editing the file:
/etc/apache2/sites-available/default
Change these values:
Old value | New value |
|---|---|
DocumentRoot /var/www/ | DocumentRoot /var/www/typo3/ |
<Directory /var/www/> | <Directory /var/www/typo3/> |
Edit the file
/etc/php5/apache2/php.ini
and change the following settings:
Old value | New value |
|---|---|
Change memory_limit = 16M | memory_limit = 64M |
implicit_flush = Off | implicit_flush = On |
And add the following lines to the end of the file:
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
zend_extension="/usr/lib/php5/20060613+lfs/xdebug.so"
And edit the file
/etc/php5/cli/php.ini
and change the following settings:
Old value | New value |
|---|---|
Change memory_limit = 32M | memory_limit = 64M |
implicit_flush = Off | implicit_flush = On |
And add the following lines to the end of the file:
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
zend_extension="/usr/lib/php5/20060613+lfs/xdebug.so"
To enable the new settings, enter the following command in a terminal window:
sudo /etc/init.d/apache2 restart
Open a terminal window and type
cd
(and enter) to go to the home directory
Use the following command to unpack pdt:
tar -xzf pdt-all-in-one-R20080603-linux-gtk.tar.gz