• Package Management
  • Learning Kali Linux




    Download 22,59 Mb.
    Pdf ko'rish
    bet33/225
    Sana14.05.2024
    Hajmi22,59 Mb.
    #232856
    1   ...   29   30   31   32   33   34   35   36   ...   225
    Bog'liq
    learningkalilinux

    Service Management | 27


    particular mode of operation of your system. In 
    Example 1-6
    , you can see an example
    of one of these scripts from the 
    syslog
    service.
    Example 1-6. Configuring service for systemd
    [Unit]
    Description=System Logging Service
    Requires=syslog.socket
    Documentation=man:rsyslogd(8)
    Documentation=http://www.rsyslog.com/doc/
    [Service]
    Type=notify
    ExecStart=/usr/sbin/rsyslogd -n
    StandardOutput=null
    Restart=on-failure
    [Install]
    WantedBy=multi-user.target
    Alias=syslog.service
    The 
    Unit
    section indicates requirements and the description as well as documenta‐
    tion. The 
    Service
    section indicates how the service is to be started and managed. The
    Install
    service indicates the target that is to be used. In this case, 
    syslog
    is in the multi-
    user target.
    Kali is using a 
    systemd
    -based system for initialization and service management, so
    you will primarily use 
    systemctl
    to manage your services. In rare cases, a service that
    has been installed doesn’t support installing to 
    systemd
    . In that case, you will install a
    service script to 
    /etc/init.d/
    and you will have to call the script there to start and stop
    the service. For the most part, these are rare occurrences, though.
    Package Management
    While Kali comes with an extensive set of packages, not everything Kali is capable of
    installing is in the default installation. In some cases, you may want to install pack‐
    ages. You are also going to want to update your set of packages. To manage packages,
    regardless of what you are trying to do, you can use the Advanced Package Tool (
    apt
    )
    to perform package management functions. There are also other ways of managing
    packages. You can use frontends, but in the end, they are all just programs that sit on
    top of 
    apt
    . You can use whatever frontend you like, but 
    apt
    is so easy to use, it’s useful
    to know how to use it. While it’s command line, it’s still a great program. In fact, it’s
    quite a bit easier to use than some of the frontends I’ve seen on top of 
    apt
    over the
    years.

    Download 22,59 Mb.
    1   ...   29   30   31   32   33   34   35   36   ...   225




    Download 22,59 Mb.
    Pdf ko'rish