This project queries news database, organizes and prints the query results accordingly.
- Virtualbox You can download virtualbox from here.
- Vagrant You can download vagrant from here.
- Python You can download python here.
-
Clone this project on github
$ git clone https://github.com/sk15973/Log-Analysis-Project.git
-
Change directory to the project folder
-
run
vagrant upfrom command line -
Download the sql file from here, extract the file and move it to the project folder.
-
after vagrant set up is complete run
vagrant sshandcd /vagrant folder. Database setup- Run the following commands once during the first time execution of the project.
sudo su - postgrespsqlCREATE DATABASE news;CREATE USER vagrant;GRANT ALL PRIVILEGES ON DATABASE news to vagrant;psql -d news -f newsdata.sql
-
run
python LogAnalysis.pyto the get the results.
The SQL file was provided by udacity as part of the project course material. Download the SQL file from news data.