As mentioned in the previous chapter, a LEMP stack is composed of the following elements:
- Linux: In our case, this will be CentOS 7 again
- NGINX: If you remember, it is pronounced as engine-x, and replaces Apache in our stack
- MariaDB: As we have seen, this will be the database component
- PHP: We will be using PHP 7.2 again for this
Before we install WordPress, we need to install and configure these components. Also, as this playbook is eventually going to be executed against publicly available cloud servers, we need to think about some best practices around our NGINX configuration.
Let's start by getting the initial structure of the playbook set up:
$ mkdir lemp lemp/group_vars
$ touch lemp/group_vars/common.yml lemp/production lemp/site.yml lemp/Vagrantfile lemp/.gitignore
$ cd lemp
Now that we have the basic layout, we need to put some content in the...