Restart Apache in a version agnostic way
up vote
0
down vote
favorite
I use latest Ubuntu 18.04 LAMP but might as well use Debian LAMP or CentOS or something else common.
To restart Apache2 I do:
systemctl restart apache2
But say "tomorrow" this changes the apache2 changes to apache3 or apache-3 or just apache.
What will be the most correct way to prevent a fail in restart? I assume this shell-glob is good:
systemctl restart apache*
Will you use this way as well, or something else?
apache-httpd wildcards version stability
add a comment |
up vote
0
down vote
favorite
I use latest Ubuntu 18.04 LAMP but might as well use Debian LAMP or CentOS or something else common.
To restart Apache2 I do:
systemctl restart apache2
But say "tomorrow" this changes the apache2 changes to apache3 or apache-3 or just apache.
What will be the most correct way to prevent a fail in restart? I assume this shell-glob is good:
systemctl restart apache*
Will you use this way as well, or something else?
apache-httpd wildcards version stability
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I use latest Ubuntu 18.04 LAMP but might as well use Debian LAMP or CentOS or something else common.
To restart Apache2 I do:
systemctl restart apache2
But say "tomorrow" this changes the apache2 changes to apache3 or apache-3 or just apache.
What will be the most correct way to prevent a fail in restart? I assume this shell-glob is good:
systemctl restart apache*
Will you use this way as well, or something else?
apache-httpd wildcards version stability
I use latest Ubuntu 18.04 LAMP but might as well use Debian LAMP or CentOS or something else common.
To restart Apache2 I do:
systemctl restart apache2
But say "tomorrow" this changes the apache2 changes to apache3 or apache-3 or just apache.
What will be the most correct way to prevent a fail in restart? I assume this shell-glob is good:
systemctl restart apache*
Will you use this way as well, or something else?
apache-httpd wildcards version stability
apache-httpd wildcards version stability
edited Nov 18 at 1:07
asked Nov 18 at 0:52
JohnDoea
561032
561032
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
It will not just magically change.
When it comes to apache for Debian/Ubuntu/Mint or httpd for Fedora/RHEL/CentOS, updates keep the same name with only the version number changing so the service unit will be the same. If a new release comes out such as apache3, that will be a different package and you'll have to configure and set that one up if you want to run a web server with it. apache2 will stay the same. httpd and httpd24 for Fedora/RHEL/CentOS are different packages and installing the latter doesn't change anything with the former.
In regards to some of your comments, apt-get upgrade will upgrade the package to its latest version. It will install new packages for dependencies if necessary but it won't remove or change existing packages.
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
Wouldn't runningupgrade lamp-server^ -yagain when Apache-3 comes out transduce my Apache?
– JohnDoea
Nov 18 at 1:26
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It will not just magically change.
When it comes to apache for Debian/Ubuntu/Mint or httpd for Fedora/RHEL/CentOS, updates keep the same name with only the version number changing so the service unit will be the same. If a new release comes out such as apache3, that will be a different package and you'll have to configure and set that one up if you want to run a web server with it. apache2 will stay the same. httpd and httpd24 for Fedora/RHEL/CentOS are different packages and installing the latter doesn't change anything with the former.
In regards to some of your comments, apt-get upgrade will upgrade the package to its latest version. It will install new packages for dependencies if necessary but it won't remove or change existing packages.
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
Wouldn't runningupgrade lamp-server^ -yagain when Apache-3 comes out transduce my Apache?
– JohnDoea
Nov 18 at 1:26
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
|
show 1 more comment
up vote
1
down vote
accepted
It will not just magically change.
When it comes to apache for Debian/Ubuntu/Mint or httpd for Fedora/RHEL/CentOS, updates keep the same name with only the version number changing so the service unit will be the same. If a new release comes out such as apache3, that will be a different package and you'll have to configure and set that one up if you want to run a web server with it. apache2 will stay the same. httpd and httpd24 for Fedora/RHEL/CentOS are different packages and installing the latter doesn't change anything with the former.
In regards to some of your comments, apt-get upgrade will upgrade the package to its latest version. It will install new packages for dependencies if necessary but it won't remove or change existing packages.
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
Wouldn't runningupgrade lamp-server^ -yagain when Apache-3 comes out transduce my Apache?
– JohnDoea
Nov 18 at 1:26
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
|
show 1 more comment
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It will not just magically change.
When it comes to apache for Debian/Ubuntu/Mint or httpd for Fedora/RHEL/CentOS, updates keep the same name with only the version number changing so the service unit will be the same. If a new release comes out such as apache3, that will be a different package and you'll have to configure and set that one up if you want to run a web server with it. apache2 will stay the same. httpd and httpd24 for Fedora/RHEL/CentOS are different packages and installing the latter doesn't change anything with the former.
In regards to some of your comments, apt-get upgrade will upgrade the package to its latest version. It will install new packages for dependencies if necessary but it won't remove or change existing packages.
It will not just magically change.
When it comes to apache for Debian/Ubuntu/Mint or httpd for Fedora/RHEL/CentOS, updates keep the same name with only the version number changing so the service unit will be the same. If a new release comes out such as apache3, that will be a different package and you'll have to configure and set that one up if you want to run a web server with it. apache2 will stay the same. httpd and httpd24 for Fedora/RHEL/CentOS are different packages and installing the latter doesn't change anything with the former.
In regards to some of your comments, apt-get upgrade will upgrade the package to its latest version. It will install new packages for dependencies if necessary but it won't remove or change existing packages.
edited Nov 18 at 1:48
answered Nov 18 at 1:02
Nasir Riley
2,176239
2,176239
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
Wouldn't runningupgrade lamp-server^ -yagain when Apache-3 comes out transduce my Apache?
– JohnDoea
Nov 18 at 1:26
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
|
show 1 more comment
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
Wouldn't runningupgrade lamp-server^ -yagain when Apache-3 comes out transduce my Apache?
– JohnDoea
Nov 18 at 1:26
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
This sounds to me a bit disturbing, pushes me more away from vanilla-Bash and towards Ansible (or I'm wrong here as well?).
– JohnDoea
Nov 18 at 1:24
Wouldn't running
upgrade lamp-server^ -y again when Apache-3 comes out transduce my Apache?– JohnDoea
Nov 18 at 1:26
Wouldn't running
upgrade lamp-server^ -y again when Apache-3 comes out transduce my Apache?– JohnDoea
Nov 18 at 1:26
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Crap, maybe I need a Vagrant-Ansible-Docker stack after all, or maybe becoming more flexible with vanilla-Bash, I'm not sure.
– JohnDoea
Nov 18 at 1:27
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
Nasir could I speak with you in person please, I feel a bit lost between the options, I'll gladly share with you my GitHub account and the four small scripts I wrote. Your advice could help me much...
– JohnDoea
Nov 18 at 1:28
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
@JohnDoea Join me in chat.
– Nasir Riley
Nov 18 at 1:35
|
show 1 more comment
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482440%2frestart-apache-in-a-version-agnostic-way%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown