Apache and systemd

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Apache and systemd

Tom Browder
If I build a new server using --enable-systemd how does that affect using apachectl?

Can I still apachectl for interactive start/stop while systemd takes care of reboots?

Thanks.

Best regards,

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

Richard


> Date: Wednesday, June 17, 2020 06:48:27 -0500
> From: Tom Browder <[hidden email]>
>
> If I build a new server using --enable-systemd how does that affect
> using apachectl?
>
> Can I still apachectl for interactive start/stop while systemd
> takes care of reboots?
>


You would use "systemctl" to start/stop/reload/... the server, e.g.,

   systemctl start httpd.service  


(the ".service" bit is probably unnecessary).



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

Tom Browder
On Wed, Jun 17, 2020 at 15:46 Richard <[hidden email]> wrote:
...
> If I build a new server using --enable-systemd how does that affect
> using apachectl?
...
You would use "systemctl" to start/stop/reload/... the server, e.g.,

   systemctl start httpd.service

Thanks, Richard.

Hm, that doesn't work, and "systemctl list-unit-files" shows nothing for httpd.

So what is "--enable-systemd" supposed to give me?

-Tom

Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

David Copeland
On OpenSuse, I use

systemctl <command> apache2

where <command> is start, stop, status, reload, or whatever (do a "man systemctl")

Dave.

On 2020-06-17 6:28 p.m., Tom Browder wrote:
On Wed, Jun 17, 2020 at 15:46 Richard <[hidden email]> wrote:
...
> If I build a new server using --enable-systemd how does that affect
> using apachectl?
...
You would use "systemctl" to start/stop/reload/... the server, e.g.,

   systemctl start httpd.service

Thanks, Richard.

Hm, that doesn't work, and "systemctl list-unit-files" shows nothing for httpd.

So what is "--enable-systemd" supposed to give me?

-Tom



-- 
David Copeland
JSI Data Systems Limited
613-727-9353
www.jsidata.ca
Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

Tom Browder
On Thu, Jun 18, 2020 at 07:24 David Copeland <[hidden email]> wrote:
On OpenSuse, I use

systemctl <command> apache2

where <command> is start, stop, status, reload, or whatever (do a "man systemctl")

Thanks, Dave.

But do you add the appropriate systemd files to enable auto start and shutdown of httpd upon reboot?

Manual use is pretty straight forward, but, for me, the service file syntax is not so clear. I'm afraid of getting locked out without easy hands-on access to my remote servers.

Cheers,

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

David Copeland
Hi Tom,

To have Apache start on boot do: systemctl enable apache2

Then a systemctl status apache2 yields something like :

dbc:~ # systemctl status apache2
● apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-06-16 07:33:57 EDT; 2 days ago
..... more stuff omitted ....

Note the "enabled".

Dave.



On 2020-06-18 8:36 a.m., Tom Browder wrote:
On Thu, Jun 18, 2020 at 07:24 David Copeland <[hidden email]> wrote:
On OpenSuse, I use

systemctl <command> apache2

where <command> is start, stop, status, reload, or whatever (do a "man systemctl")

Thanks, Dave.

But do you add the appropriate systemd files to enable auto start and shutdown of httpd upon reboot?

Manual use is pretty straight forward, but, for me, the service file syntax is not so clear. I'm afraid of getting locked out without easy hands-on access to my remote servers.

Cheers,

-Tom


-- 
David Copeland
JSI Data Systems Limited
613-727-9353
www.jsidata.ca
Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

Tom Browder
On Thu, Jun 18, 2020 at 07:48 David Copeland <[hidden email]> wrote:
Hi Tom,

To have Apache start on boot do: systemctl enable apache2

David, thanks so much!

So should a person installing Apache from source with "--enable-systemd" expect the service to be enabled during the installation, i.e., this is a bug?

Or did I miss something in the docs?

Gratefully,

-Tom
Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

David Copeland
Sorry, can't help you there, I've never installed from source, only pre-built packages. However my guess would be that the "--enable-systemd" option relates only to adding the ability to use systemctl commands, not actually setting auto startup.

Dave.

On 2020-06-18 9:31 a.m., Tom Browder wrote:
On Thu, Jun 18, 2020 at 07:48 David Copeland <[hidden email]> wrote:
Hi Tom,

To have Apache start on boot do: systemctl enable apache2

David, thanks so much!

So should a person installing Apache from source with "--enable-systemd" expect the service to be enabled during the installation, i.e., this is a bug?

Or did I miss something in the docs?

Gratefully,

-Tom


-- 
David Copeland
JSI Data Systems Limited
613-727-9353
www.jsidata.ca
Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

Christophe JAILLET
In reply to this post by Tom Browder
Le 18/06/2020 à 15:31, Tom Browder a écrit :
On Thu, Jun 18, 2020 at 07:48 David Copeland <[hidden email]> wrote:
Hi Tom,

To have Apache start on boot do: systemctl enable apache2

David, thanks so much!

So should a person installing Apache from source with "--enable-systemd" expect the service to be enabled during the installation, i.e., this is a bug?

Or did I miss something in the docs?

Gratefully,

-Tom

Hi,

AFAIK --enable-systemd is only a command line option of 'configure' which defines if the module should be built, as a module or statically linked, or not.

just my 2c,

CJ

Reply | Threaded
Open this post in threaded view
|

Re: Apache and systemd

Curtis Maurand
In reply to this post by Tom Browder
on centos and related it’s httpd. on debian and related it’s apache2

Sent from my iPhone

On Jun 18, 2020, at 8:37 AM, Tom Browder <[hidden email]> wrote:


On Thu, Jun 18, 2020 at 07:24 David Copeland <[hidden email]> wrote:
On OpenSuse, I use

systemctl <command> apache2

where <command> is start, stop, status, reload, or whatever (do a "man systemctl")

Thanks, Dave.

But do you add the appropriate systemd files to enable auto start and shutdown of httpd upon reboot?

Manual use is pretty straight forward, but, for me, the service file syntax is not so clear. I'm afraid of getting locked out without easy hands-on access to my remote servers.

Cheers,

-Tom