This guide installs a TYPO3 base stack with Nginx, PHP-FPM, MariaDB, and Composer.
It supports Debian 10 to latest stable, Ubuntu LTS, and RHEL 9+ compatible systems.
- name: Install TYPO3
hosts: typo3
become: true
vars:
typo3_root: /var/www/typo3
tasks:
- name: Install dependencies on Debian/Ubuntu
apt:
name:
- nginx
- mariadb-server
- php-fpm
- php-mysql
- php-xml
- php-mbstring
- php-curl
- php-zip
- php-intl
- php-gd
- composer
- unzip
- curl
- git
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install dependencies on RHEL family
dnf:
name:
- nginx
- mariadb-server
- php
- php-fpm
- php-mysqlnd
- php-xml
- php-mbstring
- php-curl
- php-zip
- php-intl
- php-gd
- composer
- unzip
- curl
- git
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start required services
service:
name: "{{ item }}"
state: started
enabled: true
loop:
- nginx
- mariadb
- php-fpm
- name: Create TYPO3 project via Composer
command: composer create-project typo3/cms-base-distribution {{ typo3_root }}
args:
creates: "{{ typo3_root }}/composer.json"
Beyond this playbook, we offer:
Contact our automation team: office@linux-server-admin.com