How to Install Lua Scripting Language in Linux

Lua is a free and open source, powerful, robust, minimal and embeddable scripting language. It’s an extensible and interpreted scripting languages that is dynamically typed, run by interpreting bytecode with a register-based virtual machine.

Lua runs on all if not most Unix-like operating systems including Linux and Windows; on mobile operating systems (Android, iOS, BREW, Symbian, Windows Phone); on embedded microprocessors (ARM and Rabbit); on IBM mainframes and many more.

See how Lua programs works in the live demo.

Lua Features:

  • Builds on all systems with a standard C compiler.
  • It’s remarkably lightweight, fast, efficient and portable.
  • It’s easy to learn and use.
  • It has a simple and well documented API.
  • It supports several types of programming (such as procedural, object-oriented, functional and data-driven programming as well as data description).
  • Implements object-oriented via meta-mechanisms.
  • It also brings together straightforward procedural syntax with formidable data description constructs rooted around associative arrays and extensible semantics.
  • Comes with automatic memory management with incremental garbage collection (thus making it perfect for real-world configuration, scripting, and also breakneck prototyping).

How to Install Lua in Linux

Lua package is available in official repositories of major Linux distributions, you can install the latest version using the appropriate package manager on your system.

$ sudo apt install lua5.3	                #Debian/Ubuntu systems 
# yum install epel-release && yum install lua	#RHEL/CentOS systems 
# dnf install lua		                #Fedora 22+

Note: The current version of Lua package in EPEL repository is 5.1.4; therefore to install the current release, you need to build and install it from source as explained below.

Install Lua from Sources

First, ensure that you have development tools installed on your system, otherwise run the command below to install them.

$ sudo apt install build-essential libreadline-dev      #Debian/Ubuntu systems 
# yum groupinstall "Development Tools" readline		#RHEL/CentOS systems 
# dnf groupinstall "Development Tools" readline		#Fedora 22+

Then to build and install the latest release (version 5.3.4 at the time of this writing) of Lua, run the following commands to download the package tar ball, extract, build and install it.

$ mkdir lua_build
$ cd lua_build
$ curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz
$ tar -zxf lua-5.3.4.tar.gz
$ cd lua-5.3.4
$ make linux test
$ sudo make install

Once you have installed it, run Lua interpretor as shown.

$ lua 

Lua Interpretor

Lua Interpretor

Using your favorite text editor, you can create your first Lua program as follows.

$ vi hello.lua

And add the following code to the file.

print("Hello World")
print("This is Tecmint.com and we are testing Lua")

Save and close the file. Then run your program as shown.

$ lua hello.lua

Run Lua Program

Run Lua Program

For more information and to learn how to write Lua programs, go to: https://www.lua.org/home.html

Lua is a versatile programming language being used in numerous industries (from web to gaming to image processing and beyond), and it’s designed with a high priority for embedded systems.

If you encounter any errors during installation or simply want to know more, use the comment form below to send us your thoughts.

Source

Zammad – An Open Source Help Desk and Support Ticket System

Zammad is a free open source, fully featured web based ticketing system for helpdesk or customer support. It ships in with a multitude of features for handling customer communication through various channels such as social networks (Facebook and Twitter), live chat, e-mails as well as telephone. It has an API for integrating your telephone system into in and outgoing calls.

Zammad Help Desk & Ticket System

Zammad Help Desk & Ticket System

Zammad Features:

  • Supports full-text search.
  • Has flexible text modules.
  • Immediately reports changes to objects.
  • Supports auto-save.
  • Supports individual escalation or setting client solution time limit.
  • It is auditable and often used in banks.
  • Allows for creation of individual overviews.
  • Supports various security mechanisms such as device-logging and two-factor-authentication.
  • Provides a customer interface, where they can track the current editing at any time.
  • Supports external authentication via Twitter, Facebook, LinkedIn or Google via OAuth.
  • Supports nine languages and so much more.

Zammad Requirements:

  • Ruby 2.4.2
  • Database: PostgresSQL (supported by default), MariaDB or MySQL
  • Reverse Proxy: Nginx (supported by default) or Apache.
  • Elasticsearch for excellent search performance

Zammad Installation Prerequisites:

Zammad 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 Zammad for you.

In this article we will explain how to install and configure Zammad open source helpdesk/customer support ticketing system in CentOS/RHEL 7Ubuntu 16.04 and Debian 9 server.

Step 1: Configure System Locale on System

1. Zammad uses UTF-8 locale, otherwise, packages such as PostgreSQL will not install. Check your system locale using following command on your respective Linux distribution.

# locale

LANG=en_IN
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=

If there is nothing with UTF-8 in the above output, you have to set a new locale using following command.

# localectl set-locale LANG=en_US.UTF-8
# locale status

System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us

Step 2: Install Elasticsearch on System

2. Now install Elasticsearch using following commands according to your Linux distribution you are using.

Install Elasticsearch on CentOS/RHEL 7

# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
# echo "[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md" | sudo tee /etc/yum.repos.d/elasticsearch.repo

# yum -y install java elasticsearch
# /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
# systemctl daemon-reload
# systemctl enable elasticsearch
# systemctl start elasticsearch
# systemctl status elasticsearch

Install Elasticsearch on Ubuntu 16.04

# echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
# apt-get update
# apt-get install openjdk-8-jre elasticsearch
# /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
# systemctl restart elasticsearch
# systemctl enable elasticsearch
# systemctl status elasticsearch

Install Elasticsearch on Debian 9

# apt-get install apt-transport-https sudo wget
# echo "deb http://ftp.debian.org/debian jessie-backports main" | sudo tee -a /etc/apt/sources.list.d/debian-backports.list
# echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
# apt-get update
# apt-get install -t jessie-backports openjdk-8-jre
# apt-get install elasticsearch
# /var/lib/dpkg/info/ca-certificates-java.postinst configure
# /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
# systemctl restart elasticsearch
# systemctl enable elasticsearch
# systemctl status elasticsearch

Step 3: Install Zammad Support Ticket System

3. Once Elasticsearch has been installed, now you can add Zammad official repository to install Zammad, this will also install required packages such as Nginx HTTP server and PostgreSQL from this repository using following commands according to your distribution.

