Archive for the tag 'Fedora'

SBDavid

Fedora systemctl command line tool

Fedora systemctl command line tool

start, stop, and restart the services on the command line using the systemctl utility.

Configuring Services

To allow you to configure which services are started at boot time, Fedora is shipped with the systemctl command line tool. Do not use the ntsysv and chkconfig utilities. Although it is still possible to use the ntsysv and chkconfig utilities to manage services that have init scripts installed in the /etc/rc.d/init.d/ directory, it is advised that you use the systemctl utility.

Enabling the Service

To configure a service to be automatically started at boot time, use the systemctl command in the following form:

systemctl enable service_name.service

Running the Service

To run a service, use the systemctl command in the following form:

systemctl start service_name.service

Unit Commands:

list-units List loaded units
start [NAME...] Start (activate) one or more units
stop [NAME...] Stop (deactivate) one or more units
reload [NAME...] Reload one or more units
restart [NAME...] Start or restart one or more units
try-restart [NAME...] Restart one or more units if active
reload-or-restart [NAME...] Reload one or more units is possible,
otherwise start or restart
reload-or-try-restart [NAME...] Reload one or more units is possible,
otherwise restart if active
isolate [NAME] Start one unit and stop all others
kill [NAME...] Send signal to processes of a unit

How to disable IPv6 in RHEL 5, Fedora, CentOS?

In Red Hat Enterprise 5 Linux internet protocol version 6 (IPv6) module is turned on by default and if your network is not ready to run IPv6 then you need to turn it off on your Linux server.

Steps to disabled IPv6 on RHEL 5:

1. In Fedora, CentOS or RHEL5 Linux modules are loaded using /etc/modprobe.conf file.

Add these line to disable autloading of IPv6 module in /etc/modprobe.conf

alias net-pf-10 off
alias ipv6 off

2. Next edit /etc/sysconfig/network

# vi /etc/sysconfig/network

Change to the following.

NETWORKING_IPV6=no

3. Also to disable the IPv6 service.

#service ip6tables stop

4. permanently disabling.

# chkconfig ip6tables off
SBDavid

Chkconfig

Chkconfig

The chkconfig command can also be used to activate and deactivate services. If you use the chkconfig –list command, you will see a list of system services and whether they are started (on) or stopped (off) in runlevels 0-6 (at the end of the list, you will see a section for the services managed by xinetd.

If you use chkconfig –list to query a service managed by xinetd, you will see whether the xinetd service is enabled (on) or disabled (off). For example, the following command shows that finger is enabled as an xinetd service:

$ chkconfig –list finger
finger on

More importantly, chkconfig can be used to set a service to be started (or not) in a specific runlevel. For example, to turn nscd off in runlevels 3, 4, and 5, use the command:

chkconfig –level 345 nscd off