Skip to content

day2 start

Phil Kirlin edited this page Oct 10, 2019 · 2 revisions

Day 2 Startup

To fix some issues with the Linux machines from Tuesday, here are some steps I need you to take.

Part A

These steps assume you have already set up your PostgreSQL server on Tuesday and gotten the Linux machine working in the cloud. If you haven't taken these steps, start with day 1

  • Go to the GCP Dashboard: https://console.cloud.google.com/home/dashboard

  • From the project selection dropdown, pick your project that you created on Tuesday:


  • Below, in the Project Info section, make a note of your project ID (not the project name---this is where I told you all the wrong thing on Tuesday and why some folks got error messages).

  • Your project ID will probably be a few random words and numbers, but whatever it is, just make a note of it, we're about to use it in a few places.

  • Click the Activate Cloud Shell button:

  • Then open the code editor:

  • Back in the linux shell, change to your home directory:

    cd (press enter)

  • Then give this command (copy and paste it):

    wget http://www.cs.rhodes.edu/~kirlinp/courses/db/f19/setup2.sh

  • Do not run this file yet. We have to edit it. Give this command:

    cloudshell edit setup2.sh

  • The file will open in the code editor.

  • At the top of the file, where it says PROJECT=change-this... fill in your project ID in place of the change-this part. It's probably easiest to copy and paste from the other window. Make sure to use the project ID, not the project name.

  • Save the file.

  • Back in Linux, give the command: bash setup2.sh. If you get any errors, let me know.

  • Assuming you get no errors, you can close setup2.sh in the code editor. You won't need this file anymore.

Part B

There's a second file we need to modify from Tuesday.

  • In Linux, give the command: cloudshell edit ~/.bashrc (probably easiest to copy and paste)

  • This will open a file in the cloud editor with a lot of commands you probably won't understand. Scroll down to the end of the file, and look for the section that looks like this:

  • Modify the line that sets your project to use your real project ID, not db-f19:

  • Save this file in the code editor.

  • We now must log out of Linux completely and log back in. To do this type logout and press ENTER. The Linux window disappears.

  • To log back in, click the Activate Cloud Shell button in the upper right corner of the code editor window.

  • If you don't get any error messages, and you see your PostgreSQL IP address, then you are good to go with the next part of today's lab!

Use the main wiki page to navigate, not the list of pages directly above, because those are out of order.

Clone this wiki locally