How to Install Skype 8.13 on Debian, Ubuntu and Linux Mint

Skype is a most popular software application developed by Microsoft that is largely used for Instant Messagingand for Audio and Video calls and Video conferencing call. Among these features, Skype can also be used for screen sharing, file sharing and text and voice messaging.

In this article we will cover the process of installing the most recent version of Skype (8.13) in DebianUbuntuand Linux Mint distributions.

Read AlsoHow to Install Skype 8.13 on CentOS, RHEL and Fedora

Update: The official Skype is now available to install from snap store on Ubuntu and other Linux distributions, including Linux Mint, which is maintained and updated by Skype themselves.

$ sudo apt install snapd
$ sudo snap install skype --classic

Source

How to Create Own Online Learning Management System Using Moodle in Linux

Moodle is a free, feature rich, open source learning management system (LMS). The platform is used by many online school and universities as well as private educators.

Create Own Learning Management System in Linux

Create Own Learning Management System Using Moodle in Linux

Moodle is extremely customizable and it is meant to meet the requirements of wide range of users including teachers, students or administrators.

Moodle Features

Some of the most noticeable features that Moodle has are:

  • Modern and easy to use interface
  • Personalized dashboard
  • Collaborative tools
  • All-in-one calendar
  • Easy file management
  • Simple text editor
  • Notifications
  • Progress tracking
  • Customizable site design/layout
  • Multiple supported languages
  • Bulk course creation
  • Quizzes
  • User roles
  • Plugins for additional functionalities
  • Multimedia integration

Of course the above are just small part of the features that Moodle has. if you want to see the complete list, you can check the Moodle docs.

Requirements

The latest stable Moodle version (3.0) was released just recently on November 16 2015. The release has the following requirements:

  • Apache or Nginx
  • MySQL/MariaDB version 5.5.31
  • PHP 5.5 and its extensions

In this tutorial, I will show you how to install Moodle LMS (Learning Management System) on RedHat based systems such as CentOS/Fedora and Debian its derivatives using LAMP or LEMP (Linux, Apache/Nginx, MySQL/MariaDB and PHP) stack with subdomain moodle.tecmint.com and IP address 192.168.0.3.

Important: The commands will be executed with root user or sudo privileges, so make sure that you have full access to your system.

Step 1: Installing LAMP or LEMP Environment

LAMP/LEMP is a stack of open source software designed to build and host websites. It uses Apache/Nginx as web server, MariaDB/MySQL for relational database management system and PHP as object oriented programming language.

You can use following one single command to install LAMP or LEMP stack in your respective Linux operating systems as shown:

Installing LAMP Stack

# yum install httpd php mariadb-server       [On RedHat/CentOS based systems] 
# dnf install httpd php mariadb-server            [On Fedora 22+ versions]
# apt-get install apache2 php5 mariadb-server     [On Debian/Ubuntu based systems]

Installing LEMP Stack

# yum install nginx php php-fpm mariadb-server            [On RedHat/CentOS based systems] 
# dnf install nginx php php-fpm mariadb-server            [On Fedora 22+ versions]
# apt-get install nginx php5 php5-fpm mariadb-server      [On Debian/Ubuntu based systems]

Step 2: Installing PHP Extensions and Libraries

Next, you need to install following recommended PHP extensions and libraries to run Moodle error free.

--------------------- On RedHat/CentOS based systems ---------------------
# yum install php-iconv php-mbstring php-curl php-opcache php-xmlrpc php-mysql php-openssl php-tokenizer php-soap php-ctype php-zip php-gd php-simplexml php-spl php-pcre php-dom php-xml php-intl php-json php-ldap wget unzip
--------------------- On On Fedora 22+ versions ---------------------
# dnf install php-iconv php-mbstring php-curl php-opcache php-xmlrpc php-mysql php-openssl php-tokenizer php-soap php-ctype php-zip php-gd php-simplexml php-spl php-pcre php-dom php-xml php-intl php-json php-ldap wget unzip
--------------------- On Debian/Ubuntu based systems ---------------------
# apt-get install graphviz aspell php5-pspell php5-curl php5-gd php5-intl php5-mysql php5-xmlrpc php5-ldap

Step 3: Configure PHP Settings

Now open and modify PHP settings in your php.ini or .htaccess (Only if you don’t have access to php.ini) file as shown below.

Important: If you’re using PHP older than 5.5, then some of the following PHP settings removed and you will won’t find in your php.ini file.

register_globals = Off
safe_mode = Off
memory_limit = 128M
session.save_handler = files
magic_quotes_gpc = Off
magic_quotes_runtime = Off
file_uploads = On
session.auto_start = 0
session.bug_compat_warn = Off
post_max_size = 50M
upload_max_filesize = 50M

On Nginx web server, you need to enable following variable in php.ini file as well.

cgi.fix_pathinfo=1

After making above changes, restart the web server as shown:

On Apache Web Server

--------------------- On SysVinit based systems ---------------------
# service httpd restart			[On RedHat/CentOS based systems]    
# service apache2 restart		[On Debian/Ubuntu based systems]
--------------------- On Systemd based systems ---------------------
# systemctl restart httpd.service	[On RedHat/CentOS based systems]    
# systemctl restart apache2.service 	[On Debian/Ubuntu based systems]

On Nginx Web Server

--------------------- On SysVinit based systems ---------------------
# service nginx restart		
# service php-fpm restart	
--------------------- On Systemd based systems ---------------------
# systemctl restart nginx.service	
# systemctl restart php-fpm.service	

Step 4: Install Moodle Learning Management System

Now we are ready to prepare our Moodle files for installation. For that purpose, navigate to the web root directory of your Apache or Nginx server. You can do this via:

# cd /var/www/html              [For Apache]
# cd /usr/share/nginx/html      [For Nginx]

Next go the Moodle download page and grab the latest Moodle (i.e. version 3.0 as the time of writing this article) archive or with the help of following wget command.

# wget https://download.moodle.org/download.php/direct/stable30/moodle-3.0.zip

Now unzip the downloaded archive, this will create a new directory called “moodle” and move all of it’s contents to web server’s root web directory (i.e. /var/www/html for Apache or /usr/share/nginx/html for Nginx) using following series of command.

# unzip moodle-3.0.zip
# cd moodle
# cp -r * /var/www/html/           [For Apache]
# cp -r * /usr/share/nginx/html    [For Nginx]

Now let’s fix the files ownership to webserver user, depending on your distribution Apache might be running with user “apache” or “www-data” and Nginx running as a user nginx.

To fix the file ownership, run the following command.

# chown -R apache: /var/www/html	[On RedHat/CentOS based systems] 
# chown -R www-data: /var/www/html 	[On Debian/Ubuntu based systems]
OR
# chown -R nginx: /usr/share/nginx/html/ 

Moodle also uses a data directory meant to keep teachers and students data. For example this directory will keep videos, documents, presentations and others.

For security purposes, you should create that directory outside of the web directory root. In this tutorial we will create a separate moodledata directory.

# mkdir /var/www/moodledata              [For Apache]
# mkdir /usr/share/moodledata            [For Nginx]

And again fix the folder ownership with:

# chown -R apache: /var/www/moodledata	        [On RedHat/CentOS based systems]    
# chown -R www-data: /var/www/moodledata 	[On Debian/Ubuntu based systems]
OR
# chown -R nginx: /usr/share/moodledata

Step 5: Create Moodle Database

Moodle uses a relational database to store its data and so we will need to prepare a database for our installation. This can be easily done with the following commands:

# mysql -u root -p

Enter your password and proceed. Now create new database called “moodle”:

MariaDB [(none)]> create database moodle;

Now let’s grant a user “moodle” with all privileges on database moodle:

MariaDB [(none)]> grant all on moodle.* to moodle@'localhost' identified by 'password';

Step 6: Start the Moodle Installation

We are now ready to continue with the installation of Moodle. For that purpose open your IP address or hostname in a browser. You should see the Moodle’s installer. It will ask you to choose the language for your installation:

Choose Moodle Language

Choose Moodle Language

On the next step, you will be selecting the path for your Moodle data directory. This directory will contain the files uploaded by teachers and students.

For example vidoes, PDF, PPT and other files you upload on your website. We have already prepared this directory earlier, you just need to set the Moodle data dir to /var/www/moodledata or /usr/share/moodledata.

Set Moodle Data Directory

Set Moodle Data Directory

Next you will be selecting the database driver.

  1. For MySQL – Select Improved MySQL driver.
  2. For MariaDB – Select native/mariadb driver.

Choose Moodle Database Driver

Choose Moodle Database Driver

After that you will be prompted for the MySQL credentials that Moodle will be using. We already prepared those earlier:

Database Name: moodle
Database User: moodle
Password: password

Moodle Database Settings

Moodle Database Settings

Once you have filled the details, continue to the next page. The page will show you the copyrights related to Moodle:

Moodle Copyright Notice

Moodle Copyright Notice

Review those and continue to the next page. On the following page, Moodle will perform system checks for your server environment. It will inform you if there are missing modules/extensions on your system. If such are to be found, click on the link next to each extension that is shown as missing and you will be provided with instructions how to install it.

Moodle Server Requirement Checks

Moodle Server Requirement Checks

If everything is good, proceed to the next page, where the installer will populate the database. This process may take longer than expected. After that you will be asked to configure the administrative user. You will need to fill in the following details:

  1. Username – the username with which the user will login
  2. Password – password for the above user
  3. Firstname
  4. Surname
  5. Email address for the administrative user
  6. City/town
  7. Country
  8. Timezone
  9. Description – enter information about yourself

Moodle User Information

Moodle User Information

After you have configured your site administrator’s profile, it’s time to setup some info about the site. Fill in the following information:

  • Full site name
  • Short name for the site
  • Front page summary – information that will be displayed on the site frontpage
  • Location Settings
  • Site registration – choose the registration type  be self-registration or via email.

Moodle Frontpage Settings

Moodle Frontpage Settings

When you have filled all that information, the installation is complete and you will be taken to the administrator profile:

Moodle Admin Dashboard

Moodle Admin Dashboard

To access the Moodle administrative dashboard go to http://your-ip-address/admin. In my case this is:

http://moodle.tecmint.com/admin

Moodle Admin Panel

Moodle Admin Panel

Now your Moodle installation is complete and you can start managing your website and create your first courses, users or simply customize your site settings.

In case you have any questions or comments related to Moodle’s installation, please submit them in the comment section below.

We can do it for you !

If you would like to have Moodle installed on a real Linux live server, you can contact us at admin@tecmint.comwith your requirements and we will provide custom offer just for you.

Referencehttps://docs.moodle.org/

Source

ttyload – Shows a Color-coded Graph of Linux Load Average in Terminal

ttyload is a lightweight utility which is intended to offer a color-coded graph of load averages over time on Linux and other Unix-like systems. It enables a graphical tracking of system load average in a terminal (“tty“).

It is known to run on systems such as Linux, IRIX, Solaris, FreeBSD, MacOS X (Darwin) and Isilon OneFS. It is designed to be easy to port to other platforms, but this comes with some hard work.

Some of its notable features are: it uses fairly standard, but hard-coded, ANSI escape sequences for screen manipulation and colorization. And also comes with (but doesn’t install, or even build by default) a relatively self-contained load bomb, if you want to view how things work on an otherwise unloaded system.

Suggested Read: GoTTY – Share Your Linux Terminal (TTY) as a Web Application

In this article, we will show you how to install and use ttyload in Linux to view a color-coded graph of your system load average in a terminal.

How to Install ttyload in Linux Systems

On Debian/Ubuntu based distributions, you can install ttyload from the default system respositores by typing the following apt-get command.

$ sudo apt-get install ttyload

On Other Linux distributions you can install ttyload from the source as shown.

$ git clone https://github.com/lindes/ttyload.git
$ cd ttyload
$ make
$ ./ttyload
$ sudo make install

Once installed, you can start it by typing the following command.

$ ttyload

ttyload - Graphical View of Linux Load Average

ttyload – Graphical View of Linux Load Average

Note: To close the program simply press [Ctrl+C] keys.

You can also define the number of seconds in the interval between refreshes. Default value is 4, and the minimum is 1.

$ ttyload -i 5
$ ttyload -i 1

To run it in a monochrome mode which turns off ANSI escapes, use the -m as follows.

$ ttyload -m

ttyload - Monochrome Mode

ttyload – Monochrome Mode

To get the ttyload usage info and help, type.

$ ttyload -h 

Below are some of its important features yet to be added:

  • Support for arbitrary sizing.
  • Make an X front end using the same basic engine, to have “3xload”.
  • Logging-oriented mode.

For more information, check out the ttyload Homepage: http://www.daveltd.com/src/util/ttyload/

Thats all for now! In this article, we showed you how to install and use ttyload in Linux. Write back to us via the comment section below.

Source

How to Record Programs and Games Using ‘Simple Screen Recorder’ in Linux

One of the best ways to learn a particular subject is by explaining it to others. Needless to say, each time I write an article I am first also teaching the topic to myself and making sure I am conveying it in a way that will be easy to understand and follow. Doing screencasts is a magnificient way to accomplish this goal.

Simple Screen Recording in Linux

Simple Screen Recording in Linux

At the same time, recording in video the steps you took to get something done will be a nice remainder should you need to perform the same operation in the future. In addition, you can also upload that file to video-sharing sites like YouTube to share with the community and the world.

Don’t Miss
Record Desktop Video and Audio Using “Avconv” Tool
Showterm.io – A Terminal Shell Recording Tool

Introducing and Installing Simple Screen Recorder

Simple Screen Recorder is a fantastic piece of software that was initially developed by its author to record output of programs and games. In time it became everything but ‘simple’, keeping its name not because of a lack in functionality but due to its easy-to-use interface.

Follow these steps to install Simple Screen Recorder:

On Debian/Ubuntu and Mint

The installation in Debian / Ubuntu / Linux Mint is pretty straightforward:

Add the repository to your sources.list:

$ sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder

Resynchronize the package index files from their sources and install:

$ sudo apt-get update
$ sudo apt-get install simplescreenrecorder

Within a matter of minutes, the program will be ready to launch:

Simple Screen Recorder Launcher

Simple Screen Recorder Launcher

On Fedora/CentOS and RHEL

In Fedora and derivatives (CentOS 7/RHEL 7, for example), several dependencies have to be installed first:

1. Add the ATRPMS repository (a generic 3rd party repository used for system and multimedia tools):

In /etc/yum.repos.d/atrpm.repo:

atrpm.repo
[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

2. And the EPEL repository as well:

# yum install epel-release

3. Then install the rest of the dependencies:

# yum install ffmpeg ffmpeg-devel libX11-devel libXfixes-devel jack-audio-connection-kit-devel mesa-libGL-devel git

4. Clone the developer’s GitHub repository for Simple Screen Recorder:

# git clone https://github.com/MaartenBaert/ssr
# cd ssr

5. And finally, execute the installation script. Make sure you do this as a regular user (other than root), otherwise you will encounter permissions issues later down the road:

$ ./simple-build-and-install

If the installation does not create a launch icon in the Applications menu, you can start Simple Screen Recorder from the terminal.

$ simplescreenrecorder

Or create a symbolic link as a shortcut in your Desktop:

# ln –s $(which simplescreenrecorder) ~/Desktop/'Simple Screen Recorder'

How to Use Simple Screen Recorder

Once you have launched SSR, in the initial screen click Continue:

Simple Screen Recorder Setup

Simple Screen Recorder Setup

In the next screen you will choose options such as whether to record the entire screen, a fixed rectangle, or a specific window. To use any of this options, move the cursor away from the Simple Screen Recorder interface and select an area of the screen or click on a window of your choosing, respectively. You can also choose to record audio and include the cursor in the screencast (or not). Once done, click Continue:

Simple Screen Recorder Settings

Simple Screen Recorder Settings

Now it’s time to define the video output format and the location. Feel free to look around to find the settings that may be more adequate for your case (the settings below are just for your reference, and ensure that the video recording tools installed by default in the operating system will be able to play the recording), then click Continue again:

Set Video Format and Location

Set Video Format and Location

Finally, choose a keyboard shortcut to manage the user interface and click Start recording. When you’re done, save the video by clicking Save recording:

Linux Desktop Screen Recording

Linux Desktop Screen Recording

Alternatively, you can minimize Simple Screen Recorder so that it will not interfere with the screen cast, and start / stop the recording using the key combination selected earlier.

In our example let’s see what happens when we press Ctrl + R:

Control Desktop Screen Recording

Control Desktop Screen Recording

Then to pause the recording press the key combination again. The red circle will turn grey and you can finally stop the recording and save the file by clicking on it and choosing the corresponding menu:

Screen Recording On/OFF Settings

Screen Recording On/OFF Settings

Please keep in mind that the above trick will work as long as Simple Screen Recorder is running – it can be minimized but it has to be running.

Summary

At this point you must have already installed and try out what many Linux users out there consider the best screencrasting tool. Regardless of the reasons why you have chosen to do so, I can assure you you will never look back.

I highly recommend you take a look at the developer’s web site for further ideas and suggestions for improving your videos. Of course, you can also always reach us if you have questions or comments about this article or if you need help to set up Simple Screen Recorder in your computer and run into any issues, using the form below.

Source

6 Online Tools for Generating and Testing Cron Jobs for Linux

As a Linux system administrator, you can perform time-based scheduling of jobs/tasks using online cron job services or Cron, a powerful utility available in Unix/Linux systems.

In Linux, cron runs as a daemon and can be used to schedule tasks such as commands or shell scripts to perform various kinds of backups, system updates and much more, that run periodically and automatically in the background at specific times, dates, or intervals.

Scheduling a cronjob with the correct syntax can be confusing sometimes, wrong expressions can cause cronjobs to fail or not even run at all. In this article, we will list 6 useful online (web based) utilities for creating and testing cronjob scheduling syntax in Linux.

1. Crontab Generator

Crontab Generator is a useful online utility for generating a crontab entry to help schedule a job. It offers a simple, descriptive generator that can help you to produce a crontab syntax that you can copy and paste to your crontab file.

Crontab Generator

Crontab Generator

2. Cron Maker

Cron Maker is a web based utility which helps you to build cron expressions; it employs the Quartz open source library and all expressions are based on Quartz cron format. It also enables you to view next scheduled dates (simply enter a cronjob expression and calculate the next dates).

Cron Maker

Cron Maker

3. Crontab GUI

Crontab GUI is a great and the original online crontab editor. It works well (fully optimized) on mobile devices (you can generate cron syntax on your smart phone or tablet PC’s web browser).

Crontab GUI Tool

Crontab GUI Tool

4. CRON Tester

CRON Tester is a useful cron tester that allows you to test your cron time definitions. All you need to do is copy and paste your cron syntax in the cron definition field, then choose the number of iterations and click on “Test” to see the various dates on which it will run.

Cron Tester

Cron Tester

5. Crontab Guru

Crontab Guru is a simple online cron schedule expression editor. In addition, it provides a useful means of monitoring your cronjob. All you need to do is copy a command snippet provided and append at the end of the crontab definition. In case your cron job fails or doesn’t even start, you will receive an alert email.

Crontab Guru

Crontab Guru

6. Easycron

Easycron is a great web based cron scheduler for corntab.com cron editor. You can create a cron job by specifying a “URL to call”, set when it should be executed, specify a cron expression or add it manually from a descriptive form. Importantly, you can optionally use basic HTTP authentication for a small layer of security.

EasyCron

EasyCron

You might also like to read these following related articles on Cron scheduler utility.

  1. 11 Cron Job Scheduling Examples in Linux
  2. Cron Vs Anacron: How to Schedule Jobs Using Anacron on Linux
  3. How to Run PHP Script as Normal User with Cron

That’s all! If you know of any other useful web based cronjob expression generator or testers missing in the list above, let us know via the comment section below.

Source

How to Reconfigure Installed Package in Ubuntu and Debian

dpkg-reconfigure is a powerful command line tool used to reconfigure an already installed package. It is one of the several tools offered under dpkg – the core package management system on Debian/Ubuntu Linux. It works in conjunction with debconf, the configuration system for Debian packages. Debconf registers the configuration of all installed packages on your system.

This tool can actually be used to reconfigure an entire Ubuntu or Debian system installation. Simply provide the name(s) of package(s) to reconfigure, and it will ask a number of configuration questions, in the same way when the package was initially installed on your system.

It can allow you to retrieve the settings of an installed package, as well as change the current settings of that package as recorded in decconf. A common category of packages you can reconfigure are those whose configurations are determined by questions in the package installation script, usually shown via a graphical interface during the package installation process, for example phpmyadmin.

View Configurations Of Installed Package

To view current configurations of an installed package “phpmyadmin“, use the debconf-show utility as shown.

$ sudo debconf-show phpmyadmin

View Installed Package Configurations

View Installed Package Configurations

Reconfigure Installed Package in Debian and Ubuntu

If you have already installed a package, for instance phpmyadmin, you can reconfigure it by passing the package name to dpkg-reconfigure as shown.

$ sudo dpkg-reconfigure phpmyadmin

Once you have run the command above, you should be able to start reconfiguring phpmyadmin as shown in the following screenshot. You will be asked a series of questions, select the settings you want and complete the process.

Reinstall Database for PhpMyAdmin

Reinstall Database for PhpMyAdmin

Configure Web Server for PhpMyAdmin

Configure Web Server for PhpMyAdmin

When the phpmyadmin reconfiguration process is done, you will see the some useful information concerning the new package settings as shown in the following screenshot.

PhpMyAdmin Information

PhpMyAdmin Information

There are some useful options which allow you to change its default behavior, we will explain some of the practically useful ones, as follows.

The -f flag is used to choose the frontend (such as dailog, readline, Gnome, Kde, Editor or noninteractive) to use.

$ sudo dpkg-reconfigure -f readline phpmyadmin

You can permanently change the default frontend via the debconf, by running the following command.

$ sudo dpkg-reconfigure debconf

Use the Up and Down keys to select an option, and press the TAB key to choose Ok and press Enter.

Change dpkg-reconfigure Frontend

Change dpkg-reconfigure Frontend

Also choose which questions to ignore according to priority level, as shown in the screenshot and press Enter.

Change Debconf Priority

Change Debconf Priority

To specify the minimum priority of questions that will be displayed, directly from the command line, use the -poption.

$ sudo dpkg-reconfigure -p critical phpmyadmin

Some packages may be in an inconsistent or broken state, in such a case, you can use the -f flag to force dpkg-reconfigure to reconfigure a package. Remember to use this flag with caution!

$ sudo dpkg-reconfigure -f package_name

For more information, see the dpkg-reconfigure man page.

$ man dpkg-reconfigure

That’s it for now! If you have any questions concerning how to use dpkg-reconfigure, or any additional thoughts to share, reach us via the comments section below.

Source

How to Setup and Configure Network Bonding or Teaming in RHEL/CentOS 7

When a system administrator wants to increase the bandwidth available and provide redundancy and load balancing for data transfers, a kernel feature known as network bonding allows to get the job done in a cost-effective way.

Read more about how to increase or bandwidth throttling in Linux

Linux Inside: The Ideal Blog for Sysadmins & Geeks@tecmint

How to Limit the Network Bandwidth Used by Applications in a Linux with Tricklehttp://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ 
Via @tecmint

See Linux Inside: The Ideal Blog for Sysadmins & Geeks’s other Tweets

In simple words, bonding means aggregating two or more physical network interfaces (called slaves) into a single, logical one (called master). If a specific NIC (Network Interface Card) experiences a problem, communications are not affected significantly as long as the other(s) remain active.

Read more about network bonding in Linux systems here:

  1. Network Teaming or NiC Bondin in RHEL/CentOS 6/5
  2. Network NIC Bonding or Teaming on Debian based Systems
  3. How to Configure Network Bonding or Teaming in Ubuntu

Enabling and Configuring Network Bonding or Teaming

By default, the bonding kernel module is not enabled. Thus, we will need to load it and ensure it is persistent across boots. When used with the --first-time option, modprobe will alert us if loading the module fails:

# modprobe --first-time bonding

The above command will load the bonding module for the current session. In order to ensure persistency, create a .conf file inside /etc/modules-load.d with a descriptive name, such as /etc/modules-load.d/bonding.conf:

# echo "# Load the bonding kernel module at boot" > /etc/modules-load.d/bonding.conf
# echo "bonding" >> /etc/modules-load.d/bonding.conf

Now reboot your server and once it restarts, make sure the bonding module is loaded automatically, as seen in Fig. 1:

Check Network Bonding Module Loaded in Kernel

Check Network Bonding Module Loaded in Kernel

In this article we will use 3 interfaces (enp0s3enp0s8, and enp0s9) to create a bond, named conveniently bond0.

To create bond0, we can either use nmtui, the text interface for controlling NetworkManager. When invoked without arguments from the command line, nmtui brings up a text interface that allows you to edit an existing connection, activate a connection, or set the system hostname.

Choose Edit connection –> Add –> Bond as illustrated in Fig. 2:

Create Network Bonding Channel

Create Network Bonding Channel

In the Edit Connection screen, add the slave interfaces (enp0s3enp0s8, and enp0s9 in our case) and give them a descriptive (Profile) name (for example, NIC #1NIC #2, and NIC #3, respectively).

In addition, you will need to set a name and device for the bond (TecmintBond and bond0 in Fig. 3, respectively) and an IP address for bond0, enter a gateway address, and the IPs of DNS servers.

Note that you do not need to enter the MAC address of each interface since nmtui will do that for you. You can leave all other settings as default. See Fig. 3 for more details.

Network Bonding Teaming Configuration

Network Bonding Teaming Configuration

When you’re done, go to the bottom of the screen and choose OK (see Fig. 4):

Configuration of bond0

Configuration of bond0

And you’re done. Now you can exit the text interface and return to the command line, where you will enable the newly created interface using ip command:

# ip link set dev bond0 up

After that, you can see that bond0 is UP and is assigned 192.168.0.200, as seen in Fig. 5:

# ip addr show bond0

Check Network Bond Interface Status

Check Network Bond Interface Status

Testing Network Bonding or Teaming in Linux

To verify that bond0 actually works, you can either ping its IP address from another machine, or what’s even better, watch the kernel interface table in real time (well, the refresh time in seconds is given by the -n option) to see how network traffic is distributed between the three network interfaces, as shown in Fig. 6.

The -d option is used to highlight changes when they occur:

# watch -d -n1 netstat -i

Check Kernel Interface Table

Check Kernel Interface Table

It is important to note that there are several bonding modes, each with its distinguishing characteristics. They are documented in section 4.5 of the Red Hat Enterprise Linux 7 Network Administration guide. Depending on your needs, you will choose one or the other.

In our current setup, we chose the Round-robin mode (see Fig. 3), which ensures packets are transmitted beginning with the first slave in sequential order, ending with the last slave, and starting with the first again.

The Round-robin alternative is also called mode 0, and provides load balancing and fault tolerance. To change the bonding mode, you can use nmtui as explained before (see also Fig. 7):

Changing Bonding Mode Using nmtui

Changing Bonding Mode Using nmtui

If we change it to Active Backup, we will be prompted to choose a slave that will the only one active interface at a given time. If such card fails, one of the remaining slaves will take its place and becomes active.

Let’s choose enp0s3 to be the primary slave, bring bond0 down and up again, restart the network, and display the kernel interface table (see Fig. 8).

Note how data transfers (TX-OK and RX-OK) are now being made over enp0s3 only:

# ip link set dev bond0 down
# ip link set dev bond0 up
# systemctl restart network

Bond Acting in Active Backup Mode

Bond Acting in Active Backup Mode

Alternatively, you can view the bond as the kernel sees it (see Fig. 9):

# cat /proc/net/bonding/bond0

Check Network Bond as Kernel

Check Network Bond as Kernel

Summary

In this chapter we have discussed how to set up and configure bonding in Red Hat Enterprise Linux 7 (also works on CentOS 7 and Fedora 22+) in order to increase bandwidth along with load balancing and redundancy for data transfers.

As you take the time to explore other bonding modes, you will come to master the concepts and practice related with this topic of the certification.

Source

How to Configure Network Bonding or Teaming in Ubuntu

Network Interface Bonding is a mechanism used in Linux servers which consists of binding more physical network interfaces in order to provide more bandwidth than a single interface can provide or provide link redundancy in case of a cable failure. This type of link redundancy has multiple names in Linux, such as BondingTeaming or Link Aggregation Groups (LAG).

Read AlsoHow to Setup Network Bonding or Teaming in RHEL/CentOS

To use network bonding mechanism in Ubuntu or Debian based Linux systems, first you need to install the bonding kernel module and test if the bonding driver is loaded via modprobe command.

$ sudo modprobe bonding

Check Network Bonding in Ubuntu

Check Network Bonding in Ubuntu

On older releases of Debian or Ubuntu you should install ifenslave package by issuing the below command.

$ sudo apt-get install ifenslave

To create a bond interface composed of the first two physical NCs in your system, issue the below command. However this method of creating bond interface is ephemeral and does not survive system reboot.

$ sudo ip link add bond0 type bond mode 802.3ad
$ sudo ip link set eth0 master bond0
$ sudo ip link set eth1 master bond0

To create a permanent bond interface in mode 0 type, use the method to manually edit interfaces configuration file, as shown in the below excerpt.

$ sudo nano /etc/network/interfaces
# The primary network interface
auto bond0
iface bond0 inet static
	address 192.168.1.150
	netmask 255.255.255.0	
	gateway 192.168.1.1
	dns-nameservers 192.168.1.1 8.8.8.8
	dns-search domain.local
		slaves eth0 eth1
		bond_mode 0
		bond-miimon 100
		bond_downdelay 200
		bound_updelay 200

Configure Bonding in Ubuntu

Configure Bonding in Ubuntu

In order to activate the bond interface, either restart network service, bring down the physical interface and rise the bond interface or reboot the machine in order for the kernel to pick-up the new bond interface.

$ sudo systemctl restart networking.service
or
$ sudo ifdown eth0 && ifdown eth1 && ifup bond0

The bond interface settings can be inspected by issuing the below commands.

$ ifconfig 
or 
$ ip a

Verify Bond Interface in Ubuntu

Verify Bond Interface in Ubuntu

Details about the bond interface can be obtained by displaying the content of the below kernel file using cat command as shown.

$ cat /proc/net/bonding/bond0

Check Bonding Information in Ubuntu

Check Bonding Information in Ubuntu

To investigate other bond interface messages or to debug the state of the bond physical NICS, issue the below commands.

$ tail -f /var/log/messages

Check Bond Interface Messages

Check Bond Interface Messages

Next use mii-tool tool to check Network Interface Controller (NIC) parameters as shown.

$ mii-tool

Check Bond Interface Link

Check Bond Interface Link

The types of Network Bonding are listed below.

  • mode=0 (balance-rr)
  • mode=1 (active-backup)
  • mode=2 (balance-xor)
  • mode=3 (broadcast)
  • mode=4 (802.3ad)
  • mode=5 (balance-tlb)
  • mode=6 (balance-alb)

The full documentations regarding NIC bonding can be found at Linux kernel doc pages.

Source

How to Install OpenSSL from Source in CentOS and Ubuntu

OpenSSL is a full-featured software library that contains an open-source implementation of the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols, used for securing information transmitted over computer networks.

It is a general-purpose cryptography library and supports a number of different cryptographic algorithms including AES, Blowfish; MD5, MD4, SHA-1, SHA-2 cryptographic hash functions; RSA, DSA, Diffie–Hellman key exchange, Elliptic curve and many others.

In this article, we will explain how to install the latest stable version of OpenSSL from sources on CentOS and Ubuntu based distributions.

Step 1: Install Development Tools

1. To compile OpenSSL manually from sources, you need to first install few dependencies such as “Development Tools” under RHEL/CentOS/Fedora or “build-essential” in Debian/Ubuntu as shown.

------------------- On CentOS, RHEL & Fedora ------------------- 
# yum group install 'Development Tools' && yum install perl-core libtemplate-perl zlib-devel 

------------------- On Ubuntu & Debian -------------------
$ sudo apt update && apt install build-essential checkinstall zlib1g-dev libtemplate-perl

Step 2: Compile OpenSSL from Sources

2. Next, download the latest stable version of OpenSSL (v1.0.2 at the time of writing, which is a Long Term Support (LTS) release, supported until 31st December 2019), from the download page using following wget command and unpack it using tar command.

$ wget -c https://www.openssl.org/source/openssl-1.0.2p.tar.gz
$ tar -xzvf openssl-1.0.2p.tar.gz

3. Now, move into the extracted directory, configure, build, after a successful build, test the libraries and install OpenSSL in the default location, which is /usr/local/ssl, by running the following commands.

$ cd openssl-1.0.2p/
$ ./config
$ make
$ make test
$ sudo make install 

4. Once you have successfully installed OpenSSL, you can move into the installation directory and view the various sub-directories and files using ls command.

$ cd /usr/local/ssl/
$ ls -l

drwxr-xr-x. 2 root root  4096 Aug 22 06:37 bin
drwxr-xr-x. 2 root root  4096 Aug 22 06:37 certs
drwxr-xr-x. 3 root root  4096 Aug 22 06:37 include
drwxr-xr-x. 4 root root  4096 Aug 22 06:37 lib
drwxr-xr-x. 6 root root  4096 Aug 22 06:36 man
drwxr-xr-x. 2 root root  4096 Aug 22 06:37 misc
-rw-r--r--. 1 root root 10835 Aug 22 06:37 openssl.cnf
drwxr-xr-x. 2 root root  4096 Aug 22 06:37 private

The following are important directories you need to take note of:

  • bin – contains the openssl binary and some utility scripts.
  • include/openssl – contains the header files needed for building your own programs that use libcrypto or libssl.
  • lib – contains the OpenSSL library files.
  • lib/engines – contains the OpenSSL dynamically loadable engines.
  • man – contains the OpenSSL man-pages.
  • share/doc/openssl/html – contains HTML rendition of the man-pages.
  • certs – the default location for certificate files.
  • private – the default location for private key files.

5. To check the version of OpenSSL you have just installed, run the following command.

$ /usr/local/ssl/bin/openssl version

OpenSSL 1.0.2p  14 Aug 2018

6. To use the newly installed OpenSSL version on your system, you need to add the directory /usr/local/ssl/bin/to your PATH, in the file ~/.bashrc (or the equivalent for your shell).

$ vim ~/.bashrc

Add this line at the bottom of the file.

export PATH="/usr/local/ssl/bin:${PATH}"

Save and close the file and reload the configuration using the command below.

$ source .bashrc

7. Now open a new terminal window and run the following commands to confirm that the new OpenSSL binary is located in your PATH and that you can run it without typing its full path.

$ whereis openssl

openssl: /usr/bin/openssl /usr/lib64/openssl /usr/include/openssl /usr/local/ssl/bin/openssl /usr/share/man/man1/openssl.1ssl.gz
$ openssl version 	

OpenSSL 1.0.2p  14 Aug 2018

That’s all! In this article, we have explained how to install the latest OpenSSL version from source on Linux systems. If you have any questions, use the command form below to reach us.

Source

How to Install LAMP Stack with PhpMyAdmin in Ubuntu 18.04

LAMP stack is composed of packages such as ApacheMySQL/MariaDB and PHP installed on a Linux system environment for hosting websites and apps.

Read AlsoInstall Apache, MariaDB, PHP and PhpMyAdmin in Ubuntu 18.04

PhpMyAdmin is a free, open source, well known, fully-featured, and intuitive web-based frontend for administering MySQL and MariaDB database. It supports various database operations, and has many features that allow you to easily manage your databases from a web interface; such as importing and exporting data in various formats, generating complex and useful queries using Query-by-example (QBE), administering multiple servers, and much more.

Requirements:

  1. Minimal Ubuntu 18.04 server Installation.
  2. Access to server via SSH (if you don’t have direct access).
  3. Root user privileges or use sudo command to run all commands.

In this article, we will explain how to install LAMP stack with PhpMyAdmin in Ubuntu 18.04.

Step 1: Install Apache Web Server on Ubuntu 18.04

1. First start by updating your software packages and then install Apache web server using following commands.

$ sudo apt update
$ sudo apt install apache2

2. After the installation process is complete, the apache service should start automatically and will be enabled to start at system boot time, you can check if it’s up and running using following command.

$ sudo systemctl status apache2

3. If you have a system firewall enabled and running, you need to open the ports 80 and 443 to allow client connection requests to apache web server via HTTP and HTTPS respectively, then reload the firewall settings as shown.

$ sudo ufw allow 80/tcp
$ sudo ufw allow 443/tcp
$ sudo ufw reload

4. Now verify your Apache installation by testing default test page at the below URL from a web browser.

http://domain_name/
OR
http://SERVER_IP/

If you see the apache default web page, it means your installation is working fine.

Check Apache Web Page

Check Apache Web Page

Step 2: Install MariaDB on Ubuntu 18.04

5. Now install MariaDB, is a free, open source database management system forked from MySQL and it is a community developed project being led by the original developers of MySQL.

$ sudo apt install mariadb-server mariadb-client

6. The MariaDB services should start automatically after installation, check its status to ensure that it is up and running.

$ sudo systemctl status mysql

7. The MariaDB installation is not secure by default, you need to execute a security script that comes with the package. You will be asked to set a root password to ensure that nobody can log into the MariaDB.

$ sudo mysql_secure_installation

Once you execute the script, it will ask you to enter current password for root (enter for none):

Then enter yes/y to the following security questions:

  • Set root password? [Y/n]: y
  • Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
  • Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
  • Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
  • Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

Secure Mariadb Installation in Ubuntu 18.04

Secure Mariadb Installation in Ubuntu 18.04

Step 3: Install PHP on Ubuntu 18.04

8. PHP is one of the most widely used server side scripting language used to generate dynamic content on websites and apps. You can install PHP (default version is PHP 7.2) and other modules for web deployments using following command.

$ sudo apt install php php-common php-mysql php-gd php-cli

9. Once PHP installed, you can test your PHP setup by creating a simple info.php page in your web server document root, using this single command.

 
$ echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

10. Then open a web browser, and enter this URL to view the php information page.

http://domain_name/info.php
OR
http://SERVER_IP/info.php

Test PHP Info in Ubuntu 18.04

Test PHP Info in Ubuntu 18.04

Step 4: Install PhpMyAdmin on Ubuntu 18.04

11. Finally, you can install phpMyAdmin for administrating MySQL/MariaDB databases from the comfort of a web browser, by running following command.

$ sudo apt install phpmyadmin

Through the package installation process, you will be asked to choose the web server that should be automatically configured to run phpMyAdmin, select apache by pressing the space bar and press Enter.

Select PhpMyAdmin Web Server

Select PhpMyAdmin Web Server

PhpMyAdmin Configuration

PhpMyAdmin Configuration

12. Next, enter the password for the MySQL/MariaDB administrative user so the installer can create database for phpmyadmin.

Set Password for Phpmyadmin

Set Password for Phpmyadmin

13. Once everything installed, you can now restart the apache2 service to effect the recent changes.

$ sudo systemctl restart apache2

Note: If the PhpMyAdmin package has not been enable to work with apache web server automatically, run the following commands to copy the phpmyadmin apache configuration file located under /etc/phpmyadmin/ to apache webserver available configurations directory /etc/apache2/conf-available/ and then activate it using the a2enconf utility, and restart apache service effect the recent changes, as follows.

$ sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf 
$ sudo a2enconf phpmyadmin
$ sudo systemctl restart apache2

14. Lastly, from a web browser, and type the following URL to access you phpMyAdmin web frontend.

http://domain_name/phpmyadmin
OR
http://SERVER_IP/phpmyadmin

Use the root credentials to authenticate in the phpMyAdmin, as shown in the following screen shot.

PhpMyAdmin Login

PhpMyAdmin Login

Important: Starting from MySQL 5.7, root login requires sudo command, therefore the root login will fail via phpmyadmin, you may need to create another admin user account. Access the mariadb shell using the root account from a terminal, and run the following commands to create a new user:

$ sudo mysql -u root -p
MariaDB [(none)]> CREATE USER 'admin'@'localhost' IDENTIFIED BY '=@!#254tecmint';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;

Now log into PhpMyAdmin using the new admin credentials to administer your databases.

PhpMyAdmin MySQL Database Administration

PhpMyAdmin MySQL Database Administration

To secure your PhpMyAdmin web interface, check this article: 4 Useful Tips to Secure PhpMyAdmin Web Interface.

That’s it! In this article, we have explained how to setup LAMP stack with the latest PhpMyAdmin in Ubuntu 18.04. Use the comment form below to send us your queries, or thoughts about this guide.

Source

WP2Social Auto Publish Powered By : XYZScripts.com