Question: How to install Apache and configure Apache httpd to run as a service? Answer: Installing the Apache package If you have the apache package downloaded, you can install it using rpm command as root user. # rpm -ivh httpd If you have yum repository configured, use the recommended way of installing Apache httpd, i.e. with "yum install" command. # yum install httpd NOTE: To get a specific version replace httpd with the version you would like. Example: … [Read more...] about CentOS / RHEL : How to install and start the Apache httpd service
Question: How to prevent disabled repositories from being downloaded into the yum cache Answer: Yum does not fetch content from disabled repositories, but the yum cache may still hold a record of these repositories. The command "yum clean all" does not try to remove content from disabled repositories. So, to entirely get rid of them, use # rm -rf /var/cache/yum/* … [Read more...] about CentOS / RHEL : How to prevent disabled repositories from being downloaded into the yum cache
Service Name autofs Description This executes auto-mount daemon for filesystem mounting. The "auto-mount" daemon "mounts a filesystem when a client sends a request to this daemon" and "unmount it when there's no request for a long time". There are two types of automounters in Linux, autofs and AMD. AMD is implemented in user space and not a part of kernel. However, autofs is a newer system assisted by the kernel and it requires kernel lever support. As said before, autofs is implemented … [Read more...] about Linux / UNIX OS service : autofs
yum-cron is an optional package starting from Red Hat Enterprise Linux 6, this is a plugin for yum. From man page of yum-cron : yum-cron is a simple way to call yum commands from cron. It provides configuration to keep repository metadata up to date, and to check for, download, and apply updates. The yum-cron package provides a convenient way to check for, download and apply updates automatically. The cron jobs from the yum-cron package are active immediately after installing the package … [Read more...] about CentOS / RHEL : Configure yum automatic updates with yum-cron service
Service Name Bluetooth Description This executes Bluetooth wireless communication daemon. Bluetooth services for service discovery, authentication, Human Interface Devices, etc. Nature The bluetooth has three daemons: # /etc/init.d/bluetooth status hcid is stopped sdpd is stopped hidd is stopped hcid - "Host Controller Interface Daemon" Manages all the Bluetooth devices. sdpd - "SDP daemon" Allows Bluetooth devices connected to the host to advertise via SDP the Bluetooth … [Read more...] about Linux / UNIX OS service : Bluetooth
Question: How can I tell which user ran a specific command ? or If the user clears their .bash_history can I still tell who ran a command? Answer: Using the process accounting tools, you can get basic information about who ran a specific command. Below are the steps to find out who run the command. 1. The service must be running before the accounting will take place, this is achieved with the command: # /etc/init.d/psacct start 2. This can be enabled to run at every boot with the … [Read more...] about CentOS / RHEL : How to find which user run a specific command?
Question: How to open a port in RHEL 7 using the firewall-cmd command? Solution: To begin with check the firewalld status using the systemctl command : # systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2016-10-29 21:47:04 IST; 1 weeks 4 days ago Main PID: 1055 (firewalld) CGroup: /system.slice/firewalld.service … [Read more...] about CentOS / RHEL 7 : How to open a port in the firewall with firewall-cmd?
This post briefly outlines how one can force a ntp (Network Time Protocol) sync with the ntp servers defined in the /etc/ntp.conf configuration file. This will not work if there are no ntp servers defined in the /etc/ntp.conf, this can be verified using : # grep ^server /etc/ntp.conf This document is useful when the date gets reset e.g. by a hardware maintenance such as a motherboard replacement. Steps to force NTP sync 1. Stop the ntpd service : # service ntpd stop 2. Force an … [Read more...] about CentOS / RHEL 6 : How to force a NTP sync with the NTP server(s)
Question: How to disable BASH shell history, so that it does not save users shell history? Solution: Add a line like the following to the end of /etc/profile or a new /etc/profile.d/*.sh file unset HISTFILE This will make each user's bash shell to skip saving history files unless the users manually configure the HISTFILE variable. caveat There is no practical way to completely prevent users from saving their own bash shell history. Users can still get auto-saved shell history by … [Read more...] about CentOS / RHEL : How to disable BASH shell history
As Per the ip man page, there are three route types which will drop traffic in specific ways: Route types: unreachable - these destinations are unreachable. Packets are discarded and the ICMP message host unreachable is generated. The local senders get an EHOSTUNREACH error. blackhole - these destinations are unreachable. Packets are discarded silently. The local senders get an EINVAL error. prohibit - these destinations are unreachable. Packets are discarded and the ICMP message … [Read more...] about CentOS / RHEL : How to add a null route in Linux