Install Zammad on CentOS/RHEL 7

# yum -y install epel-release wget
# wget -O /etc/yum.repos.d/zammad.repo https://dl.packager.io/srv/zammad/zammad/stable/installer/el/7.repo
# yum -y install zammad

Install Zammad on Ubuntu 16.04

# wget -qO- https://dl.packager.io/srv/zammad/zammad/key | sudo apt-key add -
# wget -O /etc/apt/sources.list.d/zammad.list https://dl.packager.io/srv/zammad/zammad/stable/installer/ubuntu/16.04.repo
# apt-get update
# apt-get install zammad

Install Zammad on Debian 9

# wget -qO- https://dl.packager.io/srv/zammad/zammad/key | sudo apt-key add -
# wget -O /etc/apt/sources.list.d/zammad.list https://dl.packager.io/srv/zammad/zammad/stable/installer/debian/9.repo
# apt-get update
# apt-get install zammad

4. Once Zammad has been installed, you can find all its packages under /opt/zammad (default base directory) and all the Zammad services (zammadzammad-webzammad-worker and zammad-websocket) are started automatically, you can view their status using following commands.

#systemctl status zammad
#systemctl status zammad-web
#systemctl status zammad-worker
#systemctl status zammad-websocket

5. You can also manage (restart, stop, start, disable, enable, etc..) any of these services like other systemd services using following commands.

--------- Zammad Server --------- 
# systemctl status zammad
# systemctl stop zammad
# systemctl start zammad
# systemctl restart zammad
--------- Zammad Web Application Server ---------
# systemctl status zammad-web
# systemctl stop zammad-web
# systemctl start zammad-web
# systemctl restart zammad-web
--------- Zammad Worker Process ---------
# systemctl status zammad-worker
# systemctl stop zammad-worker
# systemctl start zammad-worker
# systemctl restart zammad-worker
--------- Zammad Websocket Server ---------
# systemctl status zammad-websocket
# systemctl stop zammad-websocket
# systemctl start zammad-websocket
# systemctl restart zammad-websocket

Step 4: Verify Nginx and PostgreSQL Services

6. The Nginx web server is started automatically, a server block for Zammad is created and auto-configured in /etc/nginx/conf.d/zammad.conf, that you confirm using following commands.

# cat /etc/nginx/conf.d/zammad.conf
# systemctl status nginx

7. The PostgreSQL database server is also auto-started and configured to work with Zammad that you can verify using following command.

# systemctl status postgresql

Step 5: Configure Nginx Server Block for Zammad

8. Now it’s time to configure nginx server block for Zammad, open the configuration file.

# vi /etc/nginx/conf.d/zammad.conf

Add your fully qualified domain name or Public IP to server name directive as shown.

