Author: Sahil Suri

12 DPKG command examples

Introduction The package manager for Debian and distros derived from Debian is called dpkg or Debian package. As users, we can use dpkg directly or use higher level programs like apt(advanced package management tool) which gives us a few more features. Utilities such as dpkg-deb and dpkg-query use dpkg as a front-end to perform some actions. In this article, we will demonstrate how you can use the dpkg package manager to list, install, uninstall and query package on an Ubuntu 16.04 system. Example 1: Display dpkg version To display the version of the dpkg package manager installed on your system use the dpkg command with the –version option. root@linuxnix:~# dpkg --version Debian 'dpkg' package management program version 1.18.4 (amd64). This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty. root@linuxnix:~#   Example 2: List all installed packages Using the dpkg command with the -l option lists all packages currently installed on the system. root@linuxnix:~# dpkg -l Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==================================-======================================= ii accountsservice 0.6.40-2ubuntu11.1 amd64 query and manipulate user account information ii adduser 3.113+nmu3ubuntu4 all add and remove users and groups ii apparmor 2.10.95-0ubuntu2 amd64 user-space parser utility for AppArmor ii apt 1.2.12~ubuntu16.04.1 amd64 commandline package manager ii apt-transport-https 1.2.12~ubuntu16.04.1 amd64 https download transport for APT -----------------------------------------------------------output truncated for brevity...

Read More

Monitoring a Remote Centos 6 server with Nagios core

Introduction In our earlier articles on nagios we explained in detail how to install nagios core on the centos 6 system and configure it. In this article we will explain step by step how to monitor a remote machine with nagios core. Prerequisites: We will be installing the packages required for configuring nagios on a client machine using the EPEL repository therefore it must be enabled on the system. Please go through our article on how to enable the EPEL repository if you are unfamiliar about how to do so. Install NRPE and nagios plugins Now we will install the nrpe package along with nagios plugins using yum. [ssuri@nagios-client:~] $ sudo yum install nrpe nagios-plugins-all Loaded plugins: rhnplugin, security This system is receiving updates from RHN Classic or RHN Satellite. Setting up Install Process ------------------------------------output truncated for brevity Installed: nagios-plugins-all.x86_64 0:2.2.1-4git.el6 Dependency Installed: fping.x86_64 0:2.4b2-10.el6 lgtonmc.x86_64 0:9.2.1.2-1 lm_sensors.x86_64 0:3.1.1-17.el6 nagios-plugins.x86_64 0:2.2.1-4git.el6 nagios-plugins-breeze.x86_64 0:2.2.1-4git.el6 nagios-plugins-by_ssh.x86_64 0:2.2.1-4git.el6 nagios-plugins-cluster.x86_64 0:2.2.1-4git.el6 nagios-plugins-dhcp.x86_64 0:2.2.1-4git.el6 nagios-plugins-dig.x86_64 0:2.2.1-4git.el6 nagios-plugins-disk.x86_64 0:2.2.1-4git.el6 nagios-plugins-disk_smb.x86_64 0:2.2.1-4git.el6 nagios-plugins-dns.x86_64 0:2.2.1-4git.el6 nagios-plugins-dummy.x86_64 0:2.2.1-4git.el6 nagios-plugins-file_age.x86_64 0:2.2.1-4git.el6 nagios-plugins-flexlm.x86_64 0:2.2.1-4git.el6 nagios-plugins-fping.x86_64 0:2.2.1-4git.el6 nagios-plugins-game.x86_64 0:2.2.1-4git.el6 nagios-plugins-hpjd.x86_64 0:2.2.1-4git.el6 nagios-plugins-http.x86_64 0:2.2.1-4git.el6 nagios-plugins-icmp.x86_64 0:2.2.1-4git.el6 nagios-plugins-ide_smart.x86_64 0:2.2.1-4git.el6 nagios-plugins-ircd.x86_64 0:2.2.1-4git.el6 nagios-plugins-ldap.x86_64 0:2.2.1-4git.el6 nagios-plugins-load.x86_64 0:2.2.1-4git.el6 nagios-plugins-log.x86_64 0:2.2.1-4git.el6 nagios-plugins-mailq.x86_64 0:2.2.1-4git.el6 nagios-plugins-mrtg.x86_64 0:2.2.1-4git.el6 nagios-plugins-mrtgtraf.x86_64 0:2.2.1-4git.el6 nagios-plugins-mysql.x86_64 0:2.2.1-4git.el6 nagios-plugins-nagios.x86_64 0:2.2.1-4git.el6 nagios-plugins-nt.x86_64 0:2.2.1-4git.el6 nagios-plugins-ntp.x86_64 0:2.2.1-4git.el6 nagios-plugins-ntp-perl.x86_64 0:2.2.1-4git.el6 nagios-plugins-nwstat.x86_64 0:2.2.1-4git.el6 nagios-plugins-oracle.x86_64 0:2.2.1-4git.el6 nagios-plugins-overcr.x86_64 0:2.2.1-4git.el6 nagios-plugins-perl.x86_64 0:2.2.1-4git.el6 nagios-plugins-pgsql.x86_64 0:2.2.1-4git.el6 nagios-plugins-ping.x86_64 0:2.2.1-4git.el6 nagios-plugins-procs.x86_64 0:2.2.1-4git.el6 nagios-plugins-real.x86_64 0:2.2.1-4git.el6 nagios-plugins-rpc.x86_64 0:2.2.1-4git.el6 nagios-plugins-sensors.x86_64 0:2.2.1-4git.el6 nagios-plugins-smtp.x86_64...

Read More

Installing Nagios on Centos 7 part 3 (Nagios configuration)

Introduction In our previous two articles we’ve explained how to install Nagios core on a Centos 7 system and how to install Nagios plugin and the Nagios Remote Plugin Executor. In this article we will explain how to configure Nagios so that we can have the web interface up and running. Note that this needs to be done only once on the Nagios server. You may make amendments as deemed necessary. Update the Nagios main configuration file: The nagios.cfg file is the heart of your nagios core configuration. The location of this file may vary depending on where you installed nagios. The general location of the file is /usr/local/nagios/etc/nagios.cfg This file contains information about the location of other configuration files and template files which nagios will read in order to determine which assets are to be monitored and which services on those assets are to be monitored. We can define the location to these configuration files using the cfg_file directive. By default Nagios already has most of the configuration files set up and ready to use as shown below: [ssuri@linuxnix:/usr/local/nagios/etc] $ grep -E '^cfg_file' nagios.cfg cfg_file=/usr/local/nagios/etc/objects/commands.cfg cfg_file=/usr/local/nagios/etc/objects/contacts.cfg cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg cfg_file=/usr/local/nagios/etc/objects/templates.cfg cfg_file=/nagiosap/objects/hostgroups/linux.cfg cfg_file=/usr/local/nagios/etc/objects/localhost.cfg We will talk about the purpose of these configuration files in greater detail in later articles. You could also define a directory location and tell nagios to read all files ending with .cfg extension within that directory. Add...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.