Yii2 Advanced With Vagrant

Yii2 advanced app setup with Vagrant / Debian 7.1 / PHP 5.4
Alternatives To Yii2 Advanced With Vagrant
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Dev Setup5,802
9 months ago34otherPython
macOS development environment setup: Easy-to-understand instructions with automated setup scripts for developer tools like Vim, Sublime Text, Bash, iTerm, Python data analysis, Spark, Hadoop MapReduce, AWS, Heroku, JavaScript web development, Android development, common data stores, and dev-based OS X defaults.
Onebody1,408
2 years ago12agpl-3.0Ruby
private member portal for churches, built with Ruby on Rails
Lavagna607
3 months ago38December 30, 202128gpl-3.0Java
Lavagna: issue tracker/project management tool
Gbt523
2 months ago1June 18, 20212mitGo
Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Laravel4 Vagrant499
8 years ago18Ruby
Run Laravel4 inside a Ubuntu 12.04 Vagrant Virtual Machine w/PHP 5.5
Vagrant Php Dev Box478
3 years ago5
PHP 7 vagrant development box with nginx, php-fpm, MySQL, Symfony, Laravel, ... on Ubuntu 16.04
Ansible Playbooks466
5 years ago1mitPython
Ansible playbook collection that have been written for Ubuntu. Some of the playbooks are Elasticsearch, Mesos, AWS, MySql, Sensu, Nginx etc..
Lodge462
4 years ago28mitJavaScript
イントラネット内で誰でも構築できる情報共有サービス
Vagrant Lamp Stack445
7 years ago13PHP
A dead-simple LAMP stack without any bells and whistles for your basic Linux/Apache/MySQL/PHP install.
Arcemu326
2 days ago112agpl-3.0C
World Of Warcraft 3.3.5a server package
Alternatives To Yii2 Advanced With Vagrant
Select To Compare


Alternative Project Comparisons
Readme

Vagrantfile & Puppet manifests for Yii2

Requirements

You just need Vagrant, VirtualBox and vagrant-hostmanager

Install vagrant-hostmanager as follows:

vagrant plugin install vagrant-hostmanager

How start

Edit the Vagrantfile: vim Vagrantfile

  • Change the VM IP if needed. Default is: 192.168.200.20 (192.168.200.1 is your machine)
  • Change the RAM or number of CPUs if needed.
  • On the puppet part: change the factors
    • Change hostname with the development domain of your website
    • Change db_* variables with your information or keep default values
    • If you change the document_root don't forget to change the synced directory

Then up the VM: vagrant up

Now you can access to your Yii setup : http://www.yii2.dev

MySQL

You need to use an SSH connection.

With the information below you can connect to the MySQL server running on the virtual machine.

Default information

  • SSH Host: 192.168.200.20
  • SSH User: vagrant
  • SSH Pass: vagrant
  • SSH Port: 2222 (default by vagrant)
  • MySQL Host: 127.0.0.1
  • MySQL Port: 3306
  • MySQL User: yii2
  • MySQL Pass: yii2

Import database

If file exists database.sql.gz in the main directory (where the Vagrantfile is), puppet will import the database during the first up.

Virtualhost

Per default the variable YII_DEBUG is set to true for this Apache setup, but will be false automatically on deploy.

The virtualhost is set on the htdocs directory.

Mails

MailCatcher is installed and configured into the /etc/php5/apache2/php.ini file.

How it works

If mailcatcher is stopped: all emails are lost.

If mailcatcher is started: all emails are catched.

If you want to start MailCatcher, simply run this command (with vagrant user) : mailcatcher --ip 0.0.0.0

Then go to : http://www.yii2.dev:1080

If you need to stop the mailcatcher daemon : Clic on "Quit" on the top right corner of the MailCatcher Web UI.

Packages

Are installed:

  • apache-mpm-itk (with yii2 virtualhost)
  • mysql-server (with custom my.cnf)
  • mysql-client
  • php5 (and the following modules)
    • bcmatch
    • bz2
    • calendar
    • ctype
    • curl
    • date
    • dba
    • dom
    • ereg
    • exif
    • fileinfo
    • filter
    • ftp
    • gd
    • gettext
    • hash
    • iconv
    • intl
    • json
    • libxml
    • mbstring
    • mcrypt
    • mhash
    • mysql
    • mysqli
    • openssl
    • pcre
    • pdo
    • pdo_mysql
    • phar
    • posix
    • readline
    • reflection
    • session
    • shmop
    • simplexml
    • soap
    • sockets
    • spl
    • sysvmsg
    • tidy
    • tokenizer
    • wddx
    • xdebug
    • xml
    • xmlreader
    • xmlwriter
    • zip
    • zlib
  • screen (with custom .screenrc for root)
  • vim
  • wget
  • curl
  • git
  • composer.phar
  • mailcatcher (gem)

Credit

Giving credit where credit is due. Almost all of the hard work on this was done here: monsieurbiz/vagrant-magento

I just forked and tweaked it to work well with Yii 2

Popular Vagrant Projects
Popular Mysql Projects
Popular Virtualization Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Php
Mysql
Vagrant
Ssh
Puppet
Yii Framework