How to setup an Ubuntu Linux VM For Udacity NanoDegree
These are the items to setup a Linux virtualbox machine using Linux Ubuntu to practice you projects and create your projects. This will help you if you have a windows computer and you don't have to buy a new Macbook OS computer. Best of all, its free!
- Virtual Box - First thing you will need a virtual box, you can download at https://www.virtualbox.org - very easy to install
- Linux Ubuntu - Download the latest version of ubuntu ISO file at https://ubuntu.com/ [My current version is 20]
- Create a Virtual Machine in VirtualBox
- Install VirtualBox Additions [Optional]
- On the new machine, go to settings > Storage and attached the ISO file you downloaded from ubuntu. This will allow the virtual machine to boot from your ISO file. Then start the virtual machine and follow the installation prompts, its very easy, just follow the instructions. When you get to the prompt to install the minimal or regular version, I suggest you install the regular version which includes some useful tools like openoffice and browsers.
- By now you should have a brand new clean install of Ubuntu in your virtual Machine. The following you software, apps and utilities you will need to install:
Important: I am putting this here for beginners to clear confusion. Do not enter the $ in the command, the dollar sign is not part of the command, therefore, omit it from the commands below, this is only used to reference a linux command.
To install python version 3 open a terminal and execute this command:
$ sudo apt-get update
$ sudo apt-get install python3
After the installation is completed, validate you have it installed with this command:
$ python3 --version
$ sudo apt install python3-pip
After pip completes installation, validate you have it installed with this commnad:
$ pip3 --version
To install PostgreSQL, as well as the necessary server software, run the following command:
$ sudo apt-get install postgresql postgresql-contrib
* If you need help installing postgresql, here a nice tutorial with more details
Follow these steps: https://www.godaddy.com/garage/how-to-install-postgresql-on-ubuntu-14-04/
UPDATE: follow these instructions to install:
To install pgAdmin in ubuntu, I did not have to send a command. You can install it by going into the Ubuntu Software Application and searching for pgadmin. This person create a nice video showing you on to install and configure postgresql with pgAdmin and it shows how to install pgadmin with ubuntu software.
$ sudo apt-get install python3-psycopg2
The commands in the instructions by Udacity did not work well with me, so I used these commands to do certain functions like:
To create database :
$ sudo -u postgres createdb udacity
DELETE REMOVE OR DROP a Database
$ sudo -u postgres dropdb todoapp
$ sudo su - postgres
These are the psql commands I used the most during their videos:
show all the tables
CONNECT TO ANOTHER DB
Install Visual Studio Code
To install VS Code, is simple as installing pgAdmin, just go to the Ubuntu Software application and seach for vs code and click the install button
$ sudo pip3 install flask
$ sudo pip3 install Flask-Migrate
$ sudo pip3 install flask-sqlalchemy
This setup worked for me, I followed along the code with the instructor and my scripts worked.