CentOS or RedHat and Laravel
Just wrapped up setting up two RedHat servers (version 7) and one CentOS Virtual box so I could deploy a Laravel site.
Code is here
Thanks to Ansible it was not as bad as it could have been.
I am not an ansible expert just getting into it as we need to do this more. What these scripts will do is
- Setup a CentOS Vagrant box
- Setup a Server for Laravel and Queues SupervisorD
- Setup up SSHD to be key based only you can remove this
- Setup Cron to run scheduler
- Setup SSL if you make the keys for this
- Redirect to https for site
Step one is to install Ansible on your Mac and then
In there I have
[local] 192.168.1.22 [serverprod] 184.108.40.206 [serverstage] 220.127.116.11
Local is the VM
I needed a local VM to run CentOS since I did not have RedHat but it is close enough. I downloaded the ISO installed it the old fashion way on VirtualBox then I ran my ansible scripts against it. You can see this line in the readme.md
ansible-playbook --limit local -s centos.yml -u centos -k --ask-sudo-pass --extra-vars "user=centos"
Now that that is set I can hit it with my nginx config
ansible-playbook --limit local -s nginx.yml -u centos --extra-vars "user=centos version=centos"
Okay now it should work?
As I note in the readme.md I then setup the RedHat servers. They where a bit tougher but it all worked out. Note SELinux might be on that is why I have some lines to allow things but they may not be enough for your setup.