Grafana – An Open Source Software for Analytics and Monitoring

Grafana is an open source, feature rich, powerful, elegant and highly-extensible analytics and monitoring software that runs on Linux, Windows and MacOS. It is a de facto software for data analytics, being used at Stack Overflow, eBay, PayPal, Uber and Digital Ocean – just to mention but a few.

It supports 30+ open source as well as commercial databases/data sources including MySQL, PostgreSQL, Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB. It allows you to dig deeply into large volumes of real-time, operational data; visualize, query, set alerts and get insights from your metrics from different storage locations.

Read Also: How to Install Piwik (Google Analytics) Software in Linux

Importantly, Grafana allows for setting up multiple, independent organizations with each having their own usage environment (admins, data sources, dashboards and users).

Grafana Analytics Monitoring Software

Grafana Analytics Monitoring Software

Grafana Features:

  • Elegant graphics for data visualization.
  • Fast and flexible graphs with numerous options.
  • Dynamic and reusable dashboards.
  • It’s highly extensible using hundreds of dashboards and plugins in the official library.
  • Supports power user preferences.
  • Supports multi tenancy, setup multiple independent organizations.
  • Supports authentication via LDAP, Google Auth, Grafana.com, and Github.
  • Supports notifications via Slack, PagerDuty, and more.
  • Remarkably supports collaboration by allowing sharing of data and dashboards across teams and so much more.


An online demo is available for you to try before installing Grafana on your Linux distribution.

Demo URL: http://play.grafana.org/

In this article, we will explain how to install Grafana – Data Visualization & Monitoring software on CentOS, Debian and Ubuntu distributions.

Install Grafana in Linux Systems

1. We will install Grafana from its official YUM or APT repositories, so that you can update it using your default package manager.

Install Grafana on Debian and Ubuntu

$ echo "deb https://packagecloud.io/grafana/stable/debian/ stretch main" | sudo tee -a /etc/apt/sources.list
$ curl https://packagecloud.io/gpg.key | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install grafana

Install Grafana on CentOS, RHEL and Fedora

# echo "[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/7/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt" | sudo tee /etc/yum.repos.d/grafana.repo
# yum install grafana

2. After installing Grafana, you can find important files in the following locations:

  • Installs binary to /usr/sbin/grafana-server
  • Installs Init.d script to /etc/init.d/grafana-server
  • Creates default file (environment vars) to /etc/default/grafana-server
  • Installs configuration file to /etc/grafana/grafana.ini
  • Installs systemd service name grafana-server.service
  • The default configuration sets the log file at /var/log/grafana/grafana.log
  • The default configuration specifies an sqlite3 db at /var/lib/grafana/grafana.db
  • Installs HTML/JS/CSS and other Grafana files at /usr/share/grafana

3. Next, start the Grafana service, check if it is up and running, then enable it to auto-start at boot time as follows. By default, the process is run as the grafana user (created during the installation process), and listens on HTTP port 3000.

Start Grafana Server (via Systemd)

# systemctl daemon-reload
# systemctl start grafana-server
# systemctl status grafana-server
# systemctl enable grafana-server

Start Grafana Server (via init.d)

# service grafana-server start
# service grafana-server status
# sudo update-rc.d grafana-server defaults [On Debian/Ubuntu]
# /sbin/chkconfig --add grafana-server [On CentOS/RHEL/Fedora]

4. If your system has a firewall enabled by default, you need to open the port 3000 in the firewall to allow client requests to the grafana process.

----------- [On Debian/Ubuntu] -----------
$ sudo ufw allow 3000/tcp
$ sudo ufw reload
----------- [On CentOS/RHEL/Fedora] ----------- # firewall-cmd --permanent --add-port=3000/tcp
# firewall-cmd --reload

5. Now use the following URL to access the Grafana, which will redirect to the login page, user credentials as username: admin and password: admin)

http://Your-Domain.com:3000
OR
http://IP-Address:3000
Grafana Admin Login

Grafana Admin Login

6. After login, you will access the home dashboard, as shown in the screenshot below.

Grafana Home Dashboard

Grafana Home Dashboard

7. Next, add a database or data source, click on “Add Data Source”. For example we will add a MySQL database; specify the data source name, type, and connection parameters. Then click on Save & Test.

Add Grafana Data Source

Add Grafana Data Source

You will be notified if the database connection is successful or it has failed, as shown in the screenshot. Then go back to the home dashboard to add a new dashboard.

Grafana Data Source Connection

Grafana Data Source Connection

