System has not been booted with systemd ERROR when updating Postgresql in Ubuntu - postgresql

I've been following this link to update Postgresql on my Ubuntu-18.04 (VM running on Windows 10)
https://computingforgeeks.com/install-postgresql-12-on-ubuntu/
However, Im getting the below error, so I cannot proceed.
.../desktop/my_app$ systemctl status postgresql.service
System has not been booted with systemd as init system (PID 1). Can't operate.
What can I do?

service postgresql status
or
systemctl status postgresql
Must work.

Related

error in mogodb status server after the installation put the comando # systemctl status mongod

I am installing mongodb in a debian machine but when i end the process and after that put the next command systemctl status mongod, the result is:
So What can I do to revolv the error?
Thanks a lot.
I am trying to installa graylog system but I am sttoped with this error in mongo db...
The failure was signal ILL:
Illegal instruction. The ILL signal is sent to a process when it attempts to execute a malformed, unknown, or privileged instruction.
Starting with version 5.0 MongoDB requires that the CPU support the Advanced Vector Extensions.
The machine you are attempting to start mongod on does not support AVX. You will need to either use a different computer, or downgrade to mongodb version 4.4 or earlier.

Ubuntu - Failed to stop postgres.service: Unit postgres.service not loaded

I tried to stop postgres with the command systemctl stop postgres and I got this error. Now I can't start postgres in a docker container because the port is already used.
I fixed, I had to use the command systemctl stop postgresql instead of systemctl stop postgres.

how to make mongo db start after ubuntu startup

mongo connection failed in terminal every time after ubuntu startup then after running the command sudo service mongod start it is working fine. I am using ubuntu 18.04. How to fix it that it may run always without the above command?
Try below:
sudo systemctl enable mongod
Reboot your machine and check if the service is up.
sudo systemctl status mongod
Checking out the manpage will give you a lot of information.
See systemctl manpage
http://manpages.ubuntu.com/manpages/cosmic/en/man1/systemctl.1.html

PostgreSQL Services

Can someone give a detailed explanation of how the postgresql service(s) works on Ubuntu [16.04]? The behavior that leads me to ask is the following. I use the command sudo systemctl start postgresql to start my postgresql service. When I run systemctl list-units | grep post I see
UNIT LOAD ACTIVE SUB DESCRIPTION
postgresql.service loaded active exited PostgreSQL RDBMS
postgresql#9.6-main.service loaded active running PostgreSQL Cluster 9.6-main
system-postgresql.slice loaded active active system-postgresql.slice
and when I run sudo systemctl stop postgresql both postgresql.service and postgresql#9.6-main.service disappear. What is each of these three services doing?
I assume postgresql#9.6-main.service is registered service for PostgreSQL Cluster 9.6-main cluster. This is the one that actually controls postgres on your system.
I assume postgresql.service is the effect desribed here
I assume system-postgresql.slice is a postgres slice unit
none of above are critical for running postgres. You can start/stop the cluser with just pg_ctl, without registering it with your services. But if you wonder which service runs it in your case - then it is postgresql#9.6-main.service

Weird systemctl behavior

I installed Postgres9.6 on my Ubuntu 16.04 through apt-get. and I installed the same version on an AWS ubuntu instance to try replication.
I was following the steps from this blog:
http://www.rassoc.com/gregr/weblog/2013/02/16/zero-to-postgresql-streaming-replication-in-10-mins/
Now I can log to the postgres user on both machines, and run psql and execute all database operations. But when I check the status of the server (on both machines) using sudo systemctl status postgres.service, I get this:
● postgres.service Loaded: not-found (Reason: No such file or
directory) Active: inactive (dead)
Which is weird because I can run psql, right?
And this prevents me from creating remote connections.