PostgreSQL इंस्टॉल करना
आप PostgreSQL को अपने package manager, एक installer, या Docker से install कर सकते हैं।
In this page:
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
# 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. #}
आम गलतियां
- postgres user के लिए एक password set करना भूल जाना
- port 5432 को internet पर expose करना
- 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: