dwyl / dwyl/learn-postgresql

Refactor Linux instructions

Open
#41 0 comments 1 reaction 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
346
Forks
37
PR merge metrics
No merged PRs in 30d

Description

I've created a more copy/paste friendly Linux install script that removes the need for using whoami:

```bash
(
# Update package list
sudo apt-get update

# Install postgresql and postgresql-contrib (additional modules such as UUID)
sudo apt-get -y install postgresql postgresql-contrib

# Set a shell variable to currently logged in user
PSQL_MY_USERNAME=$(whoami)

# Create a new postgres user for the currently logged in user
sudo -u postgres createuser $PSQL_MY_USERNAME

# Create a new postgres user for the currently logged in user
sudo -u postgres createdb $PSQL_MY_USERNAME
);
```

Maybe `PSQL_MY_USERNAME=$(whoami)` could be added to the existing instructions, or the Linux section could be replaced with a single code block to be more copy/paste friendly?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.