LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to ban the program start automatically on boot? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-ban-the-program-start-automatically-on-boot-4175585330/)

luofeiyu 07-23-2016 01:35 AM

How to ban the program start automatically on boot?
 
The 53 port will be used by program named.
tcp 0 0 110.110.110.110:53 0.0.0.0:* LISTEN 845/named
tcp 0 0 192.168.22.1:53 0.0.0.0:* LISTEN 845/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 845/named
Everytime the program 'named' start automatically on boot.
How to ban it start automatically on boot?

chkconfig named off
named: unknown service

unSpawn 07-23-2016 03:01 AM

Quote:

Originally Posted by luofeiyu (Post 5580143)
Code:

chkconfig named off

This is not the correct invocation: see 'chkconfig --list' for service names and 'man chkconfig' ("--level").
*If you don't need to provide DNS then best uninstall BIND and only reinstall name server software if absolutely necessary.

luofeiyu 07-23-2016 03:28 AM

root@hwy:/home/debian8# chkconfig --list
Code:

acpid                    0:off  1:off  2:on  3:on  4:on  5:on  6:off
alsa-utils                0:off  1:off  2:off  3:off  4:off  5:off  6:off  S:on
amule-daemon              0:off  1:off  2:on  3:on  4:on  5:on  6:off
anacron                  0:off  1:off  2:on  3:on  4:on  5:on  6:off
apache2                  0:off  1:off  2:on  3:on  4:on  5:on  6:off
atd                      0:off  1:off  2:on  3:on  4:on  5:on  6:off
avahi-daemon              0:off  1:off  2:on  3:on  4:on  5:on  6:off
bind9                    0:off  1:off  2:off  3:off  4:off  5:off  6:off

I have set `chkconfig bind9 off`,why program named still start automatically on boot?

Hasek39 07-23-2016 06:06 AM

As there is systemd as default initialization system in Debian now, I think that the correct way to remove any service or program from autostart is to use systemctl
Code:

# systemctl disable service_name

luofeiyu 07-23-2016 09:02 AM

It is no use
Code:

systemctl disable named
systemctl disable named was performed ,named was still executed after reboot.
netstat -anlp |grep 53
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 694/named
tcp 0 0 114.114.114.4:53 0.0.0.0:* LISTEN 694/named
tcp 0 0 192.168.22.1:53 0.0.0.0:* LISTEN 694/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 694/named

Code:

systemctl disable bind9
It works fine .


All times are GMT -5. The time now is 01:23 AM.