Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm in the process of installing postgresql onto a second server

Previously I installed postgresql and then used the supplied script

./contrib/start-scripts/linux

Placed into the correct dir

# cp ./contrib/start-scripts/linux /etc/rc.d/init.d/postgresql92
# chmod 755 /etc/rc.d/init.d/postgresql92

Which I could then execute as expected with

# service postgresql92 start

However the new machine is using Systemd and it looks like there is a completely different way to do this

I don't want to hack at this and ruin something so I was wondering if anyone out there could point me in the right direction of how to achieve the same result

share|improve this question

1 Answer 1

# systemctl start postgresql.service

Some environments would translate service <name> start to systemctl start <name>.service, but you don't have to rely on it.

share|improve this answer
    
But where would I place the postgresql92 script? –  Trent Aug 6 at 4:57
    
You don't use it anymore in systemd. Your distribution should provide you with the postgresql systemd service file so that youcan start the service. –  Emeric Aug 6 at 5:12
    
The postgresql was installed from source though, not using dnf because I need to install 3 versions of postgres in specific directories, is it possible to use the supplied start-scripts linux file to start postgresql? –  Trent Aug 6 at 7:23
    
My distribution adds this script as /usr/lib/systemd/system/postgresql.service. The start-scripts provided by postgresql seem to only cover SysV. –  Emeric Aug 6 at 7:46
    
did you install postgres using dnf or yum? –  Trent Aug 6 at 7:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.