2014-10-13 20 views
39

Ho installato postgresql tramite HomeBrew. Ha funzionato, ma oggi trovo che il server postgresql non venga eseguito all'avvio del computer.Impossibile caricare postgresql all'avvio in Mac OS

cerco di usare launchctl per caricare di nuovo con il comando di seguito:

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 

e vedo il messaggio:

/usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist: Service is disabled 

Non so come attivare il servizio PostgreSQL. Qualcuno potrebbe mostrarmi?

risposta

81

Utilizzare l'opzione -w con launchctl.

$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 

-w Sostituzioni il tasto disabili e lo imposta su false.

+6

In Yosemite che dovrebbe essere 'launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist'. – Zubin

+0

Dove '-w' inserisce l'override" Disabilitato "? Dopo aver eseguito questo comando, non riesco a trovarlo in '/ private/var/db/launchd.db/com.apple.launchd/overrides.plist'. – Matt

+8

Tuttavia, come è stato disattivato in primo luogo? Ho incontrato lo stesso problema senza un motivo apparente, solo curioso ... –

1

Potrebbe anche essere utile per utilizzare il comando brew info postgresql per suggerimenti su come impostare il database e spostare il file plist in ~/Library/LaunchAgents

5

Il nuovo modo come brew info postgresql dice:

brew services start postgresql 
Problemi correlati