VM / Dev problems for Mac/Windows development with PHP/MySQL/GIT

I currently have a problem with how to setup my virtual environment for my LAMP stack. The site I’m developing is a web application written in PHP and uses MySQL for the database. Right now, I have a single VM running inside Virtualbox with CentOS. I run the web/mysql server in it and have my code folder setup with GIT.

The host OS (Mac/Windows) currently is setup with a SAMBA share to access the code inside the GIT folder on the VM. From this, I use SourceTree and PHPStorm to manipulate the files and make commits. Permissions on the files/folders are set with a force mask (which doesn’t seem to be possible with NFS)

  • git repository gives 403 error while connecting from jenkins in linux
  • Trouble Installing Git on CentOS
  • Gitlab Configuration Issues:: NGINX Unicorn Port Conflict
  • Installing Git in Home Directory - CentOS 5 - NO ROOT
  • Install Omnibus Gitlab on subdomain
  • Configure git with Jenkins on Centos
  • (Samba server on CentOS(guest os), Samba client on Windows/Mac(host os))

    The problems occur on occasion when I run my environment like this. I’ve had my GIT repository have weird errors and corrupting (HEAD detaching, index files corrupting / being too small, other .git files corrupting). There is also an issue where the file names are case insensitive and the CentOS guest OS runs it as case sensitive.


    Ultimately, my questions is: How can I setup my development environment to execute the code inside my CentOS Guest OS, have file permissions not be a hassle when I’m commiting/executing, allow me to setup an environment that will match my multi-server environment (ie. multiple Virtualbox instances), and have it run into no or minor problems as if I was just running it all under CentOS for development?

    I would prefer to be able to run VirtualBox, be able to develop my software using my PHPStorm/SourceTree applications on my Host OS, and avoid any problems that lead to corruption of my filesystem in GIT.

  • Late-rename file after commit in git
  • How to add Bitbucket repository in to jenkins?
  • How to forbid Git merge certain branches
  • Why does 'git checkout' work only for some branches?
  • Docker-client Java API : The server failed to respond with a valid HTTP response
  • Git wont pull because of changed files
  • Git Baby is a git and github fan, let's start git clone.