This repository will help you install MediaWiki on AWS in fully automated fashion using Terraform and userdata script
Setup the machine if provisioning from RHEL linux - setup.sh
chmod +x setup.sh
./setup.sh
Change the access and secret keys in main.yml
terraform init
The terraform init command is used to initialize a working directory containing Terraform configuration files.
terraform plan
The terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure
terraform apply
The terraform apply command executes the actions proposed in a Terraform plan.
- Wait for couple of minutes(be patient) before mediawiki is being installed and configured. Use the output displayed on the screen in place of serverip http://serverip/w/index.php
- Select the setup link, and proceed through the setup steps. Choose the MariaDB option when prompted for a database server, and enter the database name, username, and user password you created for MediaWiki.
- Download the LocalSettings.php file when prompted at the end of the setup process, then move it or copy its contents to /var/www/html/w/LocalSettings.php
- Adjust the file’s permissions
sudo chmod 664 /var/www/html/w/LocalSettings.php
terraform destroy
The terraform destroy command is a convenient way to destroy all remote objects managed by a particular Terraform configuration.