Last active
July 16, 2024 04:56
-
-
Save learncodeacademy/5f84705f2229f14d758d to your computer and use it in GitHub Desktop.
Revisions
-
learncodeacademy revised this gist
Jul 2, 2014 . No changes.There are no files selected for viewing
-
learncodeacademy revised this gist
Jul 2, 2014 . 1 changed file with 8 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,31 +29,15 @@ _Now you are connected to a new machine!_ _Nice! Now going to mytestsite.com will connect to our machine!_ ###Let's install nginx so we can see if our "domain" is working### ``` #always update apt-get on a new machine sudo apt-get update #install nginx sudo apt-get install nginx #start-er up sudo service nginx start ``` Now, go to mytestsite.com...you should see _Welcome to nginx!_ -
learncodeacademy revised this gist
Jun 27, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ ###Let's install Vagrant### - _Install VirtualBox: https://www.virtualbox.org/_ - _Install Vagrant: http://vagrantup.com/_ ###Select a Vagrant Box from https://vagrantcloud.com### ``` #add it to your list of boxes vagrant box add hashicorp/precise32 @@ -19,7 +19,7 @@ _Now you are connected to a new machine!_ - hit `exit` to disconnect ###Let's make this feel like the real world by adding a fake domain name### - open the Vagrantfile and uncomment the private_network line & change to your desired IP - `config.vm.network "private_network", ip: "22.22.22.22"` - run `vagrant reload` @@ -29,7 +29,7 @@ _Now you are connected to a new machine!_ _Nice! Now going to mytestsite.com will connect to our machine!_ ###Let's install Node.js and fire up a webapp### ``` sudo apt-get install python-software-properties sudo apt-add-repository ppa:chris-lea/node.j` @@ -44,7 +44,7 @@ npm start _go to mytestsite.com:3000 and you're rocking!_ ###Let's add a new user so it feels even more like the real world### ``` #add user sudo useradd will --create-home -
learncodeacademy revised this gist
Jun 27, 2014 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ ##Let's install Vagrant## - _Install VirtualBox: https://www.virtualbox.org/_ - _Install Vagrant: http://vagrantup.com/_ ##Select a Vagrant Box from https://vagrantcloud.com## -
learncodeacademy created this gist
Jun 27, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,58 @@ _Install VirtualBox: https://www.virtualbox.org/_ _Install Vagrant: http://vagrantup.com/_ ##Select a Vagrant Box from https://vagrantcloud.com## ``` #add it to your list of boxes vagrant box add hashicorp/precise32 #create a new folder for your project & init vagrant vagrant init hashicorp/precise32 #run your new machine vagrant up #ssh into your new machine vagrant ssh ``` _Now you are connected to a new machine!_ - hit `exit` to disconnect ##Let's make this feel like the real world by adding a fake domain name## - open the Vagrantfile and uncomment the private_network line & change to your desired IP - `config.vm.network "private_network", ip: "22.22.22.22"` - run `vagrant reload` - make a fake domain for that ip - run `sudo open /etc/hosts -a "Sublime Text"` to open your /etc/hosts file in Sublime Text - add this line to the end of the file and save `22.22.22.22 mytestsite.com` _Nice! Now going to mytestsite.com will connect to our machine!_ ##Let's install Node.js and fire up a webapp## ``` sudo apt-get install python-software-properties sudo apt-add-repository ppa:chris-lea/node.j` sudo apt-get update sudo apt-get install nodejs sudo apt-get install git sudo npm install -g express-generator express myTestSite cd myTestSite && npm install npm start ``` _go to mytestsite.com:3000 and you're rocking!_ _Let's add a new user so it feels even more like the real world_ ``` #add user sudo useradd will --create-home ##give user "sudo" powers sudo adduser will sudo #set their password sudo passwd will ``` - make bash the default login `sudo nano /etc/passwd` - on last line, change `sh` to `bash`, hit ctrl+x to exit - exit `exit` - log in as new user `ssh [email protected]`