-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
47 lines (39 loc) · 1.13 KB
/
README
File metadata and controls
47 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## For Postgres
To install PostgreSQL on your computer and be able to run the command `sudo -iu postgres psql`, follow these steps based on your operating system:
### For Ubuntu/Debian
1. **Update Package List**:
Open a terminal and run:
```bash
sudo apt update
```
2. **Install PostgreSQL**:
Install PostgreSQL and the necessary dependencies:
```bash
sudo apt install postgresql postgresql-contrib
```
3. **Start PostgreSQL Service**:
Ensure that the PostgreSQL service is running:
```bash
sudo systemctl start postgresql
sudo systemctl enable postgresql # Optional: starts PostgreSQL on boot
```
4. **Switch to the `postgres` User and Access `psql`**:
Run the command:
```bash
sudo -iu postgres psql
```
### After Installation
1. Create a DB
```SQL
CREATE DATABASE nebula;
```
2. Create a user
```SQL
CREATE USER <the-name-of-ur-user> WITH PASSWORD '<password>';
```
3. Connect user and database created
```SQL
GRANT ALL PRIVILEGES ON DATABASE <db_name> TO <name-of-user>;
```
4. Check the example.env file and create a similar .env file
5. Thats it!!!!!!!!!!!!!!