-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fee6c6
commit 6359c71
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
postgresql server yaratish va sozlash | ||
|
||
|
||
db o'rniga o'zizi database nomini qo'yasiz. | ||
user o'rniga kerakli username. | ||
passwordni ham o'zizga moslab olasiz! | ||
|
||
|
||
sudo apt update | ||
sudo apt list --upgradable | ||
sudo apt upgrade -y | ||
sudo apt install libpq-dev postgresql postgresql-contrib -y | ||
sudo -i -u postgres psql | ||
|
||
CREATE DATABASE db; | ||
CREATE USER user WITH PASSWORD 'pass'; | ||
ALTER ROLE user SET client_encoding TO 'utf8'; | ||
ALTER ROLE user SET default_transaction_isolation TO 'read committed'; | ||
ALTER ROLE user SET timezone TO 'UTC'; | ||
GRANT ALL PRIVILEGES ON DATABASE db TO user; | ||
|
||
\l | ||
|
||
GRANT ALL PRIVILEGES ON SCHEMA public TO user; | ||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO user; | ||
\q |