- 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 git
orsudo 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.memory
explicitly if you don't want to use 1/4 of the available RAM - Enable
vb.gui = true
if 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
shared
subdirectory 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-server
Open a new ssh session and run
$HOME/mongodb/bin/mongod --dbpath=$HOME/mongodb/data
To 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 suspend
or
vagrant halt
If you want to destroy and re-build the machine completely, run
vagrant destroy
but make sure that any data you want to save has been copied to ~vagrant/shared
first