Set up a virtual development environment for PHP automatically
In this tutorial we will use Vagrant, Puppet and Composer to set up a virtual development environment that can be replicated infinitely with very little effort.
In this tutorial we will use Vagrant, Puppet and Composer to set up a virtual development environment that can be replicated infinitely with very little effort.
In this tutorial we will go through each step needed to set up a Web server at home using an old computer, an Internet connection (with access to the configuration of your router) and some spare time. In the end of this tutorial you will have a server that displays web pages, serves files in a cloud, works with FTP, sends e-mail alerts, does automatic backup of data and, of course, that you can access from anywhere in the world.
VIM is a great text/code editor but not so user-friendly. Take some time to learn how to use it and it will seem much more friendlier then. On VIM you need to enter the ---INSERT-- mode to be able to edit your file like a regular text editor. To do this press the "i" key and you will see the 'insert' message at the bottom. Press Escape to exit the insert mode. Keep in mind that the commands below will not work if you are in the insert mode so you have to keep pressing "i" and "Esc" to get in and out of the insert mode. Now try some of the other commands:
This is a tricky part of this tutorial because it involves a lot of exploration and uncertainty. Every network and every router is different and I can't provide instructions for all of them. This page will give you the general concepts that will help you to find what we are looking for in your particular network.
These configurations are optional too, you don't have to do this if you just want to tinker with a server.
Servers should usually stay turned on all the time. In the event of a power failure you can configure your server to turn on as soon as the power is back. Of course, if you have a no-break that can keep your server running it's even better but even no-breaks can run out of battery.