← Back to PostgreSQL Course | Chapter 1: Introduction | Lesson 3 of 7

PostgreSQL इंस्टॉल करना

आप PostgreSQL को अपने package manager, एक installer, या Docker से install कर सकते हैं।

PostgreSQL Install करना

Linux पर apt या dnf इस्तेमाल करें, macOS पर Homebrew या Postgres.app, और Windows पर EnterpriseDB installer। इसे try करने का सबसे fast तरीका Docker है: एक password के साथ official postgres image चलाएँ और port 5432 map करें।

Installer एक postgres superuser भी बनाता है।

Note: Docker आपको एक command में एक disposable PostgreSQL देता है।

उदाहरण: Installing PostgreSQL

bash
# Ubuntu / Debian
$ sudo apt update && sudo apt install postgresql
$ sudo systemctl status postgresql

# Docker (any OS)
$ docker run --name pg -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:16
$ docker exec -it pg psql -U postgres
psql (16.2)
postgres=#

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. postgres user के लिए एक password set करना भूल जाना
  2. port 5432 को internet पर expose करना
  3. OS user को database role से confuse करना
चैप्टर सारांश
  • apt, brew, एक installer, या Docker से install करें
  • Default port 5432 है
  • एक postgres superuser बनता है
  • हमेशा एक strong password set करें
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.