8. From the Home dashboard, click on New dashboard to add a new panel for visualizing metrics from your data source.

Add Grafana New Dashboard

Add Grafana New Dashboard

From here, you can add more data sources, dashboards, invite your team members, install apps and plugins to extend the default functionalities, and do more.

You can find more information from the Grafana Homepage: https://grafana.com/

Grafana is an elegant software for real-time data analytics and monitoring. We hope that you successfully installed Grafana on your Linux system, otherwise, use the feedback form below to ask any questions or share your thoughts about it.

10 Best Open Source Forum Software for Linux

A forum is a discussion platform where related ideas and views on a particular issue can be exchanged. You can setup a forum for your site or blog, where your team, customers, fans, patrons, audience, users, advocates, supporters, or friends can hold public or private discussions, as a whole or in smaller groups.

If you are planning to launch a forum, and you can’t build your own software from scratch, you can opt for any of the existing forum applications out there. Some forum applications allow you to setup only a single discussion site on a single installation, while others support multiple-forums for a single installation instance.

In this article, we will review 10 best open source forum software for Linux systems. By the end of this article, you will know exactly which open source forum software best suites your needs.

You can get a 2GB RAM VPS from Linode for $10, but it’s unmanaged. If you want a Managed VPS, then use our new BlueHost Promotion Offer, you will get upto 40% OFF on hosting with one Free Domain for Life. If you get a Managed VPS, they will probably install any of the following Forum Software for you.

1. Discourse – Discussion Platform

Discourse is a free open source, simple, modern, incredibly powerful and feature-rich community discussion software.

Discourse Forum Software

Discourse Forum Software


It works as a mailing list, discussion forum, long-form chat room, and so much more. Its front-end is built using JavaScript and it is powered by the Ember.js framework; and the server side is developed using Ruby on Rails backed by a PostgreSQL database and Redis cache.

It is responsive (auto-switches to a mobile layout for small screens), it supports: dynamic notifications, community moderation, social login, spam blocking, reply via email, emojis and badges. It also comes with a trust system and so much more. Above all, Discourse is simple, modern, awesome and fun, and has a one-click upgrade feature, once installed.

2. phpBB – Bulletin Board Software

phpBB is a free open source, powerful, feature-rich and highly extensible forum or bulletin board software. There are numerous extensions and a styles database (with hundreds of style and image packages) for you to enhance its core functionality and to customize your board respectively.

phpBB Bulletin Board Forum

phpBB Bulletin Board Forum

It is secure and comes with various tools to protect your forum from unwanted users and spam. It supports: a search system, private messaging, multiple methods of notifying users of forum activities, conversation moderators, and user-groups. Importantly, it has an advanced caching system for increased performance. You can integrate it with other applications via multiple plugins and so much more.

3. Vanilla – Modern Community Forum

Vanilla is an open source, fully-featured, intuitive, robust cloud-based and multi-lingual community forum software. It is easy to use giving users a modern forum experience, allows users to post questions and polls; it has an advance editor for formating posts with html, markdown, or bbcode, and supports @ mentions.

Vanilla Community Forum

Vanilla Community Forum

It also supports user-profiles, notifications, auto-save, avatars, private messaging, real-time preview, a powerful search facility, user-groups, single sign on and so much more. Vanilla can be integrated with social networks for easy sharing, login and more. It comes with numerous plugins and themes to enhance its primary features and customize its look and feel.

4. SimpleMachinesForum (SMF)

SimpleMachinesForum is a free, open source, simple, beautiful and powerful forum software. It is available in over 45 different languages. SMF is easy to use and highly customizable, with a multitude of powerful and effective features. It comes with high quality and reliable support.

Simple Machines Forum

Simple Machines Forum

SMF is highly customizable; it has many extensions/packages (under various categories such as security, socialization, administration, permissions, posting, theme enhancements and more) to modify its core functionality, add or remove features, and lot more.

5. bbPress – Forum Software

bbPress is a free open source, simple, lightweight, fast and secure bulletin board software built in a WordPress-fashion. It is easy to install, and configure, fully integrated and supports setting up multiple forums on one site installation.

bbPress Forum Software

bbPress Forum Software

It is highly extensible and customizable, supports several plugins. It also supports RSS feeds and offers spam blocking functionality for additional security.

6. MyBB – Powerful Forum Software

MyBB is a free open source, simple, easy-to-use, intuitive yet powerful, and extremely efficient forum software. It is a discussion-oriented application that supports: user profiles, private messages, reputation, warnings, calenders and events, user promotion, moderation, and more.

MyBB Community Forum

MyBB Community Forum

It ships in with a number of plugins, and templates and themes to extend its core functionality and customize its default look and feel, allowing you to setup a fully customized and effective online community forum with ease.

7. miniBB – Community Discussion Forum

miniBB is a free open source, standalone, lightweight, fast, and highly customizable software for building a web forum. It is suitable and effective for setting up a simple and stable community discussion platform, especially for novices. It allows for dynamic and content-rich discussions, and you can enable it to be responsive via the mobile template.

MiniBB Community Discussion Forum

MiniBB Community Discussion Forum

It can easily be integrated with your website, allowing you to change its layout to the look of your website. In addition, miniBB offers facilities for you to synchronize with an existing membership system. Importantly, it supports guest posts and quick moderation.

8. Phorum – Forum Software

Phorum is a free open source, simple, highly-customizable, and easy-to-use PHP message board software. It has a very flexible hook and module system for you to customize your web community discussion platform.

Phorum Forum Software

Phorum Forum Software

You can easily changes its default using HTML templates that have simple to understand text commands in-built.

9. FluxBB – Forum Software

FluxBB is fast, light, easy-to-use, stable, secure, user-friendly and multi-lingual PHP forum software. It comes with a well organized administration interface and admin panel plugins, supports a flexible permission system, and it is XHTML compliant.

FluxBB Forum Software

FluxBB Forum Software

It supports user profiles, avatar, forum categories, announcements, topic search, post preview RSS/Atom feeds, user selectable CSS styles and language and so much more.

10. PunBB – Bulletin Board Software

PunBB is a free open source, lightweight and fast PHP bulletin board software. It has a simple layout and design, like most forum software listed above, it supports private messaging, polls, linking to off-site avatars, advanced text formatting commands, file attachments, multi-forums and so much more.

PunBB Bulletin Board Forum

PunBB Bulletin Board Forum

That’s all for now! In this article, we reviewed 10 best open source forum software for Linux. If you are interested in setting up a forum for your site or blog, by now, you should be knowing which open source software to use. If your favorite software is missing in the list, let us know via the feedback form below.

If you’re looking for someone to install Forum Software, consider us, because we offer wide range of Linux services at fair minimum rates with 14-days free support via email. Request Installation Now.

How to Install Kernel Headers in Ubuntu and Debian

In our last article, we have explained how to install kernel headers in CentOS 7. Kernel Headers contain the C header files for the Linux kernel, which offers the various function and structure definitions required when compiling any code that interfaces with the kernel, such as kernel modules or device drivers and some user programs.

It is very important to note that the kernel headers package you install should match with the currently installed kernel version on your system. If your kernel version ships with the default distribution installation or you have upgraded your Kernel using dpkg or apt package manager from the Ubuntu or Debian base repositories, then you must install matching kernel headers using package manager only. And if you’ve compiled kernel from sources, you must also install kernel headers from sources.

In this article, we will explain how to install Kernel Headers in Ubuntu and Debian Linux distributions using default package manager.

Install Kernel Headers in Ubuntu and Debian

First check your installed kernel version as well as kernel header package that matches your kernel version using following commands.

$ uname -r
$ apt search linux-headers-$(uname -r)
Check Kernel Version and Kernel Headers in Ubuntu

Check Kernel Version and Kernel Headers in Ubuntu


On Debian, Ubuntu and their derivatives, all kernel header files can be found under /usr/src directory. You can check if the matching kernel headers for your kernel version are already installed on your system using the following command.

$ ls -l /usr/src/linux-headers-$(uname -r)
Check Kernel Headers in Ubuntu

Check Kernel Headers in Ubuntu

From the above output, it’s clear that the matching kernel header directory doesn’t exist, meaning the package is not yet installed.

Before you can install the appropriate kernel headers, update your packages index, in order to grab information about the latest package releases, using the following command.

$ sudo apt update

Then run the following command that follows to install the Linux Kernel headers package for your kernel version.

$ sudo apt install linux-headers-$(uname -r)
Install Kernel Headers in Ubuntu

Install Kernel Headers in Ubuntu

Next, check if the matching kernel headers have been installed on your system using the following command

$ ls -l /usr/src/linux-headers-$(uname -r)
Verify Installed Kernel Headers in Ubuntu

Verify Installed Kernel Headers in Ubuntu

That’s all! In this article, we have explained how to install kernel headers in Ubuntu and Debian Linux and other distributions in the Debian family tree.

