Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)

I'm using Arch Linux (4.8.13-1-ARCH). I am attempting to set up PostgreSQL as instructed here.

After performing

[postgres@BitBox ~]$ initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgres/data -l logfile start

Successfully, I have returned to my regular user using the exit command.

[postgres@BitBox ~]$ exit
logout

Later, while trying to start postgresql.service, I am getting the below error:

[code_master5@BitBox ~]$ sudo systemctl start postgresql.service
Failed to start postgresql.service: Unit postgresql.service not found.

I'm don't even get the status of the service:

[code_master5@BitBox ~]$ sudo systemctl status postgresql.service
Unit postgresql.service could not be found.

Can anyone help me with this? 

1 Answer

0 votes
by (12.7k points)
edited by

You can try executing the following codes:

service postgresql-10.service restart
service postgresql-XX.service restart

Check out the SQL Tutorial to Learn SQL concepts in detail.

Start your SQL career with the best SQL Training course today!

Related questions

0 votes
1 answer
asked Dec 13, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...