![]() ![]() The following command will show you if you have multiple versions of postgres installed. General Troubleshooting Tips And Useful Commands I haven’t tried it but this blog post describes the process. You can also use a ruby gem called lunchy. Now use launchctl to load the file using this command: When upgrading to 9.6.2, my plist was at /usr/local/Cellar/postgresql/9.6.2/.Ĭopy the plist file to the LaunchAgents directory.Ĭp /usr/local/Cellar/postgresql/9.3.4/ ~/Library/LaunchAgents/ Step C – Load launchctl There’s a plist file that comes with the postgres install from homebrew. Step B – Copy the plist file to ~/Library/LaunchAgents/ Step A – You’ll need to setup LaunchAgentsĬreate the directory ~/Library/LaunchAgents if it doesn’t exist already. I got the following setup from this blog post at tunnelsup. Now to ensure postgres starts automatically every time you start your Mac, you’ll need to do some extra setup. $ brew update & brew upgrade postgresql Step 3 – Switchįinally, we’ll switch to the new version using the following command.Ĭleaning /usr/local/Cellar/postgresql/9.5.4_1Ĭleaning /usr/local/Cellar/postgresql/9.6.1ģ75 links created for /usr/local/Cellar/postgresql/9.6.1 Step 4 – Ensuring Postgresql Starts Automatically At Startup (optional, but makes your life easier) Next, we’ll use homebrew to upgrade it to the latest version. $ brew services stop postgresql Step 2 – Upgrade ![]() The first step is to turn off the postgres service if it’s running in the background. I had to follow these steps when I was upgrading to Postgres 9.6 Step 1 – Turn off Postgres Ok, so let’s say you have to upgrade postgres. Pretty easy, right? Upgrading Postgres via Homebrew It should install the latest version of Postgres available via Homebrew. ![]() Once you do that, all you have to do is issue the following command in your terminal: If you don’t, you can find some instructions here. This guide assumes that you have homebrew installed. Now if you want to use Heroku’s Postgres app, it’s pretty easy and is a good alternative to homebrew. So what follows is a mini-guide I put together on how to install postgresql on Mac as well as how to upgrade it with homebrew. At my next job, I used the homebrew package manager since that’s how our team used it. At my first job, I found that using Heroku’s Postgres app. One of the first things I had to do is figure out how to get Postgres up and running.Įventually, I had to learn a good way to upgrade it as well. But since that’s what I was given, that’s what I was used. I had never used a Mac before as I considered them overpriced relative to a desktop I could setup with Linux. But when I got my first job at a startup in California, I received a brand new shiny Macbook laptop. I started off programming Ruby on Rails applications on a Windows machine with an Ubuntu virtual machine running on top. ![]()
0 Comments
Leave a Reply. |