GithubHelp home page GithubHelp logo

domains18 / linuxbasezshfiles Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 31 KB

My collection and configurations of zsh setup files. They also include configurations for editors such as neovim, written in languages such as Lua

Shell 78.60% Lua 21.40%

linuxbasezshfiles's Introduction

Setting up newly installed PostgreSQL on Linux

** To change before running the script **

add your github username add the mail attached to your github feel free to change the code, you can also send a PR

Features to add;

- [x] install zsh + oh-my-zsh
- [x] Make updates & uprades
- [x] Python setup with pyenv
- [x] setup node dev env (bun, pnpm, nvm and an lts node version)
- [x] make sure flatpak is installed
- [x] install brave with flatpak
- [x] gnome shell extentions + gnome shell ext manager setup
- [x] database manager (dbeaver)
- [x] install golang (the newest LTS version )
- [x] donwload postman (flatpak)
- [x] Obsidian download (flatpak)
- [x] search light( redirect to browser to download Search light a gnome plugin )
- [x] Nvim from build (app image) +  nvchad
- [x] snapd pkm
- [x] openssl server

Install PostgreSQL (shell only)

sudo apt install postgresql

Accessing the root role set up by default on PostgreSQL

sudo -u postgres psql

This will access PostgreSQL role that will help up setup our role and database

Creating our user | database Role

CREATE USER <rone_name> WITH SUPERUSER PASSWORD <role_password>;

This will create a super user role with your specified password.

I prefer creating a super user role on my newly installed PostgreSQL

Creating a database and setting the previously created Role

CREATE DATABASE <db_name> OWNER <role_of_choice>;

This will create a database and set the role as the owner. This will allow you to login directly to the database.

Setting up peer connection auth

sudo vi /etc/postgresql/<version>/main/pg_hba.conf

Now go to connections and add auth method to your role alternatively you can reset all roles auth method.

# TYPE          DATABASE          USER            ADDRESS        MTEHOD
	local         all               <your_role>     <address>      md5

This configuration will allow you to access the database with the password either using the psql shell or from an app.

Saving and loading the changes

sudo systemctl restart postgresql

Now you can access the database with your role name and password

# eg
psql -d <created_database> -U <created_role>

linuxbasezshfiles's People

Contributors

domains18 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.