Skip to content

Instantly share code, notes, and snippets.

@guipacheco2
Created May 30, 2014 00:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guipacheco2/8a86d4806763f26534ee to your computer and use it in GitHub Desktop.
Save guipacheco2/8a86d4806763f26534ee to your computer and use it in GitHub Desktop.
Vagrant

Vagrant

Plugins

  • vagrant plugin install vagrant-bindfs
  • vagrant plugin install vagrant-vbguest

Config BINDFS

Before installing bindfs, we need to install FUSE with development package using yum:

  • yum install fuse fuse-devel -y

Download bindfs at here and install:

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "chef/centos-6.5"
config.vm.provision :shell, path: "vm.sh"
config.vm.hostname = "VM"
# Static IP is required to use NFS shared folder
config.vm.network :private_network, ip: "172.16.0.111"
# Declare shared folder with Vagrant syntax
config.vm.synced_folder "../Projects", "/vagrant", :nfs => true
# Use vagrant-bindfs to re-mount folder
config.bindfs.bind_folder "/vagrant", "/var/projects"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.name = "VM"
end
end
sudo rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo yum -y update
sudo yum -y install vim gcc
sudo yum -y install httpd nginx16 redis rabbitmq-server mysql-server
sudo touch /etc/yum.repos.d/mongodb.repo
# [mongodb]
# name=MongoDB Repository
# baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
# gpgcheck=0
# enabled=1
# sudo yum -y install mongodb-org
sudo yum -y install php54w php54w-devel php54w-fpm php54w-mcrypt php54w-mysql php54w-gd php54w-mbstring php54w-pdo php54w-xml
sudo pecl install apc mongo
# sudo yum -y install imagemagick xpdf ghostscript
# sudo pecl install imagick ssh2 http1
# service php-fpm start
# service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment