In this article, we will learn how to configure FTP server on CentOs 7 using ‘vsftpd’. ‘vsftpd’ (Very Secure File Transport Protocol Daemon) is a secure and very fast FTP server on Linux systems.Installing ‘vsftpd’Below is the command to install the ‘vsftpd’, we needed a root user to run the following command# yum install vsftp ftp –y Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: ftp.iitm.ac.in * extras: ftp.iitm.ac.in * updates: ftp.iitm.ac.in Setting up Install Process No package vsftp available. Resolving Dependencies --> Running transaction check ---> Package ftp.x86_64 0:0.17-54.el6 will be installed --> Finished ... Read More
Given with the cost price(CP) and the selling price(SP) and the task is to calculate the profit gained or loss incurred.Cost price or CP is the price at which the product is purchased by the seller and the selling price or SP is the price at which the product is sold by the seller.There is a formula to calculate profit gained or loss incurredProfit = Selling price – Cost priceIf Selling price is greater than cost price than there will be a profitLoss = Cost price – Selling priceIf cost price is greater than selling price than there will be ... Read More
In this article, we will learn some configuration steps that should be taken care for security purpose and usability, just after a new server is installed. This will help us in building a solid foundation.Avoiding the ‘root’ user LoginThe root is the administrator or the super user in the Linux environment, who has all the privileges on the system. Generally, it is highly recommended to use the root user directly, as it may cause many issues or any accidental loss of data or due to any changes which may be done accidentally.In the next step, we will be setting up ... Read More
Given with the original cost and net price as an input and the task is to calculate the GST percentage and display the resultGST stands for Goods and Service task. It is always included in the Net price of the product and before calculating the GST percentage we need to calculate GST amount and for that there are formulas availableNetprice = originalcost + GSTAmountGSTAmount = Netprice – original_costGST_Percentage = (GSTAmount * 100)/ originalcostGST % formula = (GSTAmount*100) / originalcostExampleInput-: cost = 120.00 price = 150.00 Output-: GST amount is = 25.00 % Input-: price = 120.00 cost = ... Read More
In this article we shall learn about – how to install MariaDB 10.2 on Centos 7 / RHEL. This can be used as a guide for beginners or as a reference. Please note that, this can also be used as an alternative replacement of MySQL.Features of MariaDBMariaDB is an open-source and an alternative relational database management software.MariaDB is robust, fast and Scalable with rich storage engines.MariaDB has new features such as GIS and JSON.Server Information and PackagesThe Package included: MariadB, Mariadb-server, MariaDB-libs.The Daemon Name used is: mariadb.Port No: 3306.Configuration path: /etc/my.cnf.Installing Maria DB 10.2 on Centos 7 / RHEL 7In ... Read More
Given with the two points coordinates and the task is to find the distance between two points and display the result.In a two dimension plane there are two points let’s say A and B with the respective coordinates as (x1, y1) and (x2, y2) and to calculate the distance between them there is a direct formula which is given below$$\sqrt{\lgroup x2-x1\rgroup^{2}+\lgroup y2-y1\rgroup^{2}}$$Given below is the diagram representing two points and their differences$$\frac{(x_2-x_1)}{(x_1, y_1)\:\:\:\:\:\:(y_2-y_1)\:\:\:\:\:\:(x_2, y_2)}$$Approach used below is as follows −Input the coordinates as x1, x2, y1 and y2Apply the formula to compute the difference between two pointsPrint the distanceAlgorithmStart Step ... Read More
In this article, we will learn about how to install WordPress in an open source website and blogging tools which works with PHP and MySQL. WordPress is the most popular Content management system (CRM) used on the Internet and it has more plugins to extend the functionality of the WordPress.PrerequisitesBefore we set up, the we need to have the below –We need a non-root user with Sudo privilegesWe need to setup LAMP (Linux, Apache, MySQL and PHP) which needs to be installed on the Centos 7 Server.Creating MySQL Database and User for the WordPressAssuming that we have already had LAMP ... Read More
Given with the 3-D plane and hence three coordinates and the task is to find the distance between the given points and display the result.In a three dimension plane there are three axis that are x-axis with its coordinates as (x1, y1, z1), y-axis with its coordinates as (x2, y2, z2) and z-axis with its coordinates as (x3, y3, z). To calculate the distance between them there is a direct formula which is given below$$\sqrt{\lgroup x2-x1\rgroup^{2}+\lgroup y2-y1\rgroup^{2}+\lgroup z2-z1\rgroup^{2}}$$Given below is the diagram representing three different axis and their coordinatesApproach used below is as follows −Input the coordinates as (x1, y1, ... Read More
Given with the current date and the birth date of a person and the task is to calculate his current age.ExampleInput-: present date-: 21/9/2019 Birth date-: 25/9/1996 Output-: Present Age Years: 22 Months:11 Days: 26Approach used below is as follows −Input the current date and birth date of a personCheck for the conditionsIf current month is less than the birth month, then we will not consider the current year because this year has not been completed yet and to compute the differences in months by adding 12 to the current month.If the current date is less than the ... Read More
Given with the weight and height of a person and the task is to find the BMI i.e. body mass index of his body and display it.For calculating the body mass index we require two things −WeightHeightBMI can be calculated using the formula given below −BMI = (mass or weight) / (height*height)Where weight is in kg and height is in metersExampleInput 1-: weight = 60.00 Height = 5.1 Output -: BMI index is : 23.53 Input 2-: weight = 54.00 Height = 5.4 Output -: BMI index is : 9.3Approach used below is as follows −Input weight(kg) and ... Read More