Skip to content

Quickly create a local Vagrant development environment running Debian 11 & PHP 8.1 to create or test your application(s).

License

Notifications You must be signed in to change notification settings

wesbuck/provision-debian-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub tag (latest SemVer) GitHub License vagrant up

vagrant-debian-php

Quickly deploy a local Vagrant box running Debian 11 & PHP 8.1 to develop or test your application(s). Comes with MariaDB (MySql) and PHPMyAdmin set up and ready to go.

Installation

Download & Install:

  • VirtualBox (latest version, tested with 6.1.26)
  • Vagrant (latest version, tested with 2.2.18)
  • this repo

Update Configuration

If you intend on using git repos in your Vagrant box, open up the .gitconfig file and fill out your name & email address.

Any of the default settings can be changed in the provisions.sh file:

## Server settings
SERVER_TIMEZONE="America/Toronto"

## Database settings
ROOT_DB_PASSWORD="rpass"
ADMIN_DB_NAME="admin"
ADMIN_DB_PASSWORD="apass"

## PHP settings
PHP_VERSION="8.1"
PHP_MODULES=(curl json xml dev gd mbstring zip mysql imagick mcrypt soap cli memcached redis gmp mongodb odbc pgsql sqlite3 xsl)

You can probably delete many of the PHP modules to speed up server installation.

Spin Up Vagrant Server.

Browse to the directory of this repo in a shell. Git Bash works well for Windows.

Run vagrant up, then wait awhile for it to complete. Connection details will be displayed once the server is ready. That's it!

Run vagrant ssh to control your server directly.

By default, phpMyAdmin should be available at http://192.168.33.10/phpmyadmin/ with the username admin and password apass.

Add other Repos

Clone any repo(s) you'd like into the webroot directory, preferably applications built for PHP 8 & MySQL (MariaDB).

They will be avaiable at http://192.168.33.10/[directory]/

Shut it down

When you're done for the day, run vagrant halt to shut down the server.

If you want to wipe the server entirely, run vagrant destroy -f.

About

Quickly create a local Vagrant development environment running Debian 11 & PHP 8.1 to create or test your application(s).

Topics

Resources

License

Stars

Watchers

Forks

Languages