ONLYOFFICE – A Complete Web-based Office and Productivity Suite to Increase Your Team Efficiency

ONLYOFFICE is an office and productivity suite developed to provide an open source alternative to Microsoft Office 365 and Google Apps. Three main components are connected to build a whole corporate platform:

ONLYOFFICE Document Server offers text, spreadsheet and presentation editors compatible with MS Office and OpenDocument file formats, among others.

It works within a browser and allows you to create and co-edit documents choosing one of the co-editing modes: Fast (shows the changes made by co-editors in real-time) or Strict (hides other user changes until you save your own changes and accept the changes made by others). Commenting, tracking changes and built-in chat are also available.

ONLYOFFICE Community Server comes with mail client, document management tools, projects, CRM, calendar, and community with blogs, forums, and wiki.

ONLYOFFICE Mail Server, developed on the base of the iRedMail, is used to create and manage mailboxes using your own domain name.

ONLYOFFICE has recently updated its two main components: Document Server v. 4.0.0 and Community Server v.8.9.0 adding some features listed below:

ONLYOFFICE Document Server v.4.0.0

  1. fast real-time co-editing like in Google Docs
  2. commenting
  3. integrated chat
  4. reviewing and tracking changes
  5. version history
  6. text art for text, spreadsheets and presentations
  7. adding, removing and modifying the available styles.

ONLYOFFICE Community Server v.8.9.0

  1. review access rights for documents
  2. mail and calendar integration allowing to:
    1. invite any Internet user to your event and notify them about the changes
    2. get invitations from other calendars and accept or reject them.
  3. address book for personal contacts
  4. mail auto-reply

Installing ONLYOFFICE in Linux

You can deploy the latest stable version of ONLYOFFICE using the official Docker script. It allows you to install the whole system on a single machine avoiding the dependency errors.

In general, each ONLYOFFICE component requires some dependencies to be installed on your Linux machine. With Docker, only one dependency is needed – Docker v.1.10 or later.

There are also DEB and RPM packages available for ONLYOFFICE at: http://www.onlyoffice.com/download.aspx

Before you go ahead, please check if your machine meets the ONLYOFFICE hardware and software requirements:

ONLYOFFICE Hardware Requirements

  1. CPU: dual-core 2 GHz or better
  2. RAM: 6 GB or more
  3. HDD at least 40 GB of free space
  4. Swap at least 8 GB

Important: Please note that the size requirement for a server to run ONLYOFFICE depends on the components you need and how much documents and mails you plan to store.

6 GB of RAM is necessary for the efficient work of the whole system: Document ServerMail Server and Community Server.

To install it without mail server, 2 GB of RAM will be enough, given the necessary amount of swap is available.

ONLYOFFICE Software Requirements

  1. OS: amd64 Linux distributive with kernel version 3.10 or later
  2. Docker: version 1.10 or later (to install it, refer to the official Docker documentation)

Let’s proceed further to install ONLYOFFICE in Linux distributions.

Step 1. Download ONLYOFFICE Docker script file.

# wget http://download.onlyoffice.com/install/opensource-install.sh

Step 2. Run the complete ONLYOFFICE installation.

Important: Please note that to perform this action you must be logged in with root rights.

# bash opensource-install.sh -md "yourdomain.com"

Where yourdomain.com is your own domain used for Mail Server.

To install ONLYOFFICE without mail server, run the following command:

# bash opensource-install.sh -ims false

Getting started with ONLYOFFICE

Step 3. Enter the IP address of your server to your browser to open ONLYOFFICE. The portal start up and initialization processes will start. Once completed, the Wizard page will open:

ONLYOFFICE Installation Wizard

ONLYOFFICE Installation Wizard

