Difference between revisions of "RDBMS-PostgreSQL/C2/Installation-of-PostgreSQL/English-timed"
PoojaMoolya (Talk | contribs) (Created page with " {| border=1 | '''Time''' | '''Narration''' |- | 00:01 | Welcome to the''' Spoken Tutorial''' on''' Installation of PostgreSQL.''' |- | 00:07 | In this tutorial we wil...") |
Sandhya.np14 (Talk | contribs) |
||
Line 10: | Line 10: | ||
|- | |- | ||
| 00:07 | | 00:07 | ||
− | | In this tutorial we will learn to install '''PostgreSQL '''on '''Ubuntu Linux OS '''and '''Windows '''operating system | + | | In this tutorial, we will learn to install '''PostgreSQL '''on '''Ubuntu Linux OS '''and '''Windows '''operating system. |
|- | |- | ||
| 00:17 | | 00:17 | ||
− | | We will also learn to | + | | We will also learn to connect to '''PostgreSQL''' database and set password for the database. |
|- | |- | ||
| 00:25 | | 00:25 | ||
− | | To record this tutorial, I am using | + | | To record this tutorial, I am using: |
+ | '''Ubuntu Linux 14.04''' operating system, | ||
− | '''Windows 7 '''operating system and a working | + | '''Windows 7 '''operating system and |
+ | |||
+ | a working internet connection. | ||
|- | |- | ||
Line 30: | Line 33: | ||
|- | |- | ||
| 00:49 | | 00:49 | ||
− | | '''PostgreSQL''' is a relational database management software. | + | | '''PostgreSQL''' is a '''relational database management software'''. |
|- | |- | ||
| 00:54 | | 00:54 | ||
− | | It is a powerful and most advanced open source database system. | + | | It is a powerful and most advanced '''open source''' database system. |
|- | |- | ||
| 00:59 | | 00:59 | ||
− | | It | + | | It '''run'''s on various platforms such as '''Linux''', '''Windows '''and''' Mac Operating System'''. |
|- | |- | ||
Line 46: | Line 49: | ||
|- | |- | ||
| 01:13 | | 01:13 | ||
− | | Press '''CTRL + ALT +T '''keys | + | | Press '''CTRL + ALT +T '''keys simultaneously to open the '''terminal'''. |
|- | |- | ||
|01:20 | |01:20 | ||
− | + | | In the '''terminal''' window, type: '''sudo apt hyphen get update '''and press''' Enter.''' | |
Enter the '''administrative password''' if prompted. | Enter the '''administrative password''' if prompted. | ||
Line 56: | Line 59: | ||
|- | |- | ||
| 01:34 | | 01:34 | ||
− | |This command will update the '''Ubuntu's''' default | + | |This '''command''' will update the '''Ubuntu's''' default '''repositori'''es. |
− | Wait until it finishes all the | + | Wait until it finishes all the '''update'''s. |
|- | |- | ||
| 01:43 | | 01:43 | ||
− | | Press '''Ctrl L''' to clear the screen. | + | | Press '''Ctrl L''' to clear the '''screen'''. |
|- | |- | ||
| 01:47 | | 01:47 | ||
− | | Next, type '''sudo apt hyphen get install postgresql''' and press '''Enter'''. | + | | Next, type: '''sudo apt hyphen get install postgresql''' and press '''Enter'''. |
|- | |- | ||
Line 78: | Line 81: | ||
|- | |- | ||
| 02:09 | | 02:09 | ||
− | |Installation will take sometime to complete, depending upon your | + | |Installation will take sometime to complete, depending upon your internet speed. |
|- | |- | ||
Line 88: | Line 91: | ||
|- | |- | ||
| 02:25 | | 02:25 | ||
− | | By default, a | + | | By default, a user account called '''postgres''' is created during installation. |
But there is no '''password''' set for this '''user account'''. | But there is no '''password''' set for this '''user account'''. | ||
Line 94: | Line 97: | ||
|- | |- | ||
| 02:37 | | 02:37 | ||
− | | To set the '''password''', type '''sudo hyphen u postgres psql postgres '''and press''' Enter.''' | + | | To set the '''password''', type: '''sudo hyphen u postgres psql postgres '''and press''' Enter.''' |
|- | |- | ||
Line 104: | Line 107: | ||
|- | |- | ||
| 02:59 | | 02:59 | ||
− | | At the '''prompt''', type '''slash password postgres.''' | + | | At the '''prompt''', type: '''slash password postgres.''' |
|- | |- | ||
Line 126: | Line 129: | ||
|- | |- | ||
| 03:27 | | 03:27 | ||
− | | Next | + | | Next, type: '''select version open bracket close bracket semicolon '''and press''' Enter.''' |
|- | |- | ||
| 03:36 | | 03:36 | ||
− | |Do not forget to put the | + | |Do not forget to put the semicolon at the end of each '''statement'''. |
|- | |- | ||
Line 144: | Line 147: | ||
| I have increased the '''terminal font size''' for this demo. | | I have increased the '''terminal font size''' for this demo. | ||
− | Hence the output is seen in a different window. | + | Hence the '''output''' is seen in a different window. |
|- | |- | ||
| 04:00 | | 04:00 | ||
− | |So I’ll hit the ‘'''q'''’ key to exit. | + | |So, I’ll hit the ‘'''q'''’ key to exit. |
You may not require to do so. | You may not require to do so. |
Revision as of 14:46, 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 summarises 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. |