A simple provisioning Vagrant bootstrap to be ready for PHP/MySQL development.
If you have using Symfony2, please see the branch named symfony2.
- Apache 2 with rewrite mod and ready VHOST with "/var/www" moved to "/vagrant"
- PHP 5.x (last stable release, now 5.5.x. You can choose older stable version in bootstrap.sh, see PHP part)
- PHP packages : php5-cli php5-mysql php5-curl php5-mcrypt php5-gd php-pear php5-xdebug php5-intl
- MariaDB (MySQL) with custom database and root remote access (no password)
- Some essential packages : build-essential git-core vim curl
- 22 (SSH) > 2222
- 80 (HTTP) > 8000
- 3306 (MySQL) > 33060
You need to edit some custom parameters in the file ".vagrant_bootstrap/parameters.sh" :
Database parameters :
DATABASE_NAME: your database name. If empty, no database will be created.DATABASE_ROOT_HOST: allowed host for the ROOT user. Put "localhost" (by default), for localhost access only (more secure in prod, for example), 10.0.2.2 for you host access only or "%" for remote access (usefull to access to the database from your remote database software).
PHP parameters :
PHP_TIMEZONE: the PHP timezone (default: "UTC"). Check possible values here : http://php.net/manual/en/timezones.php
Do not forget to run the command vagrant reload with --no-provision option to disable provisioning.
Feel free to fork me !