Skip to content

Commit

Permalink
fix: add postgres install instrucitons
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Aug 5, 2024
1 parent 7675386 commit 4601cca
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Follow guide: [Mac Setup Gitbook](https://xmlking.gitbook.io/macos-setup/)
- [Sourabhbajaj's macOS Setup Guide](https://sourabhbajaj.com/mac-setup/index.html)
- <https://www.stefanjudis.com/blog/declutter-emojify-and-prettify-your-iterm2-terminal>
- [Te BEST Mac Terminal Setup for 2022](https://bdarfler.medium.com/the-best-mac-terminal-setup-for-2022-44bf6e3c1a6e)
- [Everduin94 dotfiles](https://github.com/Everduin94/dotfiles)
58 changes: 58 additions & 0 deletions docs/apps/postgres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# PostgreSQL

Install local PostgreSQL database for your projects and PoCs.
We will be using [TimescaleDB](https://www.timescale.com/) as **PostgreSQL** which add extentions `pgvectorscale` and `pgai` to support [AI](https://www.timescale.com/ai)

## Setup

1. At the command prompt, add the TimescaleDB Homebrew tap:

```shell
brew tap timescale/tap
```

2. Install TimescaleDB and psql:

```shell
Install TimescaleDB and psql:
```

3. Update your path to include psql.

```shell
brew link --force libpq
```

4. Run the timescaledb-tune script to configure your database:

```shell
timescaledb-tune --quiet --yes
```

5. Change to the directory where the setup script is located. It is typically, located at

`/opt/homebrew/Cellar/timescaledb/<VERSION>/bin/`, where `<VERSION>`is the version of `timescaledb` that you installed:

```shell
cd /opt/homebrew/Cellar/timescaledb/<VERSION>/bin/
```

6. Run the setup script to complete installation.

```shell
./timescaledb_move.sh
```

7. Login to PostgreSQL as postgres

```shell
sudo -u postgres psql
```

8. Set the password for postgres (optional)

```shell
\password postgres
```

When you have set the password, type `\q` to exit psql.
2 changes: 1 addition & 1 deletion docs/devops/cloud/gcloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Examples include: “gcloud”, “gsutil”, and “bq” among others.
Install Google cloud SDK using your favourite method, e.g. `Brew` or download `macOS 64-bit(arm64, Apple M1 silicon)` directly from [google](https://cloud.google.com/sdk/docs/install)

```shell
rew install --cask google-cloud-sdk
brew install --cask google-cloud-sdk
# Note: if you see failures (e.g., 503) during the google-cloud-sdk installation, you may need to set your python proxy and re-run the command. e.g.,
# export HTTP_PROXY="http://user:password@hostname:port"
# export HTTPS_PROXY="http://user:password@hostname:port"
Expand Down

0 comments on commit 4601cca

Please # to comment.