how to install initctl on a centos-7 box [closed] - centos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
service autofs restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service autofs restart
/etc/init.d/autofs: line 54: initctl: command not found
I have looked up on the web and do not see any yum package that can install initctl. can you please help.

CentOS 7 comes with systemctl to manage service. You don't need to use initctl.
service autofs restart should point to systemctl restart autofs
You can check the status of this service with systemctl status autofs and post us the output if not able to restart.

Related

Raspberry pi NTP working without conf file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
On raspberry, I was looking at the NTP configuration file under /etc/systemd/timesyncd.conf. All lines are commented (by default) but when I run the timedatectl status command, I get:
...
Network time on : yes
NTP synchronized : yes
...
How NTP works without configuration in conf file ? Where are NTP server links ?
Raspberry pi 3 ; Raspbian 9.13 (stretch)
The NTP management of systemd is called systemd-timesyncd. On my Ubuntu system, the corresponding systemd service is /lib/systemd/system/systemd-timesyncd.service. Typically, when you don't have items activated in a configuration file, daemons use default values. Moreover, if you look at the comment in the configuration file, you will see that the commented items are actually default values:
Entries in this file show the compile time defaults.
You can change settings by editing this file.
Defaults can be restored by simply deleting this file.

vapor: Address already in use (errno: 98) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I deployed my vapor project to Ubuntu. And made the configuration of supervisor and Nginx.
When I invoke my server. first call is success but When I try second call I get 502 bad gateway error from browser. When I check error log, the error is
"Fatal error: Error raised at top level: bind(descriptor:ptr:bytes:) failed: Address already in use (errno: 98) : file /home/buildnode/jenkins/wo$"
If I kill the port(8080) process. And after, I try to connect again first try is success then get fail again.
What should I do to get rid of this error?
This might be caused by another process using that port.
I had the same issue and was able to solve it by listing all the processes on port :8080:
$ sudo lsof -i :8080
and then killing all of them one by one by typing:
$ kill {PID of the process}
After that, my app built again properly.
taken from here
I had the same issue. This worked for me:
$ kill -9 {PID of the process}
Hope this helps!

Automated Putty Program? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have multiple Linux vps's and I need to be able to run a program that executes a command on the servers at the same time, or with minor delay. If someone could point my in the right direction that would be great. Thanks.
In bash, you can run a task in the background by appending & after the command. I would write a script to execute the command on the different servers:
#!/bin/bash
for server in server1.domain server2.domain server3.domain
do
ssh username#$server "mycommand params"&
done
This is for manual execution of a task on a number of remote machines. Of course, you will need to be using public key authentication (not password) otherwise it will hang on the password prompt.
If instead you meant that you want a regularly scheduled task to run on each individual machine, use cron as another answer suggested.

Start systemd service after specific service? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have a general question. How does one start a systemd unit *.service after a particular *.service has started successfully?
More specific question is, how do I start website.service only after mongodb.service has started? In other words website.service should depend on mongodb.service.
In the .service file under the [Unit] section:
[Unit]
Description=My Website
After=syslog.target network.target mongodb.service
The important part is the mongodb.service
The manpage describes it however due to formatting it's not as clear on first sight
systemd.unit - well formatted
systemd.unit - not so well formatted
After= dependency is only effective when service including After= and service included by After= are both scheduled to start as part of your boot up.
Ex:
a.service
[Unit]
After=b.service
This way, if both a.service and b.service are enabled, then systemd will order b.service after a.service.
If I am not misunderstanding, what you are asking is how to start b.service when a.service starts even though b.service is not enabled.
The directive for this is Wants= or Requires= under [Unit].
website.service
[Unit]
Wants=mongodb.service
After=mongodb.service
The difference between Wants= and Requires= is that with Requires=, a failure to start b.service will cause the startup of a.service to fail, whereas with Wants=, a.service will start even if b.service fails. This is explained in detail on the man page of .unit.

CPAN download failing [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Has anyone noticed a serious problem with CPAN downloads?
All of the download links seem to be iunable to resolve www.cpan.org,
but the directory structure inside CPAN doesn't allow any simple swapping to search.cpan.org.
Has anyone found a fix?
Tried to use metacpan.org:
wget http://metacpan.org/CPAN/authors/id/M/MP/MPIOTR/Text-Iconv-1.7.tar.gz
Result:
--2013-06-15 16:00:17-- https://metacpan.org/CPAN/authors/id/M/MP/MPIOTR/Text-Iconv-1.7.tar.gz
Connecting to metacpan.org|46.43.35.68|:443... connected.
ERROR: certificate common name “cpan.metacpan.org” doesn’t match requested host name “metacpan.org”.
To connect to metacpan.org insecurely, use ‘--no-check-certificate’.
Tried without certificate: page not found.
What is happening in CPAN?
http://search.cpan.org seems temporarily broken. You can use https://metacpan.org instead. For the certificates, you can bypass it by using :
export PERL_LWP_SSL_VERIFY_HOSTNAME=0
cpan https://metacpan.org/path/to/Module.pm