Always keep in mind that to compile a kernel module, you will need the Linux kernel headers. If you have any quires, or thoughts to share, use the comment form below to reach us.

Useful Linux Command Line Bash Shortcuts You Should Know

In this article, we will share a number of Bash command-line shortcuts useful for any Linux user. These shortcuts allow you to easily and in a fast manner, perform certain activities such as accessing and running previously executed commands, opening an editor, editing/deleting/changing text on the command line, moving the cursor, controlling processes etc. on the command line.

Although this article will mostly benefit Linux beginners getting their way around with command line basics, those with intermediate skills and advanced users might also find it practically helpful. We will group the bash keyboard shortcuts according to categories as follows.

Launch an Editor

Open a terminal and press Ctrl+X and Ctrl+E to open an editor (nano editor) with an empty buffer. Bash will try to launch the editor defined by the $EDITOR environment variable.

Nano Editor

Nano Editor

Controlling The Screen

These shortcuts are used to control terminal screen output:

  • Ctrl+L – clears the screen (same effect as the “clear” command).
  • Ctrl+S – pause all command output to the screen. If you have executed a command that produces verbose, long output, use this to pause the output scrolling down the screen.
  • Ctrl+Q – resume output to the screen after pausing it with Ctrl+S.

Move Cursor on The Command Line


The next shortcuts are used for moving the cursor within the command-line:

  • Ctrl+A or Home – moves the cursor to the start of a line.
  • Ctrl+E or End – moves the cursor to the end of the line.
  • Ctrl+B or Left Arrow – moves the cursor back one character at a time.
  • Ctrl+F or Right Arrow – moves the cursor forward one character at a time.
  • Ctrl + Left Arrow or Alt+B or Esc and then B – moves the cursor back one word at a time.
  • Ctrl + Right Arrow or Alt+C or Esc and then F – moves the cursor forward one word at a time.

Search Through Bash History

The following shortcuts are used for searching for commands in the bash history:

  • Up arrow key – retrieves the previous command. If you press it constantly, it takes you through multiple commands in history, so you can find the one you want. Use the Down arrow to move in the reverse direction through the history.
  • Ctrl+P and Ctrl+N – alternatives for the Up and Down arrow keys, respectively.
  • Ctrl+R – starts a reverse search, through the bash history, simply type characters that should be unique to the command you want to find in the history.
  • Ctrl+S – launches a forward search, through the bash history.
  • Ctrl+G – quits reverse or forward search, through the bash history.

Delete Text on the Command Line

The following shortcuts are used for deleting text on the command line:

  • Ctrl+D or Delete – remove or deletes the character under the cursor.
  • Ctrl+K – removes all text from the cursor to the end of the line.
  • Ctrl+X and then Backspace – removes all the text from the cursor to the beginning of the line.

Transpose Text or Change Case on the Command Line

These shortcuts will transpose or change the case of letters or words on the command line:

  • Ctrl+T – transposes the character before the cursor with the character under the cursor.
  • Esc and then T – transposes the two words immediately before (or under) the cursor.
  • Esc and then U – transforms the text from the cursor to the end of the word to uppercase.
  • Esc and then L – transforms the text from the cursor to the end of the word to lowercase.
  • Esc and then C – changes the letter under the cursor (or the first letter of the next word) to uppercase, leaving the rest of the word unchanged.

Working With Processes in Linux

The following shortcuts help you to control running Linux processes.

  • Ctrl+Z – suspend the current foreground process. This sends the SIGTSTP signal to the process. You can get the process back to the foreground later using the fg process_name (or %bgprocess_number like %1, %2 and so on) command.
  • Ctrl+C – interrupt the current foreground process, by sending the SIGINT signal to it. The default behavior is to terminate a process gracefully, but the process can either honor or ignore it.
  • Ctrl+D – exit the bash shell (same as running the exit command).

Learn more about: All You Need To Know About Processes in Linux [Comprehensive Guide]

Bash Bang (!) Commands

In the final part of this article, we will explain some useful ! (bang) operations:

  • !! – execute last command.
  • !top – execute the most recent command that starts with ‘top’ (e.g. !).
  • !top:p – displays the command that !top would run (also adds it as the latest command in the command history).
  • !$ – execute the last word of the previous command (same as Alt +., e.g. if last command is ‘cat tecmint.txt’, then !$ would try to run ‘tecmint.txt’).
  • !$:p – displays the word that !$ would execute.
  • !* – displays the last word of the previous command.
  • !*:p – displays the last word that !* would substitute.

For more information, see the bash man page:

$ man bash 

That’s all for now! In this article, we shared some common and useful Bash command-line shortcuts and operations. Use the comment form below to make any additions or ask questions.

How to Install Kernel Headers in CentOS 7

When you compile a custom kernel module such as device driver on a CentOS system, you need to have kernel header files installed on the system, which include the C header files for the Linux kernel. Kernel header files provide different kinds of function and structure definitions required when installing or compiling any code that interfaces with the kernel.

When you install Kernel Headers, make sure it matches with the currently installed kernel version on the system. If your Kernel version comes with the default distribution installation or you have upgraded your Kernel using yum package manager from system base repositories, then you must install matching kernel headers using package manager only. If you’ve compiled Kernel from sources, you can install kernel headers from sources only.

Read Also: How to Install Kernel Headers in Ubuntu and Debian

In this article, we will explain how to install Kernel Headers in CentOS/RHEL 7 and Fedora distributions using default package manager.

Install Kernel Headers in CentOS 7


First confirm that the matching kernel headers are already installed under /usr/src/kernels/ location on your system using following commands.

# cd /usr/src/kernels/
# ls -l
Check Kernel Headers in CentOS 7

Check Kernel Headers in CentOS 7

If no matching kernel headers are located in the /usr/src/kernels/ directory, go ahead and install kernel headers, which is provided by the kernel-devel package that can be installed using default package manager as shown.

# yum install kernel-devel [On CentOS/RHEL 7]
# dnf install kernel-devel [On Fedora 22+]
Install Kernel Headers in CentOS 7

Install Kernel Headers in CentOS 7

After installing the kernel-devel package, you can find all the kernel headers files in /usr/src/kernels directory using following command.

# ls -l /usr/src/kernels/$(uname -r) 

Note on a VPS (for instance a Linode VPS), a kernel may have a customized version name, in such scenario, you have to identify the kernel version manually and check the installed kernel header files using following commands.

# uname -r # ls -l /usr/src/kernels/3.10.0-862.2.3.el7.x86_64
Check Kernel Version in CentOS 7

Check Kernel Version in CentOS 7

Sample Output
total 4544
drwxr-xr-x. 32 root root 4096 May 16 12:48 arch
drwxr-xr-x. 3 root root 4096 May 16 12:48 block
drwxr-xr-x. 4 root root 4096 May 16 12:48 crypto
drwxr-xr-x. 119 root root 4096 May 16 12:48 drivers
drwxr-xr-x. 2 root root 4096 May 16 12:48 firmware
drwxr-xr-x. 75 root root 4096 May 16 12:48 fs
drwxr-xr-x. 28 root root 4096 May 16 12:48 include
drwxr-xr-x. 2 root root 4096 May 16 12:48 init
drwxr-xr-x. 2 root root 4096 May 16 12:48 ipc
-rw-r--r--. 1 root root 505 May 9 19:21 Kconfig
drwxr-xr-x. 12 root root 4096 May 16 12:48 kernel
drwxr-xr-x. 10 root root 4096 May 16 12:48 lib
-rw-r--r--. 1 root root 51205 May 9 19:21 Makefile
-rw-r--r--. 1 root root 2305 May 9 19:21 Makefile.qlock
drwxr-xr-x. 2 root root 4096 May 16 12:48 mm
-rw-r--r--. 1 root root 1093137 May 9 19:21 Module.symvers
drwxr-xr-x. 60 root root 4096 May 16 12:48 net
drwxr-xr-x. 14 root root 4096 May 16 12:48 samples
drwxr-xr-x. 13 root root 4096 May 16 12:48 scripts
drwxr-xr-x. 9 root root 4096 May 16 12:48 security
drwxr-xr-x. 24 root root 4096 May 16 12:48 sound
-rw-r--r--. 1 root root 3409102 May 9 19:21 System.map
drwxr-xr-x. 17 root root 4096 May 16 12:48 tools
drwxr-xr-x. 2 root root 4096 May 16 12:48 usr
drwxr-xr-x. 4 root root 4096 May 16 12:48 virt
-rw-r--r--. 1 root root 41 May 9 19:21 vmlinux.id

In addition, if you need header files for the Linux kernel for use by glibc, install the kernel-header package using following command.

# yum install kernel-headers [On CentOS/RHEL 7]
# dnf install kernel-headers [On Fedora 22+]

Now you are good to go with compiling your own or existing kernel modules for software such as VirtualBox and many more.

That’s it! In this article, we have explained how to install kernel-devel and kernel-header packages in CentOS/RHEL 7 and Fedora systems. Remember that before you can compile kernel modules such as device driver on a Linux system, you should have necessary kernel header files installed. If you have queries, please use the comment form below to reach us.

Linux Fun – Play Old Classic Snake Game in Linux Terminal

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘Linux Fun – Play Old Classic Snake Game in Linux Terminal’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/05/Play-Snake-Game-in-Linux-Terminal.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

How to Install and Use Yaourt in Arch Linux

Yaourt (Yet Another User Repository Tool) is an advanced command line tool for installing packages on Arch Linux. It is a powerful wrapper for Pacman, the standard package management utility for Arch Linux with extended features and remarkable AUR (Arch Linux User Repository) support.

It is used to search, install and upgrade packages from AUR interactively, supports checking conflicts and dependency resolution. It can display colored output, show information about available packages, allows you to query packages based on different options, supports building packages directly from AUR or ABS (Arch Build System) source.

Yaourt is also used to manage backup files (typically .pac* files), query directly from a backup file; it can save and restore alpm databases, test local databases and also search orphaned packages. In addition, it supports splitting packages, and can sort packages by installation date and so much more.

Unfortunately, Yaourt doesn’t exist in the official package repository of Arch Linux Installation. You need to manually install Yaourt on Arch Linux using following two different ways.

Method 1: Install Yaourt in Arch Linux Using AUR


This method is a little longer, if you want a quick way of installing Yaourt, then check out the second method. Here, you need to start by installing all required packages as shown.

$ sudo pacman -S --needed base-devel git wget yajl
$ cd /tmp
$ git clone https://aur.archlinux.org/package-query.git
$ cd package-query/
$ makepkg -si && cd /tmp/
$ git clone https://aur.archlinux.org/yaourt.git
$ cd yaourt/
$ makepkg -si

Method 2: Install Yaourt in Arch Linux Using Custom Repository

Begin by adding the custom repository to the pacman package manager repository list.

$ sudo /etc/pacman.conf

Copy and paste the following custom repository configuration in the file.

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

Save the changes and exit the file. Then issue the following command to install yaourt.

$ sudo pacman -Sy yaourt

How to Use Yaourt Package Manger in Arch Linux

1. To install or update a package, for example glances, use the -S as shown.

$ sudo yaourt -S glances

2. To remove the package, use the -R flag as shown.

$ sudo yaourt -R glances

3. You can upgrade installed packages with the -U option as shown.

$ sudo yaourt -U target_here

4. To query the local database of packages, use the -Q flag.

$ sudo yaourt -Q | less

5. The next command is used to gather and show info about installed packages as well as configured repositories on a Arch Linux system.

$ yaourt --stats

6. You can sync the pacman package databases with the following command.

$ sudo yaourt -Sy

For more information, refer to the yaourt man page.

$ man yaourt

That’s it! In this article, we have explained two ways of installing Yaourt package management tool in Arch Linux. Use the comment form below to share any queries or thoughts with us.

How to Password Protect Single User Mode in CentOS 7

In one of our earlier articles, we described how to boot into single user mode on CentOS 7. It is also known as “maintenance mode”, where Linux only starts a handful of services for basic functionality to allow a single user (typically a superuser) perform certain administrative tasks such as using fsck to repair corrupted filesystems.

In single user mode, the system executes a single-user shell where you can run commands without any login credentials (username and password), you land straight in a limited shell with access to the entire filesystem.

This is a massive security hole since it gives intruders direct access to a shell (and possible access to the the entire filesystem). Therefore, it’s important to password protect the single user mode on CentOS 7 as explained below.

In CentOS/RHEL 7, the rescue and emergency targets (which are also single-user modes) are password protected by default.


For example when you try to change the target (runlevel) via systemd to rescue.target (also emergency.target), you will be asked for a root password as shown in the following screenshot.

# systemctl isolate rescue.target
OR
# systemctl isolate emergency.target
Single User Mode in CentOS 7

Single User Mode in CentOS 7

However, if an intruder has physical access to a server, he or she can select a kernel to boot from the grub menu item by pressing e key to edit the first boot option.

On the the kernel line that starts with “linux16“, he/she can change the argument ro to “rw init=/sysroot/bin/sh” and boot into single user mode on CentOS 7 without the system asking for a root password, even if the line SINGLE=/sbin/sushell is changed to SINGLE=/sbin/sulogin in the file /etc/sysconfig/init.

Change CentOS Boot Options

Change CentOS Boot Options

So, the only way to password protect single user mode in CentOS 7 is to protect GRUB with password using the following instructions.

How to Password Protect Grub in CentOS 7

First create a strong encrypted password using grub2-setpassword utility as shown.

# grub2-setpassword
Create Encrypted Password for GRUB

Create Encrypted Password for GRUB

The Hash for the password is stored in /boot/grub2/user.cfg & user i.e.”root” is defined in /boot/grub2/grub.cfg file, you can view the password using cat command as shown.

# cat /boot/grub2/user.cfg
GRUB Password

GRUB Password

Now open /boot/grub2/grub.cfg file and search for the boot entry that you want to password protect, it starts with menuentry. Once the entry is located, remove the --unrestricted parameter from it.

Password Protect Grub in CentOS 7

Password Protect Grub in CentOS 7

Save the file and close, now try to reboot the CentOS 7 system and modify the boot entries by pressing e key, you will be asked to provide the credentials as shown.

Password Protected Grub

Password Protected Grub

CentOS 7 Boot Configuration

CentOS 7 Boot Configuration

That’s it. You have successfully password protected your CentOS 7 GRUB-menu.

Learn Kali Linux, Wireshark & Python with Cybersecurity Bundle

‘,
enableHover: false,
enableTracking: true,
buttons: { twitter: {via: ‘tecmint’}},
click: function(api, options){
api.simulateClick();
api.openPopup(‘twitter’);
}
});
jQuery(‘#facebook’).sharrre({
share: {
facebook: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
click: function(api, options){
api.simulateClick();
api.openPopup(‘facebook’);
}
});
jQuery(‘#googleplus’).sharrre({
share: {
googlePlus: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
urlCurl: ‘https://www.tecmint.com/wp-content/themes/tecmint/js/sharrre.php’,
click: function(api, options){
api.simulateClick();
api.openPopup(‘googlePlus’);
}
});
jQuery(‘#linkedin’).sharrre({
share: {
linkedin: true
},
template: ‘{total}’,
enableHover: false,
enableTracking: true,
buttons: {
linkedin: {
description: ‘Learn Kali Linux, Wireshark & Python with Cybersecurity Bundle’,media: ‘https://www.tecmint.com/wp-content/uploads/2018/05/Learn-Cybersecurity-Online.png’ }
},
click: function(api, options){
api.simulateClick();
api.openPopup(‘linkedin’);
}
});
// Scrollable sharrre bar, contributed by Erik Frye. Awesome!
var shareContainer = jQuery(“.sharrre-container”),
header = jQuery(‘#header’),
postEntry = jQuery(‘.entry’),
$window = jQuery(window),
distanceFromTop = 20,
startSharePosition = shareContainer.offset(),
contentBottom = postEntry.offset().top + postEntry.outerHeight(),
topOfTemplate = header.offset().top;
getTopSpacing();
shareScroll = function(){
if($window.width() > 719){ var scrollTop = $window.scrollTop() + topOfTemplate,
stopLocation = contentBottom – (shareContainer.outerHeight() + topSpacing);
if(scrollTop > stopLocation){
shareContainer.offset({top: contentBottom – shareContainer.outerHeight(),left: startSharePosition.left});
}
else if(scrollTop >= postEntry.offset().top-topSpacing){
shareContainer.offset({top: scrollTop + topSpacing, left: startSharePosition.left});
}else if(scrollTop 1024)
topSpacing = distanceFromTop + jQuery(‘.nav-wrap’).outerHeight();
else
topSpacing = distanceFromTop;
}
});
]]>

Piwigo – Create Your Own Photo Gallery Website

Piwigo is an open source project which allows you to create your own photo gallery on the web and upload photos and create new albums. The platform includes some powerful features built-in, such as albums, tags, watermark, geolocation, calendars, system notifications, access control levels, themes and statistics.

Piwigo has a huge amount of available plugins (over 200) and a great collection of themes. It is also translated in more than 50 languages. Its core functions are written in PHP programming language and requires a RDBMS database backend, such as MySQL database.

Piwigo Photo Gallery

Piwigo Photo Gallery

This fact makes it easy to deploy Piwigo on top of a LAMP (Linux, Apache, MySQL and PHP) stack installed on your own server, VPS or on shared hosted environments.

An online demo is available for you to try before installing Piwigo on CentOS system.

Demo URL: http://piwigo.org/demo/