server {
    listen 80;

    # replace 'localhost' with your fqdn if you want to use zammad from remote
    server_name domain.com;

Configure Nginx for Zammad

Configure Nginx for Zammad

Save the changes and exit the file. Then restart Nginx services for the recent changes to take effect.

# systemctl restart nginx

Important: On CentOS, SeLinux & Firewalld are possibly enabled. To get everything work you need to open the port 80 (HTTP) and 443 (HTTPS) to allow client requests to the Nginx web server, as follows:

# setsebool httpd_can_network_connect on -P
# firewall-cmd --zone=public --add-service=http --permanent
# firewall-cmd --zone=public --add-service=https --permanent
# firewall-cmd --reload

Step 6: Install Zammad via Web Installer

9. Once everything in place, you can access your Zammad installation from a web browser at the following URL’s.

http://example.com
OR
http://Public-IP

After the web interface loads, you will see the message Setup new system, click on it to continue.

Zammad Setup Web Installer

Zammad Setup Web Installer

10. Next, create the Zammad admin account, enter required details and click Create.

Create Zammad Admin Account

Create Zammad Admin Account

13. Then create your organization and upload logo, once you are done, click Next.

Create Organization in Zammad

Create Organization in Zammad

11. Next, configure Zammad email service. You can either use your local server setup or setup another outgoing STMP server. Then click Continue.

Set Zammad Email Notification

Set Zammad Email Notification

12. In the next interface, you can either configure Connect Channels or click Skip to configure it later on.

Setup Zammad Connect Channels

Setup Zammad Connect Channels

13. Once the setup is complete. You will be redirected to the Zammad helpdesk dashboard as shown in the following screenshot. From here, you can full setup you helpdesk or customer support system and manage it.

Zammad Helpdesk Dashboard

Zammad Helpdesk Dashboard

For more information, go to the Zammad Homepage: https://zammad.org/

That’s all! Zammad is a powerful web based ticketing system for helpdesk or customer support. If you encountered any issues while installing it, use the feedback form below to share you queries with us.

Source

How to Install Eclipse Photon IDE in Debian and Ubuntu

Eclipse is a free integrated development environment IDE which is used by programmers around to write software mostly in Java but also in other major programming languages via Eclipse plugins.

The latest release of Eclipse Photon IDE doesn’t come with pre-build binary packages specific for Debian based Linux distributions. Instead, you can install Eclipse IDE in Ubuntu or Debian based Linux distributions via the compressed tar archive file.

In this tutorial we will learn how to install the latest edition of Eclipse Photon IDE in Ubuntu or in Debian based Linux distributions.

Requirements:

  1. A Desktop machine with minimum 2GB of RAM.
  2. Java 9 SE SDK installed in Debian based distributions.

Install Eclipse IDE in Debian and Ubuntu

Java 8 or newer JRE/JDK is required to install Eclipse Photon IDE and the easiest way to install Oracle Java JDK using third party PPA as shown.

Install Java 8 on Ubuntu/Debian

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Install Java 9 on Ubuntu/Debian

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java9-installer

Install Java 10 on Ubuntu/Debian

$ sudo add-apt-repository ppa:linuxuprising/java
$ sudo apt update
$ sudo apt install oracle-java10-installer

For installing Eclipse IDE in your system, first open a browser and go to Eclipse official download page and download the latest version of the tar package specific to your installed Linux distribution architecture.

Installing Eclipse Photon IDE in Ubuntu/Debian

Alternatively, you can also download Eclipse IDE tarball file in your system via wget utility, by issuing the below command.

-------------- For 64-bit Architecture -------------- 
$ wget http://ftp.fau.de/eclipse/technology/epp/downloads/release/photon/R/eclipse-jee-photon-R-linux-gtk-x86_64.tar.gz

-------------- For 32-bit Architecture --------------
$ wget http://ftp.fau.de/eclipse/technology/epp/downloads/release/photon/R/eclipse-jee-photon-R-linux-gtk.tar.gz

Installing Eclipse Oxygen IDE in Ubuntu/Debian

-------------- For 64-bit Architecture -------------- 
$ wget http://ftp.fau.de/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz

-------------- For 32-bit Architecture --------------
$ wget http://ftp.fau.de/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-jee-oxygen-R-linux-gtk.tar.gz

After the download completes, navigate to the directory where the archive package has been downloaded, usually Downloads directories from your home, and issue the below commands to start installing Eclipse Photon IDE.

The commands executed below will decompress the archive directly into /opt directory and create a symlink into an executable path for eclipse executable file.

$ cd Downloads/
$ sudo tar xfz eclipse-jee-photon-R-linux* -C /opt/  [For Photon]
$ sudo tar xfz eclipse-jee-oxygen-R-linux* -C /opt/  [For Oxygen]
$ ls /opt/eclipse/
$ sudo ln -s /opt/eclipse/eclipse /usr/local/sbin/eclipse
$ ls -l /usr/local/sbin/

Next, create Eclipse desktop launcher icon into system applications directory.

$ sudo nano /usr/share/applications/eclipse.desktop

Add the following configuration into the file eclipse.desktop.

[Desktop Entry]
Name=Eclipse IDE
Comment=Eclipse IDE
Type=Application
Encoding=UTF-8
Exec=/usr/local/sbin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=GNOME;Application;Development;
Terminal=false
StartupNotify=true

After you’ve created Eclipse launcher, use Ubuntu dash to search and open the application. On the first application launch, add Eclipse workspace directory and hit on Launch button to start the application.

Create Eclipse IDE Desktop Workspace

Create Eclipse IDE Desktop Workspace

Eclipse IDE on Ubuntu

Eclipse IDE on Ubuntu

Install Eclipse Photon via Snap on Ubuntu

Snap is software deployment and package management system to manage packages on Linux distribution, you can use snap to install Eclipse Photon edition on Ubuntu 18.04 or newer using the following commands.

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

After install Eclipse, navigate to the Activities Overview and search for Eclipse and launch it…

That’s all! The latest version of Eclipse IDE is now installed in your system. Enjoy programming with Eclipse Photon.

Source

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 LinuxWindows and MacOS. It is a de facto software for data analytics, being used at Stack OverfloweBayPayPalUber and Digital Ocean – just to mention but a few.

It supports 30+ open source as well as commercial databases/data sources including MySQLPostgreSQLGraphiteElasticsearchOpenTSDBPrometheus 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 AlsoHow 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 CentOSDebian 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.

Source

Wkhtmltopdf – A Smart Tool to Convert Website HTML Page to PDF in Linux

Wkhtmltopdf is an open source simple and much effective command-line shell utility that enables user to convert any given HTML (Web Page) to PDF document or an image (jpgpng, etc).

Wkhtmltopdf is written in C++ programming language and distributed under GNU/GPL (General Public License). It uses WebKit rendering layout engine to convert HTML pages to PDF document without loosing the quality of the pages. Its is really very useful and trustworthy solution for creating and storing snapshots of web pages in real-time.

Wkhtmltopdf Features

  1. Open source and cross platform.
  2. Convert any HTML web pages to PDF files using WebKit engine.
  3. Options to add headers and footers
  4. Table of Content (TOC) generation option.
  5. Provides batch mode conversions.
  6. Support for PHP or Python via bindings to libwkhtmltox.

In this article we will show you how to install Wkhtmltopdf program under Linux systems using source tarball files.

Install Evince (PDF Viewer)

Let’s install evince (a PDF reader) program for viewing PDF files in Linux systems.

$ sudo yum install evince             [RHEL/CentOS and Fedora]
$ sudo dnf install evince             [On Fedora 22+ versions]
$ sudo apt-get install evince         [On Debian/Ubuntu systems]

Download Wkhtmltopdf Source File

Download wkhtmltopdf source files for your Linux architecture using Wget command, or you can also download latest versions (current stable series is 0.12.4) at wkhtmltopdf download page.

On 64-bit Linux OS
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
On 32-bit Linux OS
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-i386.tar.xz

Install Wkhtmltopdf in Linux

Extract the files to a current working directory using following tar command.

------ On 64-bit Linux OS ------
$ sudo tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz 

------ On 32-bit Linux OS ------
$ sudo tar -xvzf wkhtmltox-0.12.4_linux-generic-i386.tar.xz 

Install the wkhtmltopdf under /usr/bin directory for easy execution of program from any path.

$ sudo cp wkhtmltox/bin/wkhtmltopdf /usr/bin/

How to Use Wkhtmltopdf?

Here we will see how to covert remote HTML pages to PDF files, verify information, view created files using evince program from the GNOME Desktop.

Convert Website HTML Page to PDF File

To convert any website HTML web page to PDF, run the following example command. It will convert the given webpage to 10-Sudo-Configurations.pdf in current working directory.

# wkhtmltopdf https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/ 10-Sudo-Configurations.pdf
Sample Output :
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

View Generated PDF File

To verify that the file is created, use the following command.

$ file 10-Sudo-Configurations.pdf
Sample Output :
10-Sudo-Configurations.pdf: PDF document, version 1.4

View Information of Generated PDF File

To view the information of generated file, issue the following command.

$ pdfinfo 10-Sudo-Configurations.pdf
Sample Output :
Title:          10 Useful Sudoers Configurations for Setting 'sudo' in Linux
Creator:        wkhtmltopdf 0.12.4
Producer:       Qt 4.8.7
CreationDate:   Sat Jan 28 13:02:58 2017
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          13
Encrypted:      no
Page size:      595 x 842 pts (A4)
Page rot:       0
File size:      697827 bytes
Optimized:      no
PDF version:    1.4

View Created PDF File

Take a look at the newly created PDF file using evince program from the desktop.

$ evince 10-Sudo-Configurations.pdf
Sample Screenshot :

Looks pretty nice under my Linux Mint 17 box.

View Website Page in PDF

View Website Page in PDF

Create TOC (Table Of Content) of a Page to PDF

To create a table of content for a PDF file, use the option as toc.

$ wkhtmltopdf toc https://www.tecmint.com/sudoers-configurations-for-setting-sudo-in-linux/ 10-Sudo-Configurations.pdf
Sample Output :
Loading pages (1/6)
Counting pages (2/6)
Loading TOC (3/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

To check the TOC for the created file, again use evince program.

$ evince 10-Sudo-Configurations.pdf
Sample Screenshot :

Take a look at the picture below. it looks even more better than the above.

Create Website Page to Table of Contents in PDF

Create Website Page to Table of Contents in PDF

Wkhtmltopdf Options and Usage

For Wkhtmltopdf more usage and options, use the following help command. It will display list of all available options that you can use with it.

$ wkhtmltopdf --help

Source

Using Shell Scripting to Automate Linux System Maintenance Tasks

Some time ago I read that one of the distinguishing characteristics of an effective system administrator / engineer is laziness. It seemed a little contradictory at first but the author then proceeded to explain why:

Automate Linux System Maintenance Tasks

RHCE Series: Automate Linux System Maintenance Tasks – Part 4

if a sysadmin spends most of his time solving issues and doing repetitive tasks, you can suspect he or she is not doing things quite right. In other words, an effective system administrator / engineer should develop a plan to perform repetitive tasks with as less action on his / her part as possible, and should foresee problems by using,

for example, the tools reviewed in Part 3 – Monitor System Activity Reports Using Linux Toolsets of this series. Thus, although he or she may not seem to be doing much, it’s because most of his / her responsibilities have been taken care of with the help of shell scripting, which is what we’re going to talk about in this tutorial.

What is a shell script?

In few words, a shell script is nothing more and nothing less than a program that is executed step by step by a shell, which is another program that provides an interface layer between the Linux kernel and the end user.

By default, the shell used for user accounts in RHEL 7 is bash (/bin/bash). If you want a detailed description and some historical background, you can refer to this Wikipedia article.

To find out more about the enormous set of features provided by this shell, you may want to check out its man page, which is downloaded in in PDF format at (Bash Commands). Other than that, it is assumed that you are familiar with Linux commands (if not, I strongly advise you to go through A Guide from Newbies to SysAdminarticle in Tecmint.com before proceeding). Now let’s get started.

Writing a script to display system information

For our convenience, let’s create a directory to store our shell scripts:

# mkdir scripts
# cd scripts

And open a new text file named system_info.sh with your preferred text editor. We will begin by inserting a few comments at the top and some commands afterwards:

#!/bin/bash

# Sample script written for Part 4 of the RHCE series
# This script will return the following set of system information:
# -Hostname information:
echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m"
hostnamectl
echo ""
# -File system disk space usage:
echo -e "\e[31;43m***** FILE SYSTEM DISK SPACE USAGE *****\e[0m"
df -h
echo ""
# -Free and used memory in the system:
echo -e "\e[31;43m ***** FREE AND USED MEMORY *****\e[0m"
free
echo ""
# -System uptime and load:
echo -e "\e[31;43m***** SYSTEM UPTIME AND LOAD *****\e[0m"
uptime
echo ""
# -Logged-in users:
echo -e "\e[31;43m***** CURRENTLY LOGGED-IN USERS *****\e[0m"
who
echo ""
# -Top 5 processes as far as memory usage is concerned
echo -e "\e[31;43m***** TOP 5 MEMORY-CONSUMING PROCESSES *****\e[0m"
ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6
echo ""
echo -e "\e[1;32mDone.\e[0m"

Next, give the script execute permissions:

# chmod +x system_info.sh

and run it:

./system_info.sh

Note that the headers of each section are shown in color for better visualization:

Server Monitoring Shell Script

Server Monitoring Shell Script

That functionality is provided by this command:

echo -e "\e[COLOR1;COLOR2m<YOUR TEXT HERE>\e[0m"

Where COLOR1 and COLOR2 are the foreground and background colors, respectively (more info and options are explained in this entry from the Arch Linux Wiki) and <YOUR TEXT HERE> is the string that you want to show in color.

Automating Tasks

The tasks that you may need to automate may vary from case to case. Thus, we cannot possibly cover all of the possible scenarios in a single article, but we will present three classic tasks that can be automated using shell scripting:

1) update the local file database, 2) find (and alternatively delete) files with 777 permissions, and 3) alert when filesystem usage surpasses a defined limit.

