Brew Postgresql Start

Homebrew is a package manager for Mac OS X that builds software from its source code. It includes a version of PostgreSQL packaged by what it refers to as a formula. This type of installation might be preferred by people who are comfortable using the command line to install programs, such as software developers.

  • I would like to know correct way of starting/stopping postgres database. There are two ways pgctl start/stop service postgresql start/stop I would like to know how they are different from each o.
  • Jan 26, 2021 To install postgres with brew I used: $ brew install postgres To see if postgres is running I can type: $ brew services Name Status User Plist postgresql stopped Then the funny thing was when I tried to start the service: $ brew services start postgres Successfully started `postgresql` (label: homebrew.mxcl.postgresql) Great! So it's running!

Typical use looks like

Since PostgreSQL version 8.0, a window installer is available to make the installation process fairly easier. Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql. New out put may look like.

This install the command line console (psql) as well as the server, if you'd like to create your own databases locally.Run the following to start the server and login to it (it basically sets up a single 'admin' user with your username, so that's who you'll be logged in as.

Brew services start postgresql ubuntu

You can see what other versions are available by running

You can see which version the current latest will be by running

Notes on Homebrew:

  • Brew Install Postgresql on OS X Lion - Resolving conflicts with the built-in PostgreSQL libraries shipping with OS X 10.7 'Lion'
  • petere/postgresql tap for installing multiple PostgreSQL versions in parallel
Retrieved from ''

This article was last updated on November 19, 2020

This is a quick guide for installing PostgreSQL (Postgres for short) on a Mac with Homebrew, and starting and stopping it with Homebrew Services. If you're working on a Ruby on Rails project that requires Postgres, this tutorial will get you up and running in no time.

The easiest way to install Homebrew, Postgres, and all the othertools necessary for Ruby on Rails development, is to run my free script that will set everything up for you.

If you prefer to do things manually and hope for the best, follow the steps below.

Step 1: Install Homebrew

Follow the instructions on their site.

Step 2: Update Homebrew

Before you install anything with Homebrew, you should always make sure it's up to date and that it's healthy:

Step 3: Install Postgres

When you install Postgres, Homebrew will provide useful information in your Terminal that you should read. Homebrew also helpfully creates a default database cluster. You can confirm that if you see the following output:

Step 5: Start the Postgres service

At this point, you should be all set to run the Rails commands to create and use the database in your app.

To stop Postgres: Uninstall chrome on a mac.

Brew Postgresql Start Page

To see a list of all services and their state: