Difference between revisions of "RDBMS-PostgreSQL/C2/Installation-of-PostgreSQL/English-timed"
Sandhya.np14 (Talk | contribs) |
Sandhya.np14 (Talk | contribs) |
||
Line 113: | Line 113: | ||
| Immediately you will be prompted to set a new '''password''' for the '''Postgres user'''. | | Immediately you will be prompted to set a new '''password''' for the '''Postgres user'''. | ||
− | I'll enter the | + | I'll enter the password as ''''postgres''''. |
|- | |- | ||
Line 121: | Line 121: | ||
|- | |- | ||
| 03:19 | | 03:19 | ||
− | | Enter the same | + | | Enter the same password one more time. |
|- | |- | ||
Line 177: | Line 177: | ||
|- | |- | ||
| 04:35 | | 04:35 | ||
− | |Using '''psql''' tool, we can execute '''SQL''' statements, manage '''database objects '''etc. | + | |Using '''psql''' tool, we can execute '''SQL''' statements, manage '''database objects '''etc. |
|- | |- | ||
| 04:44 | | 04:44 | ||
− | | Another way to connect to a database is using '''pgAdmin''' '''GUI ''' | + | | Another way to connect to a database is using '''pgAdmin''' '''GUI application'''. |
|- | |- | ||
| 04:51 | | 04:51 | ||
− | |We can interact with '''PostgreSQL database server '''through this interface. | + | |We can interact with '''PostgreSQL database server '''through this '''interface'''. |
|- | |- | ||
Line 199: | Line 199: | ||
|- | |- | ||
| 05:11 | | 05:11 | ||
− | | For this, type '''sudo''' '''psql hyphen capital U postgres hyphen h localhost hyphen capital W ''' | + | | For this, type: '''sudo''' '''psql hyphen capital U postgres hyphen h localhost hyphen capital W ''' |
and press '''Enter''' to connect to the '''server'''. | and press '''Enter''' to connect to the '''server'''. | ||
Line 223: | Line 223: | ||
|- | |- | ||
| 05:57 | | 05:57 | ||
− | | Type | + | | Type: '''Select current underscore user, now();''' |
|- | |- | ||
| 06:05 | | 06:05 | ||
− | | We can see the '''user name''' and current date as output. | + | | We can see the '''user name''' and current date as '''output'''. |
Hit ‘q’ key to exit. | Hit ‘q’ key to exit. | ||
Line 233: | Line 233: | ||
|- | |- | ||
| 06:13 | | 06:13 | ||
− | | During installation, some sample | + | | During installation, some sample databases are created automatically. |
Let us have a look at them. | Let us have a look at them. | ||
Line 239: | Line 239: | ||
|- | |- | ||
| 06:21 | | 06:21 | ||
− | | Type '''slash list '''or''' slash l''' and press '''Enter'''. | + | | Type: '''slash list '''or''' slash l''' and press '''Enter'''. |
|- | |- | ||
| 06:28 | | 06:28 | ||
− | | We can see the below database names that are available in '''PostgreSQL server '''by default. | + | | We can see the below database names that are available in '''PostgreSQL server, '''by default. |
Hit ‘q’ key to exit. | Hit ‘q’ key to exit. | ||
Line 249: | Line 249: | ||
|- | |- | ||
| 06:38 | | 06:38 | ||
− | | To change a | + | | To change a database', type: '''slash c''' database name. |
|- | |- | ||
| 06:45 | | 06:45 | ||
− | | I will type | + | | I will type: ''' slash c postgres'''. |
− | Then type the '''postgres | + | Then type the '''postgres''' password. |
|- | |- | ||
| 06:54 | | 06:54 | ||
− | | We can see a message saying | + | | We can see a message saying '''You are now connected to database “postgres” as user “postgres”'''. |
|- | |- | ||
| 07:02 | | 07:02 | ||
− | | We can create our own | + | | We can create our own database and '''tables''' as per our requirement. |
|- | |- | ||
Line 271: | Line 271: | ||
|- | |- | ||
| 07:13 | | 07:13 | ||
− | | Type ''''slash q'''' to disconnect from the '''server'''. | + | | Type: ''''slash q'''' to disconnect from the '''server'''. |
|- | |- | ||
Line 287: | Line 287: | ||
|- | |- | ||
| 07:39 | | 07:39 | ||
− | | For more details, refer to the | + | | For more details, refer to the '''‘Linux’ spoken tutorials '''on our website. |
|- | |- | ||
| 07:45 | | 07:45 | ||
− | | Or in the '''Terminal''', type | + | | Or, in the '''Terminal''', type: '''sudo apt hyphen get install pgadmin3''' and press '''Enter'''. |
|- | |- | ||
Line 305: | Line 305: | ||
|- | |- | ||
| 08:08 | | 08:08 | ||
− | | In the '''Search''' box, type '''PgAdmin'''. | + | | In the '''Search''' box, type: '''PgAdmin'''. |
|- | |- | ||
Line 341: | Line 341: | ||
|- | |- | ||
| 09:02 | | 09:02 | ||
− | | So click on the '''Previous supported versions '''and look for version 9.3.x | + | | So, click on the '''Previous supported versions '''and look for version '''9.3.x''' |
|- | |- | ||
Line 349: | Line 349: | ||
|- | |- | ||
|09:13 | |09:13 | ||
− | | It will open a dialog box to save the file. | + | | It will open a '''dialog box''' to '''save''' the file. |
Click on the '''Save File''' button. | Click on the '''Save File''' button. | ||
Line 363: | Line 363: | ||
|- | |- | ||
| 09:30 | | 09:30 | ||
− | | Go to the '''Downloads''' folder and double-click on the downloaded file. It will open a window. | + | | Go to the '''Downloads''' folder and double-click on the downloaded file. It will open a '''window'''. |
|- | |- | ||
Line 389: | Line 389: | ||
|- | |- | ||
| 10:06 | | 10:06 | ||
− | | Next click on the '''Finish''' button to complete the installation. | + | | Next, click on the '''Finish''' button to complete the installation. |
|- | |- | ||
Line 401: | Line 401: | ||
|- | |- | ||
| 10:20 | | 10:20 | ||
− | | Click on '''Start, '''then''' All program '''then''' PostgreSQL '''and '''psql''' to open the '''command line'''. | + | | Click on '''Start, '''then''' All program, '''then''' PostgreSQL '''and '''psql''' to open the '''command line'''. |
|- | |- | ||
Line 409: | Line 409: | ||
|- | |- | ||
| 10:33 | | 10:33 | ||
− | | Type '''select version() semicolon '''and press '''Enter '''to see the installed version of '''postgresql.''' | + | | Type: '''select version() semicolon '''and press '''Enter '''to see the installed version of '''postgresql.''' |
|- | |- | ||
Line 423: | Line 423: | ||
|- | |- | ||
| 10:53 | | 10:53 | ||
− | | Click on '''Start, '''then''' All program '''then''' PostgreSQL '''and '''PgAdmin3''' to open the '''GUI interface'''. | + | | Click on '''Start, '''then''' All program, '''then''' PostgreSQL '''and '''PgAdmin3''' to open the '''GUI interface'''. |
|- | |- | ||
Line 435: | Line 435: | ||
|- | |- | ||
| 11:18 | | 11:18 | ||
− | | As an assignment, | + | | As an assignment, connect to the '''server''' and list the default available database. |
− | Change to anyone of the available | + | Change to anyone of the available database. |
|- | |- | ||
| 11:28 | | 11:28 | ||
− | | The video at the following link | + | | The video at the following link summarizes the '''Spoken Tutorial''' project. |
Please download and watch it. | Please download and watch it. | ||
Line 447: | Line 447: | ||
|- | |- | ||
| 11:36 | | 11:36 | ||
− | | The''' Spoken Tutorial Project''' | + | | The''' Spoken Tutorial Project''' team |
conducts workshops using spoken tutorials and gives certificates on passing online tests. | conducts workshops using spoken tutorials and gives certificates on passing online tests. | ||
Line 463: | Line 463: | ||
|- | |- | ||
| 11:54 | | 11:54 | ||
− | | Choose the minute and second where you have the question | + | | Choose the minute and second where you have the question. |
− | Explain your question briefly | + | Explain your question briefly. |
|- | |- | ||
| 12:02 | | 12:02 | ||
− | | Someone from our team will answer them | + | | Someone from our team will answer them. |
|- | |- | ||
| 12:06 | | 12:06 | ||
− | | The Spoken Tutorial forum is for specific questions on this tutorial | + | | The '''Spoken Tutorial forum''' is for specific questions on this tutorial. |
|- | |- | ||
| 12:11 | | 12:11 | ||
− | | Please do not post unrelated and general questions on them | + | | Please do not post unrelated and general questions on them. |
|- | |- | ||
| 12:17 | | 12:17 | ||
− | | This will help reduce the clutter | + | | This will help reduce the clutter. |
− | With less clutter, we can use these discussion as instructional material | + | With less clutter, we can use these discussion as instructional material. |
|- | |- | ||
| 12:25 | | 12:25 | ||
− | | Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. | + | | Spoken Tutorial project is funded by '''NMEICT, MHRD,''' Government of India. |
More information on this mission is available at this link. | More information on this mission is available at this link. | ||
Line 493: | Line 493: | ||
|- | |- | ||
| 12:38 | | 12:38 | ||
− | | This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. | + | | This is Nirmala Venkat from '''IIT Bombay''', signing off. Thanks for watching. |
|} | |} |
Latest revision as of 16:18, 4 February 2019
Time | Narration |
00:01 | Welcome to the Spoken Tutorial on Installation of PostgreSQL. |
00:07 | In this tutorial, we will learn to install PostgreSQL on Ubuntu Linux OS and Windows operating system. |
00:17 | We will also learn to connect to PostgreSQL database and set password for the database. |
00:25 | To record this tutorial, I am using:
Ubuntu Linux 14.04 operating system, Windows 7 operating system and a working internet connection. |
00:38 | To follow this tutorial, you should be familiar with either of the mentioned operating system
and have working knowledge of any programming language. |
00:49 | PostgreSQL is a relational database management software. |
00:54 | It is a powerful and most advanced open source database system. |
00:59 | It runs on various platforms such as Linux, Windows and Mac Operating System. |
01:07 | First we will see how to install PostgreSQL on Linux. |
01:13 | Press CTRL + ALT +T keys simultaneously to open the terminal. |
01:20 | In the terminal window, type: sudo apt hyphen get update and press Enter.
Enter the administrative password if prompted. |
01:34 | This command will update the Ubuntu's default repositories.
Wait until it finishes all the updates. |
01:43 | Press Ctrl L to clear the screen. |
01:47 | Next, type: sudo apt hyphen get install postgresql and press Enter. |
01:59 | We can see the installation process has begun. |
02:03 | Press 'Y' wherever there is a prompt to confirm the configuration. |
02:09 | Installation will take sometime to complete, depending upon your internet speed. |
02:15 | Now we can see that the installation has been completed successfully.
Press Ctrl + L to clear the screen. |
02:25 | By default, a user account called postgres is created during installation.
But there is no password set for this user account. |
02:37 | To set the password, type: sudo hyphen u postgres psql postgres and press Enter. |
02:49 | Enter your system password if prompted.
Notice that the prompt has changed to postgres equal to hash. |
02:59 | At the prompt, type: slash password postgres. |
03:05 | Immediately you will be prompted to set a new password for the Postgres user.
I'll enter the password as 'postgres'. |
03:15 | You can enter a password of your choice. |
03:19 | Enter the same password one more time. |
03:23 | Please remember this password for future use. |
03:27 | Next, type: select version open bracket close bracket semicolon and press Enter. |
03:36 | Do not forget to put the semicolon at the end of each statement. |
03:41 | The PostgreSQL version that we have installed now, is displayed on the terminal. |
03:47 | This indicates that we have successfully installed PostgreSQL. |
03:52 | I have increased the terminal font size for this demo.
Hence the output is seen in a different window. |
04:00 | So, I’ll hit the ‘q’ key to exit.
You may not require to do so. |
04:07 | Now let us see how to disconnect from the server. |
04:11 | Type slash q and press Enter to disconnect from the server. |
04:17 | Notice that we are back at the command prompt of the terminal. |
04:23 | Every time when you want to work with PostgreSQL, you need to be connected to the server. |
04:29 | Psql is an interactive terminal program provided by PostgreSQL. |
04:35 | Using psql tool, we can execute SQL statements, manage database objects etc. |
04:44 | Another way to connect to a database is using pgAdmin GUI application. |
04:51 | We can interact with PostgreSQL database server through this interface. |
04:57 | We will be demonstrating all features using pgAdmin in this series. |
05:03 | Switch back to terminal.
Let us again connect to the postgreSQL database from the command line. |
05:11 | For this, type: sudo psql hyphen capital U postgres hyphen h localhost hyphen capital W
and press Enter to connect to the server. |
05:29 | hyphen h is the hostname or IP of the local server. |
05:35 | Enter the password for postgres user which you have set after installation. |
05:41 | We can see the prompt changes to Postgres.
Press Ctrl + L to clear the screen. |
05:49 | Let us verify the PostgreSQL database and whether the server has been started by a simple query. |
05:57 | Type: Select current underscore user, now(); |
06:05 | We can see the user name and current date as output.
Hit ‘q’ key to exit. |
06:13 | During installation, some sample databases are created automatically.
Let us have a look at them. |
06:21 | Type: slash list or slash l and press Enter. |
06:28 | We can see the below database names that are available in PostgreSQL server, by default.
Hit ‘q’ key to exit. |
06:38 | To change a database', type: slash c database name. |
06:45 | I will type: slash c postgres.
Then type the postgres password. |
06:54 | We can see a message saying You are now connected to database “postgres” as user “postgres”. |
07:02 | We can create our own database and tables as per our requirement. |
07:08 | All the database commands can be executed from the command line. |
07:13 | Type: 'slash q' to disconnect from the server. |
07:17 | Now let us see how to install PgAdmin. |
07:21 | PgAdmin can be installed by using any one of the following methods on Ubuntu Linux Operating System. |
07:30 | Go to Ubuntu Software Centre or Synaptic Package manager, search for PgAdmin and install. |
07:39 | For more details, refer to the ‘Linux’ spoken tutorials on our website. |
07:45 | Or, in the Terminal, type: sudo apt hyphen get install pgadmin3 and press Enter. |
07:56 | I have already installed PgAdmin in my machine.
I'll show how to open PgAdmin. |
08:03 | Click Dash Home on the top left corner of the desktop. |
08:08 | In the Search box, type: PgAdmin. |
08:12 | The PgAdmin icon appears. Click on it. |
08:17 | The PgAdmin interface opens. |
08:21 | Now let us learn to install PostgreSQL on Windows OS. |
08:28 | Open your web browser and go to www.postgresql.org/download
Click on the Windows link. |
08:41 | Then, click on the Download the graphical installer link. |
08:46 | I have installed postgres version 9.3.x in Linux Operating System. |
08:53 | Now I would like to install the same version in Windows also.
You can also install the latest stable version. |
09:02 | So, click on the Previous supported versions and look for version 9.3.x |
09:09 | Click the link near to the Windows icon. |
09:13 | It will open a dialog box to save the file.
Click on the Save File button. |
09:20 | It will take sometime to download the file. Wait until it is finished. |
09:25 | I have already downloaded it in my machine in the Downloads folder. |
09:30 | Go to the Downloads folder and double-click on the downloaded file. It will open a window. |
08:37 | Click on the Run button. |
08:40 | In the setup window, click on the Next button. |
09:44 | Select the components and click on the Next button.
In the Installation directory, click on the Next button. |
09:52 | Enter the password for postgres and re-type one more time. Click on the Next button. |
10:00 | Installation has started. Wait until it finishes completely. |
10:06 | Next, click on the Finish button to complete the installation. |
10:11 | Lastly, exit from the wizard. |
10:15 | Let us see how to open the PostgreSQL command line on Windows. |
10:20 | Click on Start, then All program, then PostgreSQL and psql to open the command line. |
10:30 | We can see the postgres prompt. |
10:33 | Type: select version() semicolon and press Enter to see the installed version of postgresql. |
10:42 | This indicates that we have successfully installed in Windows.
Close the window. |
10:49 | Let us open the PgAdmin from Windows. |
10:53 | Click on Start, then All program, then PostgreSQL and PgAdmin3 to open the GUI interface. |
11:04 | With this, we come to the end of this tutorial. Let us summarize. |
11:09 | In this tutorial, we have learnt to install PostgreSQL on Ubuntu Linux and Windows operating systems. |
11:18 | As an assignment, connect to the server and list the default available database.
Change to anyone of the available database. |
11:28 | The video at the following link summarizes the Spoken Tutorial project.
Please download and watch it. |
11:36 | The Spoken Tutorial Project team
conducts workshops using spoken tutorials and gives certificates on passing online tests. |
11:45 | For more details, please write to us. |
11:49 | Do you have questions in THIS Spoken Tutorial?
Please visit this site |
11:54 | Choose the minute and second where you have the question.
Explain your question briefly. |
12:02 | Someone from our team will answer them. |
12:06 | The Spoken Tutorial forum is for specific questions on this tutorial. |
12:11 | Please do not post unrelated and general questions on them. |
12:17 | This will help reduce the clutter.
With less clutter, we can use these discussion as instructional material. |
12:25 | Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.
More information on this mission is available at this link. |
12:38 | This is Nirmala Venkat from IIT Bombay, signing off. Thanks for watching. |