Let’s create a file named auto_tasks.sh in our scripts directory with the following content:

#!/bin/bash

# Sample script to automate tasks:
# -Update local file database:
echo -e "\e[4;32mUPDATING LOCAL FILE DATABASE\e[0m"
updatedb
if [ $? == 0 ]; then
        echo "The local file database was updated correctly."
else
        echo "The local file database was not updated correctly."
fi
echo ""

# -Find and / or delete files with 777 permissions.
echo -e "\e[4;32mLOOKING FOR FILES WITH 777 PERMISSIONS\e[0m"
# Enable either option (comment out the other line), but not both.
# Option 1: Delete files without prompting for confirmation. Assumes GNU version of find.
#find -type f -perm 0777 -delete
# Option 2: Ask for confirmation before deleting files. More portable across systems.
find -type f -perm 0777 -exec rm -i {} +;
echo ""
# -Alert when file system usage surpasses a defined limit 
echo -e "\e[4;32mCHECKING FILE SYSTEM USAGE\e[0m"
THRESHOLD=30
while read line; do
        # This variable stores the file system path as a string
        FILESYSTEM=$(echo $line | awk '{print $1}')
        # This variable stores the use percentage (XX%)
        PERCENTAGE=$(echo $line | awk '{print $5}')
        # Use percentage without the % sign.
        USAGE=${PERCENTAGE%?}
        if [ $USAGE -gt $THRESHOLD ]; then
                echo "The remaining available space in $FILESYSTEM is critically low. Used: $PERCENTAGE"
        fi
done < <(df -h --total | grep -vi filesystem)

Please note that there is a space between the two < signs in the last line of the script.

Shell Script to Find 777 Permissions

Shell Script to Find 777 Permissions

Using Cron

To take efficiency one step further, you will not want to sit in front of your computer and run those scripts manually. Rather, you will use cron to schedule those tasks to run on a periodic basis and sends the results to a predefined list of recipients via email or save them to a file that can be viewed using a web browser.

The following script (filesystem_usage.sh) will run the well-known df -h command, format the output into a HTML table and save it in the report.html file:

#!/bin/bash
# Sample script to demonstrate the creation of an HTML report using shell scripting
# Web directory
WEB_DIR=/var/www/html
# A little CSS and table layout to make the report look a little nicer
echo "<HTML>
<HEAD>
<style>
.titulo{font-size: 1em; color: white; background:#0863CE; padding: 0.1em 0.2em;}
table
{
border-collapse:collapse;
}
table, td, th
{
border:1px solid black;
}
</style>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
</HEAD>
<BODY>" > $WEB_DIR/report.html
# View hostname and insert it at the top of the html body
HOST=$(hostname)
echo "Filesystem usage for host <strong>$HOST</strong><br>
Last updated: <strong>$(date)</strong><br><br>
<table border='1'>
<tr><th class='titulo'>Filesystem</td>
<th class='titulo'>Size</td>
<th class='titulo'>Use %</td>
</tr>" >> $WEB_DIR/report.html
# Read the output of df -h line by line
while read line; do
echo "<tr><td align='center'>" >> $WEB_DIR/report.html
echo $line | awk '{print $1}' >> $WEB_DIR/report.html
echo "</td><td align='center'>" >> $WEB_DIR/report.html
echo $line | awk '{print $2}' >> $WEB_DIR/report.html
echo "</td><td align='center'>" >> $WEB_DIR/report.html
echo $line | awk '{print $5}' >> $WEB_DIR/report.html
echo "</td></tr>" >> $WEB_DIR/report.html
done < <(df -h | grep -vi filesystem)
echo "</table></BODY></HTML>" >> $WEB_DIR/report.html

In our RHEL 7 server (192.168.0.18), this looks as follows:

Server Monitoring Report

Server Monitoring Report

You can add to that report as much information as you want. To run the script every day at 1:30 pm, add the following crontab entry:

30 13 * * * /root/scripts/filesystem_usage.sh

Summary

You will most likely think of several other tasks that you want or need to automate; as you can see, using shell scripting will greatly simplify this effort. Feel free to let us know if you find this article helpful and don’t hesitate to add your own ideas or comments via the form below.

Source

Fabric – Automate Your Linux Administration Tasks and Application Deployments Over SSH

When it comes to managing remote machines and deployment of applications, there are several command line tools out there in existence though many have a common problem of lack of detailed documentation.

In this guide, we shall cover the steps to introduce and get started on how to use fabric to improve on administering groups of servers.

Automate Linux Administration Tasks Using Fabric

Automate Linux Administration Tasks Using Fabric

Fabric is a python library and a powerful command line tool for performing system administration tasks such as executing SSH commands on multiple machines and application deployment.

Read AlsoUse Shell Scripting to Automate Linux System Maintenance Tasks

Having a working knowledge of Python can be helpful when using Fabric, but may certainly not be necessary.

Reasons why you should choose fabric over other alternatives:

  1. Simplicity
  2. It is well-documented
  3. You don’t need to learn another language if you’re already a python guy.
  4. Easy to install and use.
  5. It is fast in its operations.
  6. It supports parallel remote execution.

How to Install Fabric Automation Tool in Linux

An important characteristic about fabric is that the remote machines which you need to administer only need to have the standard OpenSSH server installed. You only need certain requirements installed on the server from which you are administering the remote servers before you can get started.

Requirements:

  1. Python 2.5+ with the development headers
  2. Python-setuptools and pip (optional, but preferred) gcc

Fabric is easily installed using pip (highly recommended), but you may also prefer to choose your default package manager yumdnf or apt-get to install fabric package, typically called fabric or python-fabric.

For RHEL/CentOS based distributions, you must have EPEL repository installed and enabled on the system to install fabric package.

# yum install fabric   [On RedHat based systems]  
# dnf install fabric   [On Fedora 22+ versions]

For Debian and it’s derivatives such as Ubuntu and Mint users can simply do apt-get to install the fabric package as shown:

# apt-get install fabric

If you want to install development version of fabric, you may use pip to grab the most recent master branch.

# yum install python-pip       [On RedHat based systems] 
# dnf install python-pip       [On Fedora 22+ versions]
# apt-get install python-pip   [On Debian based systems]

Once pip has been installed successfully, you may use pip to grab the latest version of fabric as shown:

# pip install fabric

How to Use Fabric to Automate Linux Administration Tasks

So lets get started on how you can use Fabric. During the installation process, a Python script called fab was added to a directory in your path. The fab script does all the work when using fabric.

Executing commands on the local Linux machine

By convention, you need to start by creating a Python file called fabfile.py using your favorite editor. Remember you can give this file a different name as you wish but you will need to specify the file path as follows:

# fabric --fabfile /path/to/the/file.py

Fabric uses fabfile.py to execute tasks. The fabfile should be in the same directory where you run the Fabric tool.

Example 1: Let’s create a basic Hello World first.

# vi fabfile.py

Add these lines of code in the file.

def hello():
       print('Hello world, Tecmint community')

Save the file and run the command below.

# fab hello

Fabric Tool Usage

Fabric Tool Usage

Let us now look at an example of a fabfile.py to execute the uptime command on the local machine.

Example 2: Open a new fabfile.py file as follows:

# vi fabfile.py

And paste the following lines of code in the file.

#!  /usr/bin/env python
from fabric.api import local
def uptime():
  local('uptime')

Then save the file and run the following command:

# fab uptime

Fabric: Check System Uptime

Fabric: Check System Uptime

Executing commands on remote Linux machines to automate tasks

The Fabric API uses a configuration dictionary which is Python’s equivalent of an associative array known as env, which stores values that control what Fabric does.

The env.hosts is a list of servers on which you want run Fabric tasks. If your network is 192.168.0.0 and wish to manage host 192.168.0.2 and 192.168.0.6 with your fabfile, you could configure the env.hosts as follows:

#!/usr/bin/env python
from  fabric.api import env
env.hosts = [ '192.168.0.2', '192.168.0.6' ]

The above line of code only specify the hosts on which you will run Fabric tasks but do nothing more. Therefore you can define some tasks, Fabric provides a set of functions which you can use to interact with your remote machines.

Although there are many functions, the most commonly used are:

  1. run – which runs a shell command on a remote machine.
  2. local – which runs command on the local machine.
  3. sudo – which runs a shell command on a remote machine, with root privileges.
  4. Get – which downloads one or more files from a remote machine.
  5. Put – which uploads one or more files to a remote machine.

Example 3: To echo a message on multiple machines create a fabfile.py such as the one below.

#!/usr/bin/env python
from fabric.api import env, run
env.hosts = ['192.168.0.2','192.168.0.6']
def echo():
      run("echo -n 'Hello, you are tuned to Tecmint ' ")

To execute the tasks, run the following command:

# fab echo

Fabric: Automate Linux Tasks on Remote Linux

Fabric: Automate Linux Tasks on Remote Linux

Example 4: You can improve the fabfile.py which you created earlier on to execute the uptime command on the local machine, so that it runs the uptime command and also checks disk usage using the df command on multiple machines as follows:

#!/usr/bin/env python
from fabric.api import env, run
env.hosts = ['192.168.0.2','192.168.0.6']
def uptime():
      run('uptime')
def disk_space():
     run('df -h')

Save the file and run the following command:

# fab uptime
# fab disk_space

Fabric: Automate Tasks on Multiple Linux Systems

Fabric: Automate Tasks on Multiple Linux Systems

Automatically Deploy LAMP Stack on Remote Linux Server

Example 4: Let us look at an example to deploy LAMP (Linux, Apache, MySQL/MariaDB and PHP) server on a remote Linux server.

We shall write a function that will allow LAMP to be installed remotely using root privileges.

For RHEL/CentOS and Fedora
#!/usr/bin/env python
from fabric.api import env, run
env.hosts = ['192.168.0.2','192.168.0.6']
def deploy_lamp():
  run ("yum install -y httpd mariadb-server php php-mysql")
For Debian/Ubuntu and Linux Mint
#!/usr/bin/env python
from fabric.api import env, run
env.hosts = ['192.168.0.2','192.168.0.6']
def deploy_lamp():
  sudo("apt-get install -q apache2 mysql-server libapache2-mod-php5 php5-mysql")

Save the file and run the following command:

# fab deploy_lamp

Note: Due to large output, it’s not possible for us to create a screencast (animated gif) for this example.

Now you can able to automate Linux server management tasks using Fabric and its features and examples given above…

Some Useful Options to Use with Fabric

  1. You can run fab –help to view help information and a long list of available command line options.
  2. An important option is –fabfile=PATH that helps you to specify a different python module file to import other then fabfile.py.
  3. To specify a username to use when connecting to remote hosts, use the –user=USER option.
  4. To use password for authentication and/or sudo, use the –password=PASSWORD option.
  5. To print detailed info about command NAME, use –display=NAME option.
  6. To view formats use –list option, choices: short, normal, nested, use the –list-format=FORMAT option.
  7. To print list of possible commands and exit, include the –list option.
  8. You can specify the location of config file to use by using the –config=PATH option.
  9. To display a colored error output, use –colorize-errors.
  10. To view the program’s version number and exit, use the –version option.

Summary

Fabric is a powerful tool and is well documented and provides easy usage for newbies. You can read the full documentation to get more understanding of it. If you have any information to add or incase of any errors you encounter during installation and usage, you can leave a comment and we shall find ways to fix them.

Reference: Fabric documentation

Source

4 Good Open Source Log Monitoring and Management Tools for Linux

Linux Log Monitoring and Management Tools

4 Linux Log Monitoring and Management Tools

When an operating system such as Linux is running, there are many events happening and processes that run in the background to enable efficient and reliable use of system resources. These events may happen in system software for example the init process or user applications such as Apache, MySQL, FTP and many more.

In order to understand the state of the system and different applications and how they are working, System Administrators have to keep reviewing logfiles on daily basis in production environments.

You can imagine having to review logfiles from several system areas and applications, that is where logging systems come in handy. They help to monitor, review, analyzer and even generate reports from different logfiles as configured by a System Administrator.

  1. How to Monitor System Usages, Outages and Troubleshoot Linux Systems
  2. How to Manage Server Logs (Configure and Rotate) in Linux
  3. How to Monitor Linux Server Logs Real Time with Log.io Tool

In this article, we shall look at the top four most used open source logging management systems in Linux today, the standard logging protocol in most if not all distributions today is syslog.

1. Graylog 2

This is a fully integrated open source log management system that enables System Administrators to collect, index, and analyze both framed, systematic and disorganized data from just about any available source systems.

Graylog Linux Log Management Tool

Graylog Linux Log Management Tool

This logging system is highly pluggable and enables centralized log management from many systems. It is integrated with external components such as MongoDB for metadata and Elasticsearch used to keep logfiles and enable text search.

Graylog 2 has the following features:

  1. Ready for enterprise level production
  2. Includes a dashboard and an alerting system
  3. Can work on data from any log source
  4. Enables real time log processing
  5. Enables parsing of unstructured data
  6. Extensible and highly customizable
  7. Offers an operational data hub

For more information view the Graylog 2 website.

2. Logcheck

Logcheck is an open source log management system that helps System Administrators automatically identify unknown problems and security violations in logfiles. It periodically sends messages about the analysis results to a configured e-mail address.

Logcheck Scans System Logs

Logcheck Scans System Logs

Logcheck is designed as a cronjob on an hourly basis and on every system reboot by default. Three are different levels of logfile filtering are developed in this logging system which include:

  1. Paranoid: is intended for high-security systems that are running very few services as possible.
  2. Server: this is the default filtering level for logcheck and its rules are defined for many different system daemons. The rules defined under paranoid level are also included under this level.
  3. Workstation: it is for sheltered systems and helps to filter most of the messages. It also includes rules defined under paranoid and server levels.

Logcheck is also capable of sorting messages to be reported into three possible layers which include, security events, system events and system attack alerts. A System Administrator can choose the level of details to which system events are reported depending on the filtering level though this does not affect security events and system attack alerts.

Read more about it at the Development team’s logcheck website

3. Logwatch

Logwatch is a Linux/Unix system logfile analyzer and reporter that can be easily customized and it also allows a System Administrator to add additional plugins, create custom scripts that serve specific logging needs.

Logwatch Linux Log Analyzer

Logwatch Linux Log Analyzer

What it does is to review system logfiles for a given period to time and then generates a report based on system areas that you wish to collect information from. One feature of this logging system is that it is easy to use for new System Administrator and it also works on most Linux distributions available and many Unix systems.

Visit the project homepage of Logwatch

4. Logstash

Logstash is also an open source data collection and logging system available on Linux, which capable of real-time pipelining, which was originally designed for data collection but its new versions now integrated several other capabilities such as using a wide range of input data formats, filtering and also output plugins and formats.

LogStash

LogStash

It can effectively unify data from various log source systems and normalize the data into targets of a System Administrators’ choice. Logstash also allows System Administrators to cleanse, compare and standardize all their logging data for distinct advanced analytics and also create visualization use cases as well.

Read more about it at Logstash website.

Summary

That is it for now and remember that these are not all the available log management systems that you can use on Linux. We shall keep reviewing and updating the list in future articles, I hope you find this article useful and you can let us know of other important logging tools or systems out there by leaving a comment.

Source

Install GIT to Create and Share Your Own Projects on GITHub Repository

If you have spent any amount of time recently in the Linux world, then chances are that you have heard of GITGIT is a distributed version control system that was created by Linus Torvalds, the mastermind of Linux itself. It was designed to be a superior version control system to those that were readily available, the two most common of these being CVS and Subversion (SVN).

Whereas CVS and SVN use the Client/Server model for their systems, GIT operates a little differently. Instead of downloading a project, making changes, and uploading it back to the server, GIT makes the local machine act as a server.

Install GitHub in Centos

Install GitHub Repository

In other words, you download the project with everything, the source files, version changes, and individual file changes right to the local machine, when you check-in, check-out, and perform all of the other version control activities. Once you are finished, you then merge the project back to the repository.

This model provides many advantages, the most obvious being that if you are disconnected from your central server for whatever reason, you still have access to your project.

In this tutorial, we are going to install GITcreate a repository, and upload that repository to GitHub. You will need to go to http://www.github.com and create an account and repository if you wish to upload your project there.

How to Install GIT in Linux

On Debian/Ubuntu/Linux Mint, if it is not already installed, you can install it using apt-get command.

$ sudo apt-get install git

On Red Hat/CentOS/Fedora/ systems, you can install it using yum command.

$ yum install git

If you prefer to install and compile it form source, you can follow below commands.

$ wget http://kernel.org/pub/software/scm/git/git-1.8.4.tar.bz2
$ tar xvjf git-1.8.4.tar/bz2
$ cd git-*
$ ./configure
$ make
$ make install

How to Create Git Project

Now that GIT is installed, let’s set it up. In your home directory, there will be a file called “~/.gitconfig“. This holds all of your repository info. Let’s give it your name and your email:

$ git config –-global user.name “Your Name”
$ git config –-global user.email youremail@mailsite.com

Now we are going to create our first repository. You can make any directory a GIT repository. cd to one that has some source files and do the following:

$ cd /home/rk/python-web-scraper
$ git init

In that directory, a new hidden directory has been created called “.git“. This directory is where GIT stores all of its information about your project, and any changes that you make to it. If at any time you no longer wish for any directory to be a part of a GIT repository, you just delete this directory in the typical fashion:

$ rm –rf .git

Now that we have a repository created, we need to add some files to the project. You can add any type of file to your GIT project, but for now, let’s generate a “README.md” file that gives a little info about your project (also shows up in the README block at GitHub) and add some source files.

$ vi README.md

Enter in info about your project, save and exit.

$ git add README.md
$ git add *.py

With the two above commands, we have added the “README.md” file to your GIT project, and then we added all Python source (*.py) files in the current directory. Worth noting is that 99 times out of 100 when you are working on a GIT project, you are going to be adding all of the files in the directory. You can do so like this:

$ git add .

Now we are ready to commit the project to a stage, meaning that this is a marker point in the project. You do this with the git commit “–m” command where the “–m” option specifies a message you want to give it. Since this is out first commit of out project, we will enter in “first commit” as our “–m” string.

$ git commit –m ‘first commit’

How to Upload Project to GitHub Repository

We are now ready to push your project up to GitHub. You will need the login information that you made when you created your account. We are going to take this information and pass it to GIT so it knows where to go. Obviously, you’ll want to replace ‘user’ and ‘repo.git’ with the proper values.

$ git remote set-url origin git@github.com:user/repo.git

Now, it is time to push, ie copy from your repository to the remote repository. The git push command takes two arguments: the “remotename” and the “branchname”. These two names are usually origin and master, respectively:

$ git push origin master

That’s it! Now you can go the https://github.com/username/repo link to see your own git project.

Source

11 Best Graphical Git Clients and Git Repository Viewers for Linux

Git is a free and open source distributed version control system for software development and several other version control tasks. It is designed to cope with everything from small to very large projects based on speed, efficiency and data integrity.

Linux users can manage Git primarily from the command line, however, there are several graphical user interface (GUIGit clients that facilitate efficient and reliable usage of Git on a Linux desktop and offer most, if not all of the command line operations.

Therefore, below is a list of some of the best Git front-ends with a GUI for Linux desktop users.

Suggested Read: Install GIT to Create and Share Your Own Projects on GITHub Repository

That said, let’s proceed to listing them.

1. GitKraken

GitKraken is a cross-platform, elegant and highly efficient Git client for Linux. It works on Unix-like systems such as Linux and Mac OS X, and Windows as well. Its designed to boost a Git user’s productivity through features such as:

  1. Visual interaction and hints
  2. 100% standalone
  3. Supports multiple profiles
  4. Supports single-click undo and redo functions
  5. Built-in merge tool
  6. A fast and intuitive search tool
  7. Easily adapts to a user’s workspace and also supports submodules and Gitflow
  8. Integrates with a user’s GitHub or Bitbucket account
  9. Keyboard shortcuts plus lots more.

GitKraken Git Client for Linux

GitKraken Git Client for Linux

Visit Homepagehttps://www.gitkraken.com/

2. Git-cola

Git-cola is a powerful, configurable Git client for Linux that offers users a sleek GUI. Its written in Python and released under the GPL license.

The Git-cola interface comprises of several collaborative tools that can be hidden and rearranged according to a users wish. It also offers users many useful keyboard shortcuts.

Its additional features include:

  1. Multiple sub-commands
  2. Custom window settings
  3. Configurable and environment variables
  4. Language settings
  5. Supports custom GUI settings

Git-cola - Git Client for Linux

Git-cola – Git Client for Linux

Visit Homepagehttp://git-cola.github.io/

3. SmartGit

SmartGit is a also a cross-platform, powerful, popular GUI Git client for Linux, Mac OS X and Windows. Referred to as Git for professionals, it enables users master daily Git challenges and boosts their productivity through efficient workflows.

Users can utilize it with their own repos or other hosting providers. It ships in with the following illustrious features:

  1. Supports Git pull requests and comments
  2. Supports SVN repositories
  3. Comes with Git-flow, SSH-client and file compare/merge tools
  4. Integrates strongly with GitHub, BitBucket and Atlassian Stash

SmartGit - Git Client for Linux

SmartGit – Git Client for Linux

Visit Homepagehttp://www.syntevo.com/smartgit/

4. Giggle

Giggle is a free GUI client for Git content tracker that uses GTK+ toolkit and only runs on Linux. It was developed as a result of a hackathon Imendio, in January 2007. It has now been integrated into the GNOME infrastructure. Its basically a Git viewer, allows users to browse their repository history.

Giggle - Git Client for Linux

Giggle – Git Client for Linux

Visit Homepagehttps://wiki.gnome.org/giggle

5. Gitg

Gitg is a GNOME GUI front-end to view Git repositories. Its comprises of features such as – enables GNOME shell integration through app menu, enables users to view recently used repositories, browse repository history.

It also offers a files view, staging area to compose commits, and commit staged changes, open repository, clone repository and user information.

Gitg - Client to View Git Repositories

Gitg – Client to View Git Repositories

Visit Homepagehttps://wiki.gnome.org/Apps/Gitg

6. Git GUI

Git GUI is a cross-platform and portable Tcl/Tk based GUI front-end for Git that works on Linux, Windows and Mac OS X. It mainly focuses on commit generation by enabling users to make changes to their repository by generating new commits, amending existing ones, building branches. Additionally, it also allows them to perform local merges, and fetch/push to remote repositories.

GitGui - Client for Git

GitGui – Client for Git

Visit Homepagehttps://www.kernel.org/pub/software/scm/git/docs/git-gui.html

7. Qgit

QGit is a simple, fast and straight forward yet powerful GUI Git client based written in Qt/C++. It offers users a nice UI and allows them to browse revisions history, view patch content and changed files graphically by following distinct development branches.

A few of its features are listed below:

  1. View, revision, diffs, file history, file annotations and archive trees
  2. Supports commit changes
  3. Enables users to apply or format patch series from selected commits
  4. Also supports drag and drop functions for commits between two QGit instances
  5. Associates commands sequences, scripts and anything executable to a custom action
  6. It implements a GUI for many common StGit commands such as push/pop and apply/format patches and many more

Qgit - Git Client for Linux

Qgit – Git Client for Linux

Visit Homepagehttp://digilander.libero.it/mcostalba/

8. GitForce

GitForce is also an easy-to-use and intuitive GUI front-end for Git that runs on Linux and Windows, plus any OS with Mono support. It provides users some of the most common Git operations and it is powerful enough to be used exclusively without involving any other command line Git tool.

GitForce - Git Client for Linux

GitForce – Git Client for Linux

Visit Homepagehttps://sites.google.com/site/gitforcetool/home

9. Egit

Egit is a Git plugin for Eclipse IDE, its an Eclipse Team provider for Git. The project is aimed at implementing Eclipse tooling on top of the JQit java implementation of Git. Eqit comprises of features such as a repository explorer, new files, commit window and history view.

Egit - Git Plugin for Eclipse IDE

Egit – Git Plugin for Eclipse IDE

Visit Homepagehttp://www.eclipse.org/egit/

10. GitEye

GitEye is a simple and intuitive GUI client for Git that integrates easily with planning, tracking, code reviewing and build tools such as TeamForge, GitGub, Jira, Bugzilla and lots more. It is flexible with powerful visualization and history management features.

Visit Homepagehttp://www.collab.net/products/giteye

11. GITK (Generalized Interface Toolkit)

GITK is a multi-layered GUI front-end for Git that enables users to work effectively with software in any situation. Its main aim is to vividly enrich adaptivity of software, it runs on a multi-layered architecture where interface functionality is adequately separated from look and feel.

Importantly, GITK lets each use choose the kind and style of UI that fits his/her needs depending on ability, preferences and current environment.

Visit Homepagehttp://gitk.sourceforge.net/

Summary

In this post, we reviewed a few of the best known Git clients with a GUI for Linux, however, there could be one or two missing in the list above, therefore, get back to us for any suggestions or feedback through the comment section below. You can as well tell us your best Git client with a GUI and why you prefer using it.

Source

WP2Social Auto Publish Powered By : XYZScripts.com