This article will guide you to configure Exim4 SMTP relay server which will allow you to relay emails for the know Domains names and IP address only. In general, this type of service is used to relay emails for notifications for the server health status reports, where the actual email address does not exist or send auto response emails.IntroductionExim4 is a Message Transfer Agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the internet. Exim4 can be installed to replace of Sendmail or Postfix, although the configuration of Exim4 is quite different to that ... Read More
Do you know how to set Time, Timezone from Linux Command Line? If not, then the timedatectl command helps you to set time and Timezone and it comes as a part of systemd system and service manager. This article describes “How to Set Time, Timezone and Synchronize System Clock using timedatectl Command”Find and Set Local Timezone in LinuxTo display time and current date on Linux, use the following command –$ timedatectl statusThe sample output should be like this – Local time: Fri 2016-03-11 11:23:54 IST Universal time: Fri 2016-03-11 05:53:54 UTC ... Read More
Given a number ‘n’ we have to check whether the number given is Strong Number or not.Strong number is a number whose sum of all digits’ factorial is equal to the number ‘n’. Factorial implies when we find the product of all the numbers below that number including that number and is denoted by ! (Exclamation sign), For example: 4! = 4x3x2x1 = 24.So, to find a number whether its strong number, we have to pick every digit of the number like the number is 145 then we have to pick 1, 4 and 5 now we will find factorial ... Read More
This article will help you to generate self-signed SSL certificate in Linux which allows you to configure SSL certificates for Nginx which is used to wrap the normal traffic into protected traffic, encrypted traffic. Using this server can send the data to the client without the concerned that data can be intercepted by outside persons.Guidelines for InstallationBefore we do anything, we have to install certain packagesLogin to the server via terminal and install# yum install mod_ssl opensslResolving Dependencies --> Running transaction check ---> Package mod_ssl.x86_64 1:2.2.15-47.el6.centos.1 will be updated ---> Package mod_ssl.x86_64 1:2.2.15-47.el6.centos.3 will be an update --> Processing Dependency: ... Read More
IntroductionThe OLAP cube is a technique that holds the data in the optimized form and is also used to analyse the data with quick response. It is generally used for getting quick results from multiple dimensions and fact tables.OLAP Cube Creation1. First, create a data warehouse in Microsoft SQL Server studio. For instance, following is a sample Sales data warehouse –2. Create new analysis service project in Microsoft Business Intelligence Development Studio –3. Create new data source by right-click on Data Sources in Solution Explorer- Now chose available connections or create new connection and click on next button-Select Inherit option and ... Read More
Given a matrix as mat[row][column], our task is to check whether the given matrix is singular or not through a function and display the result.Singular matrix is a matrix whose determinant is zero and if the determinant is not zero then the matrix is non-singular.So to find whether the matrix is singular or non-singular we need to calculate determinant first. Determinant of a matrix can be calculated as −$$M1[3][3]\:=\:\begin{bmatrix}a & b & c \d & e & f \g & h & i \end{bmatrix}$$|m1| = a(e*i - f*h) - b(d*i - f*g) + c(d*h - e*g)ExampleInput-: mat[3][3]= { 4, 10, ... Read More
Many of the Linux engineers are required to do some general programming languages to automate their normal tasks This article explains how to install C and C++ compilers and it’s development tools (build-essential) and related packages such as make, libc-dev, dpkg-dev, etc in Linux.Before getting into installation part, It is better if we can know about compiler.“A compiler is a software program that processes statements written in a particular programming language and creates a binary file which the machine’s CPU can easily understand and executes them”Installing C, C++ Compiler and Development ToolsIf Build-Essential Tools are not installed in your system ... Read More
Given with the value of n as an input and the task is to compute the value of Log n through a function and display it.Logarithm or Log is the inverse function to exponentiation which means to calculate log the raised power must be calculated as a base.IF $$\log_b x\;\:=\: y\:than\:b^{y}=x$$Like $$\log_2 64\;\:=\: 6\:than\:2^{6}=64$$ExampleInput-: Log 20 Output-: 4 Input-: Log 64 Output-: 6AlgorithmStart In function unsigned int log2n(unsigned int num) Step 1-> Return (num > 1) ? 1 + log2n(num / 2) : 0 In function int main() Step 1-> Declare and assign num = 20 Print log2n(num) ... Read More
Every Linux user should know about basic configuration of Linux Hardware.There are so many tools which are currently available in the market to get hardware information in Linux. Dmidecode is a tool for dumping a computer’s DMI (Desktop Management Interface) table contents in a human-readable format. This table contains a description of the system’s hardware components as well as other useful pieces of information such as serial numbers and BIOS revision. This article describes”How to Get Hardware Information with Dmidecode Command on Linux”Installing DmidecodeTo install Dmidecode, use the following command –$ sudo apt-get install dmidecodeThe sample output should be like ... Read More
Given with array, L, R, P as an input and the task is to find the ranges between L and R with the product under modulo as output and display itAs given in the figure we have array of elements and L which is a Left value as 2 and R which is the Right value as 2. Now the program must find the products of ranges between them.ExampleInput-: A[] = { 1, 2, 3, 4, 5, 6 } P = 29 L = 2 R = 6 Output-: 24 Input-: A[] = {1, 2, 3, 4, 5, 6}, ... Read More