Advertisement
SH1NU11b1

Vagrant Directions

Feb 25th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. vagrant mkdir []
  2. cd []
  3.  
  4. vagrant init {title}
  5.  
  6. vagrant box add {title} {url}
  7.  
  8. vagrant up
  9.  
  10.  
  11. *******************************Example**************
  12. # -*- mode: ruby -*-
  13. # vi: set ft=ruby :
  14.  
  15. # All Vagrant configuration is done below. The "2" in Vagrant.configure
  16. # configures the configuration version (we support older styles for
  17. # backwards compatibility). Please don't change it unless you know what
  18. # you're doing.
  19. Vagrant.configure(2) do |config|
  20. # The most common configuration options are documented and commented below.
  21. # For a complete reference, please see the online documentation at
  22. # https://docs.vagrantup.com.
  23.  
  24. # Every Vagrant development environment requires a box. You can search for
  25. # boxes at https://atlas.hashicorp.com/search.
  26. config.vm.box = "wheezy64"
  27. config.vm.box_url = "https://www.dropbox.com/s/23gupgb0xompvkm/Wheezy64.box?dl=1"
  28.  
  29. # Disable automatic box update checking. If you disable this, then
  30. # boxes will only be checked for updates when the user runs
  31. # `vagrant box outdated`. This is not recommended.
  32. # config.vm.box_check_update = false
  33.  
  34. # Create a forwarded port mapping which allows access to a specific port
  35. # within the machine from a port on the host machine. In the example below,
  36. # accessing "localhost:8080" will access port 80 on the guest machine.
  37. config.vm.network:forwarded_port, guest: 80, host: 8080
  38.  
  39. # Create a private network, which allows host-only access to the machine
  40. # using a specific IP.
  41. config.vm.network:private_network, ip: "192.168.33.10"
  42.  
  43. # Create a public network, which generally matched to bridged network.
  44. # Bridged networks make the machine appear as another physical device on
  45. # your network.
  46. # config.vm.network "public_network"
  47.  
  48. # Share an additional folder to the guest VM. The first argument is
  49. # the path on the host to the actual folder. The second argument is
  50. # the path on the guest to mount the folder. And the optional third
  51. # argument is a set of non-required options.
  52. # config.vm.synced_folder "../data", "/vagrant_data"
  53.  
  54. # Provider-specific configuration so you can fine-tune various
  55. # backing providers for Vagrant. These expose provider-specific options.
  56. # Example for VirtualBox:
  57. #
  58. # config.vm.provider "virtualbox" do |vb|
  59. # # Display the VirtualBox GUI when booting the machine
  60. # vb.gui = true
  61. #
  62. # # Customize the amount of memory on the VM:
  63. # vb.memory = "1024"
  64. # end
  65. #
  66. # View the documentation for the provider you are using for more
  67. # information on available options.
  68.  
  69. # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  70. # such as FTP and Heroku are also available. See the documentation at
  71. # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  72. # config.push.define "atlas" do |push|
  73. # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  74. # end
  75.  
  76. # Enable provisioning with a shell script. Additional provisioners such as
  77. # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  78. # documentation for more information about their specific syntax and use.
  79. # config.vm.provision "shell", inline: <<-SHELL
  80. # sudo apt-get update
  81. # sudo apt-get install -y apache2
  82. # SHELL
  83. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement