- learning to move files from local machine to the virtual machine
- to do so we use the sink_files feature in vagrant
- running the vm this morning returned the error that "the vm was created with a user that doesnt match the current user"
- check hidden files - using the command ls -a
- remove .vagrant file
- what language is used to build the app
- what framework has been used - mvc, react(front-end)
- what are the dependencies and which ones have been included and which ones are needed
- what will the app look like
- install bundler in root mode using sudo -i
- exit sudo and run the command bundle to download and install dependencies
- gives you the instructions to pass all the test
enter the vm
-
sudo apt-get updates
-
sudo apt-get install "package"
-
sudo apt-get upgrade
-
systemctl status nginx (name of the program)
-
go back to vm install node.js
-
use curl to install packages that or not in a package directory
-
in order to install pm2
-
install nom first in sudo
-
npm package manager for node
- bash scripts can help us automate processes .sh means it is an executable file
chmod - change mode on linux bash - make files executable +x name_of_file
- syntax to make a file executable +x
- to run the executable file: ./name_of_file
-#!/bin/bash
- sudo apt-get update
- sudo apt-get install nginx
- sudo apt-get upgrade
- changes from the vagrant file affects the app in both the vm and local machine
- "top" - shows all the programs running on the system
- "ps" shows system information
- "chmode" change mode
- "cat" (name of the file) returns the content of a file on the terminal
-
chmod - modify access rights
-
su - temporarily become the superuser
-
sudo - temporarily become the superuser
-
chown - change ownership
-
chgrp - change a file's group ownership
-
chmod +rwx filename - to add permissions
-
chmod +rwx filename - to remove permissions
-
chmod +x filename - to allow executable permissions
-
chmod -wx filename - to take out write and executable permissions
-
0 = no permission
-
1 = execute
-
2 = write
-
3 = read
-
777 - no restrictions on permissions, anybody can do anything
config.vm.synced_folder ".", "/home/vagrant/app"
- the "." adds all the files in the current directory
- Vagrant reload - saves all changes and applies them to the vm
- how to run a shell script command from environment folder
- create a file called a provision.sh
- include the commands for install nginx in the script
- the syntax for running a bash script from a vagrant file -config.vm.provision "shell", path: "environment/provisions.sh"