Step 4. Configure your web office by adding your email, password and its confirmation to use them next time to access ONLYOFFICE. Select the language and time zone (you will be able to change it later in Settings section. Click Continue.

Configure ONLYOFFICE Modules

Configure ONLYOFFICE Modules

Step 5. Invite your team member by going to the People module using the corresponding icon. Click the Create New button in the left upper corner, select the User option from the drop-down list. Fill in the required fields and click the Save button.

Add New Users to ONLYOFFICE

Add New Users to ONLYOFFICE

The invitation message will be sent to your team member. Following the link provided in this email, he/she will be able to join your web office.

Conclusion

ONLYOFFICE is a feature-rich productivity suite that helps to organize every step of your teamwork without switching between different applications.

The Docker script made it easy to deploy and run your web office on any Linux machine allowing to avoid common dependency errors and installation issues.

Source

How to Install and Configure Ansible on Ubuntu 18.04

Introduction

Configuration management systems are designed to make controlling large numbers of servers easy for administrators and operations teams. They allow you to control many different systems in an automated way from one central location.

While there are many popular configuration management systems available for Linux systems, such as Chef and Puppet, these are often more complex than many people want or need. Ansible is a great alternative to these options because it requires a much smaller overhead to get started.

In this guide, we will discuss how to install Ansible on an Ubuntu 18.04 server and go over some basics of how to use the software.

How Does Ansible Work?

Ansible works by configuring client machines from a computer that has the Ansible components installed and configured.

It communicates over normal SSH channels to retrieve information from remote machines, issue commands, and copy files. Because of this, an Ansible system does not require any additional software to be installed on the client computers.

This is one way that Ansible simplifies the administration of servers. Any server that has an SSH port exposed can be brought under Ansible’s configuration umbrella, regardless of what stage it is at in its life cycle. This means that any computer that you can administer through SSH, you can also administer through Ansible.

Ansible takes on a modular approach, making it easy to extend to use the functionalities of the main system to deal with specific scenarios. Modules can be written in any language and communicate in standard JSON.

Configuration files are mainly written in the YAML data serialization format due to its expressive nature and its similarity to popular markup languages. Ansible can interact with hosts either through command line tools or its configuration scripts, which are known as Playbooks.

Prerequisites

To follow this tutorial, you will need:

  • Two or more Ubuntu 18.04 servers. One of these will be used as your Ansible server, while the remainder will be used as your Ansible hosts. Each should have a non-root user with sudo privileges and a basic firewall configured. You can set this up by following our Initial Server Setup Guide for Ubuntu 18.04. Please note that the examples throughout this guide specify three Ansible hosts, but the commands and configurations shown can be adjusted for any number of clients.
  • SSH keys generated for the non-root user on your Ansible server. To do this, follow Step 1 of our guide on How to Set Up SSH Keys on Ubuntu 18.04. For the purposes of this tutorial, you can save the key pair to the default location (~/.ssh/id_rsa) and you do not need to password-protect it.

Step 1 — Installing Ansible

To begin using Ansible as a means of managing your various servers, you need to install the Ansible software on at least one machine.

To get the latest version of Ansible for Ubuntu, you can add the project’s PPA (personal package archive) to your system. Before doing this, though, you should first ensure that you have the software-properties-common package installed. This software will make it easier to manage this and other independent software repositories:

  • sudo apt update
  • sudo apt install software-properties-common

Then add the Ansible PPA by typing the following command:

  • sudo apt-add-repository ppa:ansible/ansible

Press ENTER to accept the PPA addition.

Next, refresh your system’s package index once again so that it is aware of the packages available in the PPA:

  • sudo apt update

Following this update, you can install the Ansible software:

  • sudo apt install ansible

Your Ansible server now has all of the software required to administer your hosts.

Step 2 — Configuring SSH Access to the Ansible Hosts

As mentioned previously, Ansible primarily communicates with client computers through SSH. While it certainly has the ability to handle password-based SSH authentication, using SSH keys can help to keep things simple.

On your Ansible server, use the cat command to print the contents of your non-root user’s SSH public key file to the terminal’s output:

  • cat ~/.ssh/id_rsa.pub

Copy the resulting output to your clipboard, then open a new terminal and connect to one of your Ansible hosts using SSH:

  • ssh sammy@ansible_host_ip

Switch to the client machine’s root user:

  • su –

As the root user, open the authorized_keys within the ~/.ssh directory:

  • nano ~/.ssh/authorized_keys

In the file, paste your Ansible server user’s SSH key, then save the file and close the editor (press CTRL + XY, then ENTER). Then run the exit command to return to the host’s non-root user:

  • exit

Lastly, because Ansible uses a python interpreter located at /usr/bin/python to run its modules, you’ll need to install Python 2 on the host in order for Ansible to communicate with it. Run the following commands to update the host’s package index and install the python package:

  • sudo apt update
  • sudo apt install python

Following this, you can run the exit command once again to close the connection to the client:

  • exit

Repeat this process for each server you intend to control with your Ansible server. Next, we’ll configure the Ansible server to connect to these hosts using Ansible’s hosts file.

Step 3 — Setting Up Ansible Hosts

Ansible keeps track of all of the servers that it knows about through a hosts file. We need to set up this file first before we can begin to communicate with our other computers.

Open the file with sudo privileges, like this:

  • sudo nano /etc/ansible/hosts

Inside the file, you will see a number of example configurations that have been commented out (with a #preceding each line). These examples won’t actually work for us since the hosts listed in each one are made up. We will, however, keep these examples in the file to help us with configuration if we want to implement more complex scenarios in the future.

The hosts file is fairly flexible and can be configured in a few different ways. The syntax we are going to use, though, looks like this:

[group_name]
alias ansible_host=your_server_ip

Note: With the release of Ansible version 2.0, the configuration variable ansible_host replaced the original variable, ansible_ssh_host. If you’re using an older version of Ansible, you should use the older, longer variable.

In this example, group_name is an organizational tag that lets you refer to any servers listed under it with one word, while alias is just a name to refer to one specific server.

So, in our scenario, we are imagining that we have three servers we are going to control with Ansible. At this point, these servers are accessible from the Ansible server by typing:

  • ssh root@ansible_host_ip

You should not be prompted for a password if you have set this up correctly. For the purpose of demonstration, we will assume that our hosts’ IP addresses are 203.0.113.1203.0.113.2, and 203.0.113.3. We will set this up so that we can refer to these individually as host1host2, and host3, or as a group with the name servers.

This is the block that we should add to our hosts file to accomplish this:

/etc/ansible/hosts
[servers]
host1 ansible_host=203.0.113.1
host2 ansible_host=203.0.113.2
host3 ansible_host=203.0.113.3

Hosts can be in multiple groups and groups can configure parameters for all of their members. Let’s try this out now.

With our current settings, if we tried to connect to any of these hosts with Ansible, the command would fail (assuming you are not operating as the root user). This is because your SSH key is embedded for the rootuser on the remote systems and Ansible will by default try to connect as your current user. A connection attempt will get this error:

Output
host1 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh.",
    "unreachable": true
}

On the Ansible server, we’re using a user called sammy. Ansible will try to connect to each host with ssh sammy@server. This will not work if the sammy user is not on the remote system as well.

We can create a file that tells all of the servers in the “servers” group to connect as the root user.

To do this, we will create a directory in the Ansible configuration structure called group_vars. Within this folder, we can create YAML-formatted files for each group we want to configure:

  • sudo mkdir /etc/ansible/group_vars
  • sudo nano /etc/ansible/group_vars/servers

YAML files start with “—“, so make sure you don’t forget that part.

/etc/ansible/group_vars/servers
---
ansible_user: root

Note: Similar to the ansible_host variable, ansible_user replaced the variable ansible_ssh_user with the release of version 2.0. If you’re using an older version of Ansible than 2.0, be sure to use the older, longer variable.

Save and close this file when you are finished.

If you want to specify configuration details for every server, regardless of group association, you can put those details in a file at /etc/ansible/group_vars/all. Individual hosts can be configured by creating files named after their alias under a directory at /etc/ansible/host_vars.

Step 4 — Using Simple Ansible Commands

Now that we have our hosts set up and enough configuration details to allow us to successfully connect to our hosts, we can try out our very first command.

Ping all of the servers you configured by typing:

  • ansible -m ping all
Ping output
host1 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

host3 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

host2 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

This is a basic test to make sure that Ansible has a connection to all of its hosts.

The all means all hosts. We could just as easily specify a group:

  • ansible -m ping servers

We could also specify an individual host:

  • ansible -m ping host1

We can specify multiple hosts by separating them with colons:

  • ansible -m ping host1:host2

The -m ping portion of the command is an instruction to Ansible to use the “ping” module. These are basically commands that you can run on your remote hosts. The ping module operates in many ways like the normal ping utility in Linux, but instead it checks for Ansible connectivity.

The ping module doesn’t really take any arguments, but we can try another command to see how that works. We pass arguments into a script by typing -a.

The “shell” module lets us send a terminal command to the remote host and retrieve the results. For instance, to find out the memory usage on our host1 machine, we could use:

  • ansible -m shell -a ‘free -m’ host1
Shell output
host1 | SUCCESS | rc=0 >>
             total       used       free     shared    buffers     cached
Mem:          3954        227       3726          0         14         93
-/+ buffers/cache:        119       3834
Swap:            0          0          0

With that, your Ansible server configured and you can successfully communicate and control your hosts.

Conclusion

In this tutorial, we have configured Ansible and verified that it can communicate with each host. We have also used the ansible command to execute simple tasks remotely.

Although this is useful, we have not covered the most powerful feature of Ansible in this article: Playbooks. Ansible Playbooks are a powerful, simple way to manage server configurations and multi-machine deployments. For an introduction to Playbooks, see this guide. Additionally, we encourage you to check out the official Ansible documentation to learn more about the tool.

Source

How to Install Latest Nvidia Drivers on Ubuntu

With the recent advancements in Linux desktop distributions, gaming on Linux is coming to life. Linux users are beginning to enjoy gaming like Windows or Mac OSX users, with amazing performance.

Nvidia makes top-rated gaming graphics cards. However, for a long time, updating Nvidia drivers on Linux desktops was not so easy. Luckily, now the Proprietary GPU Drivers PPA packages updated nvidia-graphics-drivers for Ubuntu ready for installation.

Although this PPA is currently in testing, you can get fresh drivers from upstream, currently shipping Nvidia from it. If you are using Nvidia graphics card, this article will show you how to install the latest Nvidia drivers on Ubuntu and its derivatives such as Linux Mint.

How to Install Nvidia Drivers in Ubuntu

First start by adding the Proprietary GPU Drivers PPA to your system package sources and update your system package cache using apt command.

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update

Then install the latest stable nvidia graphics (which is nvidia-387 at the time of writing this article) using the following command.

$ sudo apt install nvidia-387

Alternatively, open Software & Updates under System Settings and go to Additional Drivers tab, select the required driver version and click “Apply Changes”.

Next, reboot your computer for the new driver to start working. Then use the lsmod command to check your installation status with the following command.

It will list all currently loaded kernel modules in Linux, then filter only nvidia using grep command.

$ lsmod | grep nvidia 

Some times updates do not work well as expected. If you face any issues with the latest drivers installation such as black screen on startup, you can remove it as follows.

$ sudo apt-get purge nvidia*

If you want to completely remove graphics-drivers PPA as well, run the following command to remove PPA.

$ sudo apt-add-repository --remove ppa:graphics-drivers/ppa

You might also like to read these following related articles on Gaming.

  1. 5 Best Linux Gaming Distributions That You Should Give a Try
  2. 12 Amazing Terminal Based Games for Linux Enthusiasts

That’s all! You can ask questions or share any useful additional information via the feedback form below.

Source

How to Open, Extract and Create RAR Files in Linux

RAR is a most popular tool for creating and extracting compressed archive (.rar) files. When we download an archive file from the web, we required a rar tool to extract them.

RAR is available freely under Windows operating systems to handle compressed files, but unfortunately, rar tool doesn’t pre-installed under Linux systems.

This article explains how to install unrar and rar command-line tools using official binary tar file under Linux systems to open, extract, uncompress or unrar an archive file.

Step 1: How to Install Unrar in Linux

On Debian and Ubuntu based distributions, you can easily install unrar package using the apt-get or apt program as shown.

$ sudo apt-get install unrar
Or
$ sudo apt install unrar

If you are using Fedora distribution, you can use the dnf command to install it.

$ sudp dnf install unrar

If you are using a CentOS / RHEL distribution, you need to download the latest unrar/rar file and install it using following commands.

--------------- On 64-bit --------------- 
# cd /tmp
# wget https://www.rarlab.com/rar/rarlinux-x64-5.6.0.tar.gz
# tar -zxvf rarlinux-x64-5.6.0.tar.gz
# cd rar
# sudo cp -v rar unrar /usr/local/bin/

--------------- On 32-bit --------------- 
# cd /tmp
# wget https://www.rarlab.com/rar/rarlinux-5.6.0.tar.gz
# tar -zxvf rarlinux-5.6.0.tar.gz
# cd rar
# sudo cp -v rar unrar /usr/local/bin/

Step 2: How to Open/Extract a RAR File in Linux

To open/extract a RAR file in current working directory, just use the following command with unrar e option.

# unrar e tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Extracting from tecmint.rar

Extracting  index.php                                                 OK
Extracting  index.html                                                OK
Extracting  xyz.txt                                                   OK
Extracting  abc.txt                                                   OK
All OK

To open/extract a RAR file in specific path or destination directory, just use the unrar e option, it will extract all the files in specified destination directory.

# unrar e tecmint.rar /home/

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Extracting from tecmint.rar

Extracting  /home/index.php                                           OK
Extracting  /home/index.html                                          OK
Extracting  /home/xyz.txt                                             OK
Extracting  /home/abc.txt                                             OK
All OK

To open/extract a RAR file with their original directory structure. just issue below command with unrar x option. It will extract according their folder structure see below output of the command.

# unrar x tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Extracting from tecmint.rar

Creating    tecmint                                                   OK
Extracting  tecmint/index.php                                         OK
Extracting  tecmint/index.html                                        OK
Extracting  tecmint/xyz.txt                                           OK
Extracting  tecmint/abc.txt                                           OK
Creating    default                                                   OK
Extracting  default/index.php                                         OK
Extracting  default/index.html                                        OK
Creating    include                                                   OK
Extracting  include/abc.txt                                           OK
Creating    php                                                       OK
Extracting  php/xyz.txt                                               OK
All OK

Step 3: How to List a RAR File in Linux

To list a files inside a archive file use unrar l option. It will display the list of files with their sizesdatetime and permissions.

unrar l tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Archive tecmint.rar

 Name             Size   Packed Ratio  Date   Time     Attr      CRC   Meth Ver
-------------------------------------------------------------------------------
 index.php           0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 index.html          0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 xyz.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 abc.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 index.php           0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
 index.html          0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
 abc.txt             0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
 xyz.txt             0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
-------------------------------------------------------------------------------
    8                0       64   0%

Step 4: How to Test a RAR File in Linux

To test an integrity of a archive file, use option unrar t. The below command will perform a complete integrity check for each file and displays the status of the file.

unrar t tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Testing archive tecmint.rar

Testing     tecmint/index.php                                         OK
Testing     tecmint/index.html                                        OK
Testing     tecmint/xyz.txt                                           OK
Testing     tecmint/abc.txt                                           OK
Testing     default/index.php                                         OK
Testing     default/index.html                                        OK
Testing     include/abc.txt                                           OK
Testing     php/xyz.txt                                               OK
All OK

The unrar command is used to extract, list or test archive files only. It has no any option for creating RAR files under Linux. So, here we need to install RAR command-line utility to create archive files.

Step 5: How to Install Rar in Linux

To install RAR command option in Linux, just execute following command.

# sudo apt-get install rar
# sudo dnf install rar
# yum install rar
Sample Output
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Dependencies Resolved
=========================================================================================
 Package			Arch			Version				Repository			Size
=========================================================================================
Installing:
 rar				i386            3.8.0-1.el5.rf      rpmforge			264 k

Transaction Summary
=========================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 264 k
Is this ok [y/N]: y
Downloading Packages:
rar-3.8.0-1.el5.rf.i386.rpm										| 264 kB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : rar                                          1/1

Installed:
  rar.i386 0:3.8.0-1.el5.rf

Complete!

Step 6: How to Create Rar File in Linux

To create a archive(RAR) file in Linux, run the following command with rar a option. It will create archive file for a tecmint directory.

rar a tecmint.rar tecmint

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Evaluation copy. Please register.

Creating archive tecmint.rar

Adding    tecmint/index.php                                           OK
Adding    tecmint/index.html                                          OK
Adding    tecmint/xyz.txt                                             OK
Adding    tecmint/abc.txt                                             OK
Adding    tecmint                                                     OK
Done

Step 7: How to Delete files from Archive

To delete a file from a archive file, run the command.

rar d filename.rar

Step 8: How to Recover Archives

To recover or fix a archive file or files, run the command with option rar r.

rar r filename.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Building fixed.tecmint.rar
Scanning...
Data recovery record not found
Reconstructing tecmint.rar
Building rebuilt.tecmint.rar
Found  tecmint\index.php
Found  tecmint\index.html
Found  tecmint\xyz.txt
Found  tecmint\abc.txt
Found  tecmint
Done

Step 9: How to Update Archives

To update or add files to existing archive file, use the following command with option rar u.

rar u tecmint.rar tecmint.sql

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Evaluation copy. Please register.

Updating archive tecmint.rar

Adding    tecmint.sql                                                 OK
Done

Now, verify that the file tecmint.sql is added to archive file.

rar l tecmint.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Archive tecmint.rar

 Name             Size   Packed Ratio  Date   Time     Attr      CRC   Meth Ver
-------------------------------------------------------------------------------
 index.php           0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 index.html          0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 xyz.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 abc.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 tecmint             0        0   0% 18-08-12 19:23 drwxr-xr-x 00000000 m0  2.0
 tecmint.sql 0 8 0% 18-08-12 19:46 -rw-r--r-- 00000000 m3b 2.9
-------------------------------------------------------------------------------
    6                0       40   0%

Step 10: How to Set Password to Archives

This is very interesting feature from Rar tool, it allows us to set a password to archive file. To password protect archive file use option rar a -p.

rar a -p tecmint.rar

Enter password (will not be echoed):

Reenter password:

AR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Evaluation copy. Please register.

Updating archive tecmint.rar

Updating  tecmint.sql                                                 OK
Done

Now verify it by extracting the archive file and see whether it will prompt us to enter password that we have set above.

rar x tecmint.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Extracting from tecmint.rar

Creating    tecmint                                                   OK
Extracting  tecmint/index.php                                         OK
Extracting  tecmint/index.html                                        OK
Extracting  tecmint/xyz.txt                                           OK
Extracting  tecmint/abc.txt                                           OK
Enter password (will not be echoed) for tecmint.sql:

Extracting  tecmint.sql                                               OK
All OK

Step 11: How to Lock Archives

Another interesting lock feature from rar tool, it provides a option to lock a particular archive file from extracting it.

rar k tecmint.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Processing archive tecmint.rar
Locking archive
Done

Conclusion

For mor RAR and Unrar options and usage, run the following command it will display a list of options with their description.

# man unrar
# man rar

We have presented almost all of the options above for rar and unrar commands with their examples. If you feel that we’ve missed anything in this list and you would like us to add, please update us using comment form below.

Source

How to Change Runlevels (targets) in SystemD

Systemd is a modern init system for Linux: a system and service manager which is compatible with the popular SysV init system and LSB init scripts. It was intended to overcome the shortcomings of SysV init as explained in the following article.

  1. The Story Behind ‘init’ and ‘systemd’: Why ‘init’ Needed to be Replaced with ‘systemd’ in Linux

On Unix-like systems such as Linux, the current operating state of the operating system is known as a runlevel; it defines what system services are running. Under popular init systems like SysV init, runlevels are identified by numbers. However, in systemd runlevels are referred to as targets.

Suggested Read: Managing System Startup Process and Services (SysVinit, Systemd and Upstart)

In this article, we will explain how to change runlevels (targets) with systemd. Before we move any further, let’s briefly under the relationship between runlevels numbers and targets.

  • Run level 0 is matched by poweroff.target (and runlevel0.target is a symbolic link to poweroff.target).
  • Run level 1 is matched by rescue.target (and runlevel1.target is a symbolic link to rescue.target).
  • Run level 3 is emulated by multi-user.target (and runlevel3.target is a symbolic link to multi-user.target).
  • Run level 5 is emulated by graphical.target (and runlevel5.target is a symbolic link to graphical.target).
  • Run level 6 is emulated by reboot.target (and runlevel6.target is a symbolic link to reboot.target).
  • Emergency is matched by emergency.target.

How to View Current target (run level) in Systemd

When the system boots, by default systemd activates the default.target unit. It’s main work is to activate services and other units by pulling them in via dependencies.

To view the default target, type the command below.

#systemctl get-default 

graphical.target

To set the default target, run the command below.

# systemctl set-default multi-user.target  

How to Change the target (runlevel) in Systemd

While the system is running, you can switch the target (run level), meaning only services as well as units defined under that target will now run on the system.

To switch to runlevel 3, run the following command.

# systemctl isolate multi-user.target 

To change the system to runlevel 5, type the command below.

# systemctl isolate graphical.target

For more information about systemd, read through these useful articles:

  1. How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux
  2. How to Create and Run New Service Units in Systemd Using Shell Script
  3. Managing System Startup Process and Services (SysVinit, Systemd and Upstart)
  4. Manage Log Messages Under Systemd Using Journalctl [Comprehensive Guide]

In this guide, we showed how to change runlevels (targets) with systemd. Use the comment form below to send us any questions or thoughts concerning this article.

Source

Tuned – Automatic Performance Tuning of CentOS/RHEL Servers

To maximize the end-to-end performance of services, applications and databases on a server, system administrators usually carry out custom performance tunning, using various tools, both generic operating system tools as well as third-party tools. One of the most useful performance tuning tools on CentOS/RHEL/Fedora Linux is Tuned.

Read Also20 Commad Line Tools Monitor Linux Performance

Tuned is a powerful daemon for dynamically auto-tuning Linux server performance based on information it gathers from monitoring use of system components, to squeeze maximum performance out of a server.

It does this by tuning system settings dynamically on the fly depending on system activity, using tuning profiles. Tuning profiles include sysctl configs, disk-elevators configs, transparent hugepages, power management options and your custom scripts.

By default tuned will not dynamically adjust system settings, but you can modify how the tuned daemon operates and allow it to dynamically alter settings based on system usage. You can use the tuned-admcommand-line tool to manage the daemon once it is running.

How to Install Tuned on CentOS/RHEL & Fedora

On CentOS/RHEL 7 and Fedoratuned comes pre-installed and activated by default, but on older version of CentOS/RHEL 6.x, you need to install it using the following yum command.

# yum install tuned

After the installation, you will find following important tuned configuration files.

  • /etc/tuned – tuned configuration directory.
  • /etc/tuned/tuned-main.conf– tuned mail configuration file.
  • /usr/lib/tuned/ – stores a sub-directory for all tuning profiles.

Now you can start or manage the tuned service using following commands.

--------------- On RHEL/CentOS 7 --------------- 
# systemctl start tuned	        
# systemctl enable tuned	
# systemctl status tuned	
# systemctl stop tuned		

--------------- On RHEL/CentOS 6 ---------------
# service tuned start
# chkconfig tuned on
# service tuned status
# service tuned stop

Now you can control tuned using the tunde-adm tool. There are a number of predefined tuning profiles already included for some common use cases. You can check the current active profile with following command.

# tuned-adm active

From the output of the above command, the test system (which is a Linode VPS) is optimized for running as a virtual guest.

Check Current Tuned Profile

Check Current Tuned Profile

You can get a list of available tuning profiles using following command.

# tuned-adm list

List Available Tuned Profiles

List Available Tuned Profiles

To switch to any of the available profiles for example throughput-performance – a tuning which results into excellent performance across a variety of common server workloads.

# tuned-adm  profile throughput-performance
# tuned-adm active

Switch to Tuning Profile

Switch to Tuning Profile

To use the recommended profile for your system, run the following command.

# tuned-adm recommend

And you can disable all tuning as shown.

 
# tuned-adm off

How To Create Custom Tuning Profiles

You can also create new profiles, we will create a new profile called test-performance which will use settings from an existing profile called latency-performance.

Switch into the path which stores sub-directories for all tuning profiles, create a new sub-directory called test-performance for your custom tuning profile there.

# cd /usr/lib/tuned/
# mkdir test-performance

Then create a tuned.conf configuration file in the directory.

# vim test-performance/tuned.conf

Copy and paste the following configuration in the file.

[main]
include=latency-performance
summary=Test profile that uses settings for latency-performance tuning profile

Save the file and close it.

If you run the tuned-adm list command again, the new tuning profile should exist in the list of available profiles.

# tuned-adm list

Check New Tuned Profile

Check New Tuned Profile

To activate new tuned profile, issue following command.

# tuned-adm  profile test-performance

For more information and further tinkering options, see the tuned and tuned-adm man pages.

# man tuned
# man tuned-adm

Tuned Github repositoryhttps://github.com/fcelda/tuned

That’s all for now! Tuned is a daemon that monitors usage of system components and dynamically auto-tunes a Linux server for maximum performance. If you have any questions or thoughts to share, use the feedback form below to reach us.

Source

Glances – An Advanced Real Time System Monitoring Tool for Linux

Earlier, we’ve written about many Linux System Monitor Tools that can be used to monitor performance of Linux systems, but we think that, most users prefer the default one that comes with every Linux distributions (topcommand).

The top command is real time task manager in Linux and the most frequently used system monitoring tool in GNU/Linux distributions to find the performance related bottlenecks in system which help us to take corrective actions. It has a nice minimalist interface, comes with few amount of reasonable options that enables us to get a better idea about overall system performance quickly.

However, sometimes its very tricky to find an application/process that consuming lots of system resources is a bit difficult under top. Because top command doesn’t have a ability to highlights programs that are eating too much of CPURAM, other resources.

For keeping such approach, here we are bringing a powerful system monitor program called “Glances” that automatically highlights programs that are utilizing highest system resources and providing maximum of information about Linux/Unix server.

What is Glances?

Glances is a cross-platform command-line curses-based system monitoring tool written in Python language which use the psutil library to grab informations from the system. With Glance, we can monitor CPULoad AverageMemoryNetwork InterfacesDisk I/OProcesses and File System spaces utilization.

Glances is a free tool and licensed under GPL to monitory GNU/Linux and FreeBSD operating systems. There are lots of interesting options available in Glances as well. One of the main features we have seen in Glances is that we can set thresholds (carefulwarning and critical) in configuration file and informations will be shown in colors which indicates the bottleneck in the system.

Glances Features

  1. CPU Informations (user related applications, system core programs and idle programs.
  2. Total memory Information including RAM, Swap, Free memory etc.
  3. The average CPU load for the past 1min, 5mins and 15 mins.
  4. Network Download/Upload rates of network connections.
  5. Total number of processes, active ones, sleeping processes etc.
  6. Disk I/O related (read or write) speed details
  7. Currently mounted devices disk usages.
  8. Top processes with their CPU/Memory usages, Names and location of application.
  9. Shows the current date and time at bottom.
  10. Highlights processes in Red that consumes highest system resources.

Here is an example screen grab of Glances.

Install Glances Monitoring in Centos

Glances View

Installation of Glances in Linux/Unix Systems

Although it’s a very young utility, you can install “Glances” in Red Hat based systems by turning on EPEL repository and then run the following command on the terminal.

On RHEL/CentOS/Fedora
# yum install -y glances
On Debian/Ubuntu/Linux Mint
$ sudo apt-add-repository ppa:arnaud-hartmann/glances-stable
$ sudo apt-get update
$ sudo apt-get install glances

Usage of Glances

To start, issue the basic syntax on the terminal.

# glances

Install Glances in Ubuntu

Glances Preview – Ubuntu 13.10

Press ‘q‘ or (‘ESC‘ or ‘Ctrl&C‘ also works) to quit from Glances terminal. Here, is the another screen grab taken from the CentOS 6.5 system.

Glances Monitoring Linux

Glances Preview – CentOS 6.5

By default, interval time is set to ‘1‘ second. But you can define the custom interval time while running glances from the terminal.

# glances -t 2
Glances Color Codes

Meaning of Glances color code:

  1. GREEN: OK (everything is fine)
  2. BLUE: CAREFUL (need attention)
  3. VIOLET: WARNING (alert)
  4. RED: CRITICAL (critical)

We can set thresholds in configuration file. By default thresholds set is (careful=50warning=70 and critical=90), we can customized as per our needs. The default configuration file is located at ‘/etc/glances/glances.conf’.

Glances Options

Besides, several command line options, glances provides many more hot keys to find output information while glances is running. Below are the list of several hot keys.

  1. a – Sort processes automatically
  2. c – Sort processes by CPU%
  3. m – Sort processes by MEM%
  4. p – Sort processes by name
  5. i – Sort processes by I/O rate
  6. d – Show/hide disk I/O stats ols
  7. f – Show/hide file system statshddtemp
  8. n – Show/hide network stats
  9. s – Show/hide sensors stats
  10. y – Show/hide hddtemp stats
  11. l – Show/hide logs
  12. b – Bytes or bits for network I/Oools
  13. w – Delete warning logs
  14. x – Delete warning and critical logs
  15. x – Delete warning and critical logs
  16. 1 – Global CPU or per-CPU stats
  17. h – Show/hide this help screen
  18. t – View network I/O as combination
  19. u – View cumulative network I/O
  20. q – Quit (Esc and Ctrl-C also work)

Use Glances on Remote Systems

With the Glances, you can even monitor remote systems too. To use ‘glances‘ on remote systems, run the ‘glances -s‘ (-s enables server/client mode) command on the server.

# glances -s

Define the password for the Glances server
Password: 
Password (confirm): 
Glances server is running on 0.0.0.0:61209

Note : Once, you issue ‘glances‘ command, it will prompt you to define the password for the Glances server. Define the password and hit enter, you see glances running on port 61209.

Now, go to the remote host and execute the following command to connect to a Glances server by specifying IP address or hostname as shown below. Here ‘172.16.27.56‘ is my glances server IP Address.

# glances -c -P 172.16.27.56

Below are few notable points that user must know while using glances in server/client mode.

* In server mode, you can set the bind address -B ADDRESS and listening TCP port -p PORT.
* In client mode, you can set the TCP port of the server -p PORT.
* Default binding address is 0.0.0.0, but it listens on all network interfaces at port 61209.
* In server/client mode, limits are set by the server side.
* You can also define a password to access to the server -P password.

Read AlsoUse Glances to Monitor Remote Linux in Web Server Mode

Conclusion

Glances is a much resources friendly tool for most users. But if you’re a system administrator who’d like to quickly get overall “idea” about systems by just glancing at command line, then this tool will be must have tool for system administrators.

Source

How to Delete HUGE (100-200GB) Files in Linux

Usually, to delete/remove a file from Linux terminal, we use the rm command (delete files), shred command (securely delete a file), wipe command (securely erase a file) or secure-deletion toolkit (a collection of secure file deletion tools).

We can use any of the above utilities to deal with relatively small files. What if we want to delete/remove a huge file/directory say of about 100-200GB. This may not be as easy as it seems, in terms of the time taken to remove the file (I/O scheduling) as well as the amount of RAM consumed while carrying out the operation.

In this tutorial, we will explain how to efficiently and reliably delete huge files/directories in Linux.

Suggested Read: 5 Ways to Empty or Delete a Large File Content in Linux

The main aim here is to use a technique that will not slow down the system while removing a huge file, resulting to reasonable I/O. We can achieve this using the ionice command.

Deleting HUGE (200GB) Files in Linux Using ionice Command

ionice is a useful program which sets or gets the I/O scheduling class and priority for another program. If no arguments or just -p is given, ionice will query the current I/O scheduling class and priority for that process.

If we give a command name such as rm command, it will run this command with the given arguments. To specify the process IDs of running processes for which to get or set the scheduling parameters, run this:

# ionice -p PID

To specify the name or number of the scheduling class to use (0 for none, 1 for real time, 2 for best-effort, 3 for idle) the command below.

This means that rm will belong to idle I/O class and only uses I/O when any other process does not need it:

---- Deleting Huge Files in Linux -----
# ionice -c 3 rm /var/logs/syslog
# ionice -c 3 rm -rf /var/log/apache

If there won’t be much idle time on the system, then we may want to use the best-effort scheduling class and set a low priority like this:

# ionice -c 2 -n 6 rm /var/logs/syslog
# ionice -c 2 -n 6 rm -rf /var/log/apache

Note: To delete huge files using a secure method, we may use the shredwipe and various tools in the secure-deletion toolkit mentioned earlier on, instead of rm command.

Suggested Read: 3 Ways to Permanently and Securely Delete Files/Directories’ in Linux

For more info, look through the ionice man page:

# man ionice 

That’s it for now! What other methods do you have in mind for the above purpose? Use the comment section below to share with us.

Source

Configuration Management Tool Chef Announces to go 100% Open Source

Last updated April 5, 2019

In case you did not know, among the most popular automation software services, Chef is one of the best out there.

Recently, it announced some new changes to its business model and the software. While we know that everyone here believes in the power of open source – and Chef supports that idea too. So, now they have decided to go 100% open source.

It will included all of their software under the Apache 2.0 license. You can use, modify, distribute and monetize their source code as long as you respect the trademark policy.

In addition to this, they’ve also introduced a new service for enterprises, we’ll take a look at that as you read on.

Chef going to be 100% open source

Why 100% Open Source?

The examples of some commercial open-source business models encouraged Chef to take this decision. In their blog post, they also mentioned about it:

We aren’t making this change lightly. Over the years we have experimented with and learned from a variety of different open source, community and commercial models, in search of the right balance. We believe that this change, and the way we have made it, best aligns the objectives of our communities with our own business objectives.

Barry crist, ceo of chef

So, they want people to collaborate and utilize their source code without any restrictions. This is a great news for people who want to experiment their ideas on a non-commercial application. And, as for the enterprises working with Chef – the open source model will help them get the best out of Chef’s services.

Barry Crist (CEO of Chef) also mentioned:

This means that all of the software that we produce will be created in public repos. It also means that we will open up more of our product development process to the public, including roadmaps, triage and other aspects of our product design and planning process.

New Launch: Chef Enterprise Automation Stack

To streamline the way of deploying and updating their software for enterprises, they have introduced a new ‘Chef Enterprise Automation Stack’. It will be specifically tailored for enterprises relying on Chef.

However, it will also be available for free – for non-commercial usage or experimentation.

To describe it, Barry wrote:

Chef Enterprise Automation Stack is anchored by Chef Workstation, the quickest way to get a development environment up and running, and Chef Automate as the enterprise observability and management console for the system. Also included is Chef Infra (formerly just Chef) for infrastructure automation, Chef InSpec for security and compliance automation and Chef Habitat for application deployment and orchestration automation.

So, you get more perks now if you purchase a Chef subscription.

Wrapping Up

With these major changes, Chef definitely seems to offer more streamlined services keeping in mind the future of their software services and the enterprises relying on it.

What do you think about it? Let us know your thoughts in the comments below.

Source

How to Install Elixir and Phoenix Framework on Ubuntu 16.04

This tutorial will show you how to install Elixir and Phoenix frameworks on a Vultr Ubuntu 16.04 server instance for development purposes.

Prerequisites

  • A new Vultr Ubuntu 16.04 server instance
  • Logged in as a non-root sudo user.

Update the system:

sudo apt-get update

Install Erlang

Install Erlang with the following commands:

cd ~
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb 
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang

You can verify the installation:

erl

This will take you to the Erlang shell with following output:

Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Eshell V10.1  (abort with ^G)
1>    

Press CTRL + C twice to exit the Erlang shell.

Install Elixir

Install Elixir with apt-get:

sudo apt-get install elixir

Now you can verify the Elixir installation:

elixir -v

This will show the following output:

Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Elixir 1.7.3 (compiled with Erlang/OTP 20)

Now you have Elixir 1.7.3 installed on your system.

Install Phoenix

If we have just installed Elixir for the first time, we will need to install the Hex package manager as well. Hex is necessary to get a Phoenix app running, and to install any extra dependencies we might need along the way.

Type this command to install Hex:

mix local.hex

Now we can proceed to install Phoenix:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Install Node.js

Phoenix uses brunch.io to compile static assets, (javascript, css and more), so you will need to install Node.js.

The recommended way to install Node.js is via nvm (node version manager).

To install nvm we run this command:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

To find out the versions of Node.js that are available for installation, you can type the following:

nvm ls-remote

This will output:

Output
...
     v8.8.1
     v8.9.0   (LTS: Carbon)
     v8.9.1   (LTS: Carbon)
     v8.9.2   (LTS: Carbon)
     v8.9.3   (LTS: Carbon)
     v8.9.4   (LTS: Carbon)
    v8.10.0   (LTS: Carbon)
    v8.11.0   (LTS: Carbon)
    v8.11.1   (LTS: Carbon)
    v8.11.2   (LTS: Carbon)
    v8.11.3   (LTS: Carbon)
    v8.11.4   (LTS: Carbon)
->  v8.12.0   (Latest LTS: Carbon)      
...

Install the version you would like with the following command:

nvm install 8.12.0

Note: If you would like to use a different version, replace 8.12.0 with the version you would like.

Tell nvm to use the version we just downloaded:

nvm use 8.12.0

Verify node has successfully installed:

node -v

Install PostgreSQL

You can install PostgreSQL easily using the apt packaging system.

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

Open the PostgreSQL shell:

sudo -u postgres psql

Change the postgres password to a secure password:

\password postgres    

After successfully changing the password, you can exit the PostgreSQL shell:

\q

Restart the PostgreSQL service:

sudo systemctl restart postgresql.service

Install inotify-tools

This is a Linux-only filesystem watcher that Phoenix uses for live code reloading:

sudo apt-get install inotify-tools

Create a Phoenix application

Create a new application:

mix phoenix.new ~/phoenix_project_test

If the command returns the following error:

** (Mix) The task "phx.new" could not be found

You can fix it with the following command:

mix archive.install https://raw.githubusercontent.com/phoenixframework/archives/master/phx_new.ez

Now rerun the command to create a test Phoenix app:

mix phoenix.new ~/phoenix_project_test

Change the PostgreSQL password in the config file with the password you set in the previous step:

nano config/dev.exs    

The application will now be successfully created. Move to the application folder and start it:

cd ~/phoenix_project_test
mix ecto.create
mix phx.server

Now the Phoenix application is up and running at port 4000.

Source

WP2Social Auto Publish Powered By : XYZScripts.com