This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Showing
2 changed files
with
55 additions
and
30 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,53 @@ | ||
# How to Install PSQL | ||
## linux | ||
|
||
open the terminal and type in | ||
```bash | ||
sudo apt-get update | ||
sudo apt-get install postgresql postgresql-contrib | ||
``` | ||
|
||
## windows | ||
Download the installer from | ||
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads | ||
and follow the installation process, if asked fill `5432` in port configuration | ||
|
||
# How to Configure the Database | ||
## linux | ||
Create `systersdb` database, where `systersdb` might be any suitable name. | ||
|
||
```bash | ||
sudo -i -u postgres | ||
createuser <anyname e.g. alice> --pwprompt | ||
psql | ||
CREATE DATABASE systersdb; | ||
\c systersdb; | ||
GRANT ALL PRIVILEGES ON DATABASE systersdb to <the name>; | ||
``` | ||
|
||
Fill in the database details in `systers_portal/settings/dev.py`. | ||
|
||
## windows | ||
Create `systersdb` database, where `systersdb` might be any suitable name. | ||
Open the SQL Shell for postgresql from the windows start menu or wherever accessible | ||
|
||
``` | ||
Server [localhost]: Just press enter, leave this empty | ||
Database [postgres]: Just press enter, leave this empty | ||
Port [5432]: This is the default port just press enter, leave this empty | ||
Username [postgres]: This is the default username just press enter, leave this empty | ||
Password for user postgres: Input password you created during installation and press enter | ||
CREATE USER <anyname you want e.g systers> WITH PASSWORD <any password>; | ||
CREATE DATABASE systersdb; | ||
\c systersdb; | ||
GRANT ALL PRIVILEGES ON systersdb TO <username created above>; | ||
``` | ||
|
||
Fill in the database details in `systers_portal/settings/dev.py`. | ||
|
||
|
||
Reference | ||
[Django Girls'](http://djangogirls.org) ebook, | ||
[Tutorials Extension](http://djangogirls.org/resources/), is a reference. | ||
The info is also on [Django Girls GitHub repository](https://github.com/DjangoGirls/tutorial-extensions/blob/master/en/optional_postgresql_installation/README.md). | ||
|
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