- Install VirtualBox 5.0.14 or later.
- Install Vagrant
- Install Git
- Windows: Git for Windows
- Mac: Download or install via Homebrew
- Linux:
sudo apt-get install gitorsudo yum install git - (Optionally) install GitHub Desktop on Windows or Mac
- Open a shell prompt (on Windows, use Git Bash. You will probably need to right-click and choose
Run as Administrator). - Clone this repository
- Command-Line:
git clone https://github.com/ProfAvery/node-box.git - via GitHub Desktop: Click the Clone in Desktop button on the GitHub page
- Command-Line:
- (Optionally) Edit
Vagrantfile- Set
vb.memoryexplicitly if you don't want to use 1/4 of the available RAM - Enable
vb.gui = trueif you need to troubleshoot
- Set
vagrant up(This may take a while)- If installation was successful, you should see
all 13 tests passed. - Log in with
vagrant ssh
- You may need to enable VT-x/AMD-V
- On Windows, make sure that the Hyper-V feature is not installed.
- On Windows 10, see Issue #6754
- See Connect to Your Vagrant Virtual Machine with PuTTY for instructions on connecting.
- Once you are able to connect successfully, see PuTTY: How to load, save or delete server connection settings to save your connection information.
- Finally, to fix the line drawing characters used by NPM, see PuTTY, TMUX and NPM
- The repository will be shared as
/vagrant - The
sharedsubdirectory will be symlinked from~vagrant/shared
- The username and password are both
vagrant - Ports will be forwarded from the host machine as follows:
| Host port | Guest port |
|---|---|
| 3000 | 3000 |
| 4040 | 4040 |
| 8000 | 80 |
| 8080 | 8080 |
Redis and MongoDB servers and command-line clients are installed but not configured to start automatically.
Open a new ssh session and run
$HOME/redis/src/redis-serverOpen a new ssh session and run
$HOME/mongodb/bin/mongod --dbpath=$HOME/mongodb/dataTo stop Redis or MongoDB, press Ctrl-C in the terminal window where the database is running.
When you are finished, you can stop the VM by running
vagrant suspendor
vagrant haltIf you want to destroy and re-build the machine completely, run
vagrant destroybut make sure that any data you want to save has been copied to ~vagrant/shared first