maybe
maybe copied to clipboard
Addition to Wiki -> Linux Dev-> Troubleshooting
Troubleshooting for users who cannot start postgresql due to using 'init' initialization system rather than 'systemctl'
I've installed postgresql but I am unable to start the server?
The standard Linux setup instructs you to initialize postgresql with the command sudo systemctl start postgresql. However, this assumes that you're Linux distribution is using 'systemd' as its initialization system, when it may be using 'init'. To determine whether your system is utilizing 'init' or 'systemd' as its initialization system, run the following command:
ps -p 1
If you're Linux distribution is using init, the output should look something like this:
PID TTY TIME CMD
1 ? 00:00:00 init
The text underneath the CMD header indicates the intialization system your Linux distribution is using. If the initialization system is listed as 'init' rather than 'systemd', then you can start the PSQL server and check it's connection status by running these commands:
sudo service postgresql start
sudo service postgresql status
Additionally, I think adding these commands after the rbenv global call might help prevent issues related to ruby calls pointing to ruby installations not managed within the .rbenv folder
rbenv local --unset
rbenv shell --unset
https://stackoverflow.com/a/39238995
@cmhhelgeson thanks again for these updates. I've made a note under the Ruby version setup about your second comment and have updated the Postgres step to just use the service
command as I believe that command runs universally for both systemd and init.