This guide installs an October CMS base stack using Nginx, PHP-FPM, MariaDB, and Composer.
It supports Debian 10 to latest stable, Ubuntu LTS, and RHEL 9+ compatible systems.
- name: Install October CMS
hosts: octobercms
become: true
vars:
october_root: /var/www/octobercms
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
- 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
- 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 October CMS project with Composer
command: composer create-project october/october {{ october_root }}
args:
creates: "{{ october_root }}/composer.json"
We develop tailored automation solutions for:
Let’s discuss your requirements: office@linux-server-admin.com | Contact