Cool Solution - TYPO3
From Univention Wiki
This Article describes the installation of the content management system TYPO3 using the Univention Corporate Server Version 4.1, and focuses on how to configure a LDAP plugin against an UCS LDAP server to connect to the TYPO3 backend in order to edit the CMS website.
The following software must be installed in order to run TYPO3 6.2 LTS (which will receive maintenance and security-related bugfixes until March 2017):
TYPO3 can be installed on any Linux distribution meeting the requirements, like Debian or Ubuntu.
While Apache, PHP and ImageMagick is already preinstallad with UCS, the other required software packages must be installed manually. All dependencies can be installed from the standard UCS maintained repository (where
apt-get install of Debian is used internally):
univention-install php5-gd php5-imagick php5-mysql mysql-server
During the package installation Apache and MySQL are restarted automatically and are ready to use afterwards.
In this article it is assumed that TYPO3 will be installed in
/var/www/cms, so the TYPO3 frontend is located at
https://<SERVER>/cms/ and the TYPO3 backend for administration of the website be available later at
https://<SERVER>/cms/typo3/. The directory must be created first, then TYPO3 has to be downloaded, unpacked and moved. TYPO3 recommends to use symbolic links, this way TYPO3 can easily be upgraded later through the TYPO3 Install Tool. Afterwards the ownership must be corrected so the webserver can access the installation folder:
mkdir /var/www/cms wget get.typo3.org/6.2 --content-disposition tar xfz typo3_src-6.2.16.tar.gz mv typo3_src-6.2.16 /var/www/ cd /var/www/cms/ ln -s ../typo3_src-6.2.16 typo3_src ln -s typo3_src/index.php ln -s typo3_src/typo3 chown -R www-data:www-data /var/www/cms
One could create a separate virtual host for Apache webserver, which allows the use of TYPO3's .htaccess file, or execute the following commands:
ucr set apache2/allowoverride='All' service apache2 restart
TYPO3 prepare setup
To activate the initial setup, execute the following command:
https://<SERVER>/cms/ and follow the instructions in the web interface.
At first TYPO3 checks the environment and display an error about low upload filesize. Using the following commands, these check will be ok:
ucr set php/limit/filesize='10MB' ucr set php/limit/postsize='10MB' service apache2 restart
The warning about low PHP script execution time could be adjusted manually, or simply ignored, because for the LDAP integration the predefined 30 seconds are enough.
Create a new database and an user for TYPO3:
mysql -uroot -p$(cat /etc/mysql.secret) ## In MySQL CREATE DATABASE typo3; CREATE USER 'typo3_dbuser' IDENTIFIED BY '<SECRET PASSWORD>'; GRANT ALL ON typo3.* TO 'typo3_dbuser'; FLUSH PRIVILEGES; quit
Hint: Change "<SECRET PASSWORD>" to a secure value!
Continue with the setup wizard and fill in the values from the above created MySQL credentials:
The setup wizard asks for TYPO3 backend administrator credentials to create. At this point we use the same username as later for LDAP, otherwise we are locked out:
Then the new site name has to be defined i.e. the name of your company. Final we want to download the list of distributions, so leave the checkbox active.
By finalizing the setup wizard, the TYPO3 backend login is shown, where the administrator credentials should entered for login.
In this Example we will install "The official Introduction Package", this will create some example pages, which could be managed in the backend, while in the frontend the CMS website is shown.
TYPO3 LDAP plugin
The LDAP plugin to use an UCS LDAP server for TYPO3 backend logins has to be installed. In the left navigation select "Admin Tools > Extension Manager".
From the dropdown, switch to "Get Extensions" and search for the extension key "ig_ldap_sso_auth". Click the "Action" icon at the left side to import and install the extension.
From the dropdown, switch to "Manage Extensions" to edit the new installed extension name "LDAP / SSO Authentication". In the tab "backend", select the checkbox "Enable LDAP authentication for the backend" and click at the icon "Save and close" (below the dropdown).
In the left navigation of the backend select "Web > List" and select the "create new record" icon and select "Configuration LDAP / SSO". The values of the separate tabs are described in the following table:
Hint: To get the correct value for "LDAP_BASE" run the command
ucr get ldap/base on the command line of your server.
|Name||configuration name; ie. UCS|
|Mapping||[copy and use]|
|Local groups to be assigned||Simple editors|
Finally click at the icon "Save and close". Later the LDAP configuration record could be found by its name ie. UCS.
A LDAP user can now login into the TYPO3 backend with its LDAP credentials und start editing the CMS website.
To add TYPO3 frontend to the UCS overview site, set the following UCR variables:
ucr set \ ucs/web/overview/entries/service/cms/description/de="TYPO3 Frontend." \ ucs/web/overview/entries/service/cms/description="TYPO3 Frontend." \ ucs/web/overview/entries/service/cms/label/de="TYPO3" \ ucs/web/overview/entries/service/cms/label="TYPO3" \ ucs/web/overview/entries/service/cms/link="/cms/"
To add TYPO3 backend to the UCS overview site, set the following UCR variables:
ucr set \ ucs/web/overview/entries/service/cms-typo3/description/de="TYPO3 Backend." \ ucs/web/overview/entries/service/cms-typo3/description="TYPO3 Backend." \ ucs/web/overview/entries/service/cms-typo3/label/de="TYPO3" \ ucs/web/overview/entries/service/cms-typo3/label="TYPO3" \ ucs/web/overview/entries/service/cms-typo3/link="/cms/typo3/"
Hint: When TYPO3 is not installed on the UCS system, change the link accordingly.