Checking the SELinux operational mode

How to Check SELinux Status (Operational Mode)

SELinux, which stands for Security Enhanced Linux, is an extra layer of security control built for Linux systems. SELinux has three possible modes in which it can be running. Depending on which mode it’s in will determine the behavior of SELinux. In this tutorial, we’ll show you how to check the SELinux status aka. operational mode. The most common and easiest way to check SELinux status is by executing the getenforce command.

Read more

Configuring Gmail as a Sendmail relay on Linux

Configuring Gmail as a Sendmail email relay

Sendmail is email routing software that can allow Linux systems to send an email from the command line. This allows you to send email from your bash scripts, hosted website, or from command line using the mail command. Another example where you can utilize this setting is for notification purposes such as failed backups, etc.

In this guide, we’ll go over the step by step instructions to configure Gmail as a relay for the sendmail client on Linux. Note that Sendmail is just one of many utilities which can be configured to rely on a Gmail account. Others that are capable of this include postfix, exim, ssmpt, etc. The instructions here should work for any mainstream Linux distribution.

In this tutorial you will learn:

  • Gmail configuration prerequisites
  • How to install Sendmail and mail utilities on Linux
  • How to configure Gmail as a relay for Sendmail
  • How to test the config by sending an email from command line

Read more

Receiving the 403 Forbidden error when directory content listing is turned off

Turn Off directory browsing on Apache

When installing Apache on a Linux system, the directory content listing is enabled by default. This may be a desirable features in some scenarios, but it’s a potential security hole in others. It’s easy enough to turn this setting on or off for each website (virtual host) that you have set up.

In this guide, we’ll go over the step by step instructions to edit the Apache configuration to hide directory content listing for Apache.

In this tutorial you will learn:

  • How to hide directory content listing in Apache

Read more

Saving the output of a PostgreSQL query to text file

Saving an output of PostgreSQL query to a text file

When using PostgreSQL on Linux, there may be times that you wish to save the output of a query. Normally, the output appears on your screen. It’s possible to redirect this output to a file instead, which would allow you to view it later. In this guide, we’ll show you how to save the output of a PostgreSQL query to a file.

In this tutorial you will learn:

  • How to save the output of a PostgreSQL query to a file

Read more

How to start with OpenCV on Ubuntu Linux

How to start with OpenCV on Ubuntu Linux

OpenCV is a computer vision library that can be used in the development of applications programmed in C++ and C. It is relatively easy to get started with OpenCV, but you will need some basic C programming skills and the prerequisite packages installed on your system. In this tutorial, we will go through the step by step instructions of installing everything required for OpenCV on an Ubuntu Linux system. Then, we will compile a basic program to get you started with using OpenCV.

Read more