Requirements:

  1. A dedicated VPS with a registered domain name
  2. A CentOS 7 Server with Minimal Install
  3. LAMP stack installed in CentOS 7


Piwigo is an open source project which can be deployed on a VPS server of your choice.

You can get a 2GB RAM VPS from Linode for $10, but it’s unmanaged. If you want a Managed VPS, then use our new BlueHost Promotion Offer, you will get upto 40% OFF on hosting with one Free Domain for Life. If you get a Managed VPS, they will probably install Piwigo for you.

In this guide we’ll learn how to install and configure Piwigo image gallery software on top of a LAMP stack in a CentOS 7 VPS server.

Setting Up Pre-requirements for Piwigo

1. After you’ve installed LAMP stack on your VPS by following the guide in the article description, make sure you also install the below PHP extensions required by Piwigo to properly run on your server.

# yum install php php-xml php-mbstring php-gd

2. Next, install the following command line utilities on your VPS server in order to download and extract Piwigo archive sources in your system.

# yum install unzip zip wget 

3. Next, log in to MySQL database and execute the below command in order to create Piwigo database and the user which will be used to manage the database. Replace the database name and credentials used in this tutorial with your own settings.

# mysql -u root -p
MariaDB [(none)]> create database piwigo;
MariaDB [(none)]>grant all privileges on piwigo.* to 'piwigouser'@'localhost' identified by 'pass123';
MariaDB [(none)]>flush privileges;
MariaDB [(none)]>exit

4. Next, open end edit PHP configuration file and set the correct timezone settings for your server. Use PHP docs to get the timezone settings list.

# nano /etc/php.ini

Locate and Insert the below line after [Date] statement.

date.timezone = Europe/Your_city
Set Timezone in PHP Configuration

Set Timezone in PHP Configuration

Save and close the file and restart Apache HTTP server to apply all changes, by issuing the below command.

# systemctl restart httpd

5. Next, completely disable SELinux in your CentOS system by executing the below commands. Use cat command to show Selinux configuration file.

# cat /etc/selinux/config # sed -i.backup 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config # cat /etc/selinux/config # setenforce 0
# getenforce
Disable SELinux in CentOS 7

Disable SELinux in CentOS 7

Install Piwigo in CentOS 7

6. On the next step, visit Piwigo official download page and grab the latest installer zip sources on your system using wget utility by issuing the below command. After download completes, extract Piwigo zip archive in your current working directory.

# wget http://piwigo.org/download/dlcounter.php?code=latest -O piwigo.zip
# ls # unzip piwigo.zip 
Download Piwigo Software

Download Piwigo Software

7. After you’ve extracted the zip archive, copy Piwigo sources files into your domain webroot path by issuing the below command. Afterwards, grant Apache account full privileges to webroot files and list the content of your web server document root path.

# cp -rf piwigo/* /var/www/html/
# chown -R apache:apache /var/www/html/
# ls -l /var/www/html/
Setting Up Piwigo Under Apache

Setting Up Piwigo Under Apache

8. Next, change the webroot file permissions for Piwigo installed files and grant _data directory full write permissions for other system users, by issuing the below commands.

# chmod -R 755 /var/www/html/
# chmod -R 777 /var/www/html/_data/
# ls -al /var/www/html/
Setting Permissions on Piwigo

Setting Permissions on Piwigo

9. Now, start the installation process of Piwigo. Open a browser and navigate to your server IP address or domain name.

http://192.168.1.164
OR
http://your-domain.com

On the first installation screen, select Piwigo language and insert MySQL database settings: host, user, password and table prefix. Also, add a Piwigo admin account with a strong password and the email address of the admin account. Finally, hit on Start installation button to install Piwigo.

Piwigo Installation Configuration

Piwigo Installation Configuration

10. After the installation has been completed, hit on Visit the gallery button in order to be redirected to Piwigo admin panel.

Piwigo Installation Completed

Piwigo Installation Completed

11. On the next screen, because no image has been uploaded to the server yet, hit on Start the Tour button in order to display the software guidance window and review all step required to upload your photos and use Piwigo image gallery.

Start Piwigo Tour

Start Piwigo Tour

Piwigo Admin Dashboard

Piwigo Admin Dashboard

That’s all! Now you can start creating image galleries and upload your image files to the server using one of the most flexible open source solutions to host your photos.

Piwigo Image Gallery

Piwigo Image Gallery

If you’re looking for someone to install Piwigo image gallery software, consider us, because we offer wide range of Linux services at fair minimum rates with 14-days free support via email. Request Installation Now.