Servers

Exclusive Rocket (onrocket.com) Coupon Code

Rocket is a WordPress hosting provider that focuses on speed, ease of use, and managed 24/7 support. Get a discount with our exclusive coupon code here. Read our detailed review here. Exclusive Rocket coupon: 50% off the first 3 months How to use the coupon code at onrocket.com? Get the code from this post. Visit […]

Source

from ThisHosting.Rocks https://thishosting.rocks/exclusive-rocket-onrocket-com-coupon-code/…

0
Read More

Rocket Review – Fast Managed WordPress Hosting

Rocket is a WordPress hosting provider that focuses on speed, ease of use, and managed 24/7 support, the 3 main things people look for on a WordPress hosting provider. Read our detailed review here. About Rocket Rocket was launched in 2020 by industry veterans with years of experience. It’s apparent that Rocket was launched by […]

Source

from ThisHosting.Rocks https://thishosting.rocks/rocket-review/…

0
Read More

Rocket Review – Fast Managed WordPress Hosting

Rocket is a WordPress hosting provider that focuses on speed, ease of use, and managed 24/7 support, the 3 main things people look for on a WordPress hosting provider. Read our detailed review here. About Rocket Rocket was launched in 2020 by industry veterans with years of experience. It’s apparent that Rocket was launched by […]

Source

from ThisHosting.Rocks https://thishosting.rocks/rocket-review/…

0
Read More

Developing a WordPress Website Without Programming Knowledge

WordPress is the solution to those who want to create websites but have minimal programming and coding experience. If you’ve heard that expression multiple times, why not check it out at least once? You don’t need to worry about your programming skills, since this powerful Content Management System (CMS) can be easily used by a […]

Source

from ThisHosting.Rocks https://thishosting.rocks/developing-a-wordpress-website-without-programming-knowledge/…

0
Read More

9 tee Command Examples in Linux

Linux Tee command is a command line tool, it reads from the standard input and write the result to standard output and files at the same time.In other words, we can say, tee command in Linux used for hitting two birds with one stone: reading from standard input and printing the result on a file and to standard output at the same time. What do we mean by this? In this guide, we shed more light on Linux tee command and use a few examples to demonstrate its usage.

Tee Command Syntax

The tee command syntax is quite simple and takes the following format:

$ tee OPTIONS filename

Here are some of the options that you can use with tee command:

linux-tee-command-options

In tee command’s syntax, filename refers to one or more files.

With that in mind let’s check out a few examples on how the command is used.

Example 1) Basic usage of tee command

As described earlier, the main function of the tee command is to display the output of a command (stdout) and save it in a file. In the example below, the command we are inspecting the block devices in our system and piping the results to tee command which display the output to the terminal while simultaneously saving it on a new file called block_devices.txt

$ lsblk | tee block_devices.txt

lsblk-tee-command-output-linux

Feel free to examine the contents of the block_devices.txt file using the cat command as shown:

$ cat block_devices.txt

Example 2) Save command output to multiple files using tee

Additionally, you can write a command’s output to several space-separated files as shown in the syntax below.

$ command | tee file1 file2 file3 . . .

In the following example, we have invoked the hostnamectl command to print the hostname of our system among other details and save the standard output to two files file1.txt, and file2.txt

$ hostnamectl | tee file1.txt file2.txt

tee-command-output-files-linux

Once again, you can confirm the existence of the output in the two files using the cat command as shown:

$ cat file1.txt
$ cat file2.txt

Example 3) Suppress output of tee command

If you want to hide or suppress tee command from printing the output on the screen then redirect the output to /dev/null as shown:

$ command | tee file > /dev/null

For example,

$ df -Th | tee file4.txt > /dev/null

tee-command-suppress-output

Example 4) Append output to a file with tee command

By default, tee command overwrites the contents of a file. To append the output and prevent the erasure of the current content, use the -a or –append options.

$ command | tee -a file

In the second command, as shown, we have appended the output of date command to file1.txt which already contains the information about the USB devices on the system.

$ date | tee -a file1.txt

Append-output-tee-command-linux

Example 5) Use tee together with sudo command

Suppose that as a sudo user, you want to write on a file that is owned by the root user. Naturally, any elevated operation will require that you invoke the sudo user before the command.

To achieve this, simply prefix the tee command with sudo as shown below.

$ echo "10.200.50.20 db-01" | sudo tee -a /etc/hosts/

tee-with-sudo-command-linux

So, tee receives the …

0
Read More

5 Ways to Improve WordPress SEO

If you’re running an online platform, there’s a high probability that WordPress is your content management tool, which puts you in one of the largest user groups in the online world. Since most of the SEO score marks depend on various content attributes, it’s important to learn as much as possible about WordPress SEO tools […]

Source

from ThisHosting.Rocks https://thishosting.rocks/5-ways-to-improve-wordpress-seo/…

0
Read More

9 Quick chmod Command Examples in Linux

Chmod command in Linux is used to change or assign permissions on files and directories. In Linux / Unix systems, accessibility to files and directories is determined by file ownership and permissions. In a previous article, we looked at how to manage file & directory ownership using the chown command. In this tutorial, we look at the chmod command.

The chmod command, short for change mode is used to manage file and directory permissions and determines who can access them. Let’s now dive in and explore the nature of file & directory permissions and how they can be modified.

Linux permissions

To better understand how the chmod command works, it’s prudent that we study the Linux file permissions model.

In Linux, we have 3 types of file permissions: read (r), write (w) and execute (x) permissions. These permissions determine which users can read, write or execute the files. You can assign these permissions using the text or octal (numeric) notation as we shall later discuss in this tutorial.

Files and directories can belong to either the owner of the file (u), group (g) or others (o)

  • u   –  Owner of the file
  • g   –  Group
  • o   –  Others

File permissions are listed using the ls -l command. The -l flag lists the file permissions. The permissions are arranged in three sets: the user, group and others respectively

To get a better understanding of file permissions, we are going to list the contents of our directory as shown:

$ ls -l

file-directory-permissions-linux

Starting from the extreme left, the first character/symbol indicates the file type. A hyphen (-) indicates that the file is a regular file. The symbol d indicates that it is a directory. Symbol l indicates that it’s a symbolic link.

The remaining nine characters are segmented into 3 triplets each bearing three symbols r(read), w(write) and x(execute). As pointed out earlier, the first segment points to the owner permissions, the second indicates the group permissions and the last portion specifies the permissions that other users have on the file or directory.

From the output, we can see that we have 2 files (hello.txt & reports.zip) and a single directory.

Let’s examine the first file

-rw-rw-r-- 1 linuxtechi linuxtechi   35 Aug 17 15:42 hello.txt

For the first file, the -rw-rw-r– permissions imply that the owner of the file has read and write permissions, the group also bears read & write permissions, while other users only have read permissions. The same permissions also apply for the reports.zip compressed file.

Let’s look at the directory’s permissions:

drwxrwxr-x 2 linuxtechi linuxtechi 4096 Aug 17 15:43 sales

We can see that the owner of the directory and group has all the permissions (read, write and execute) while other users have read and execute permissions only.

The triple hyphen symbols — indicate no permissions have been granted for either the owner of the file, group or other users.

Using chmod command to set file & directory permissions

Having looked at the file permissions and how to view them, let’s no focus on how to modify these permissions.

The chmod command in Linux is used to change file and directory permissions using either text (symbolic) or numeric (octal) notation. It takes …

0
Read More

An Introduction to a VPN – What Is It and How You Can Benefit from It?

You might’ve heard the term ‘VPN’ a lot in recent years. But what is it, exactly? Even though it’s computer-centric, a VPN isn’t only for tech gurus. It’s a ‘virtual private network,’ and it’s a tool many have adopted to stay safe online. Even though modern firewalls and antivirus programs are pretty secure, few digital […]

Source

from ThisHosting.Rocks https://thishosting.rocks/into-to-vpn-what-is-it/…

0
Read More

Top 12 Command Line Tools to Monitor Linux

Being a Linux administrator is not an easy job. It takes lot of time, patience, and hard work to keep the systems up and running. But Linux System Admins can take some breather as they have some help in the form of command line monitoring tools. These tools help them to keep a tab on the Linux server performances and fix anything if found abnormal. In this article, we will look at the top 12 command line tools to monitor Linux performance.

1) Top

Without any doubt the top command is the number one command line tool to monitor Linux. It is one of the most widely used commands by Linux system administrators all over the world. It quickly provides details about all running processes in an ordered list. The list also keeps updating in real time. Not only the process names, it also displays the memory usage and CPU usage etc.

top-command-line-tool-monitor-linux

Also Read: 25 Top Command Examples to Monitor Linux Server Performance

2 ) vmstat

vmstst is the command line utility that occupies the 2nd position in our list. Its main task is used to display virtual memory statistics. It also helps you to display various information including all system processes, CPU activity, paging, block IO, kernel threads and disks etc. vmstat is the part of default installation in almost all the Linux distribution, so it is available straight way after the installation.

vmstat-command-output-linux

3) lsof

If you want to look at all the files currently opened in the system, then you need to make use of the lsof command. It is also used to monitor all processes currently in use. One of the major advantages of this command is that it helps administrators to see the files currently in use when a disk cannot be unmounted. Using this command, these files can be identified easily. lsof command is not available after the default Linux OS installation, so first we have to install it using following command:

For CentOS / RHEL

$ sudo yum install -y lsof              // CentOS 7 / RHEL 7 or before
$ sudo dnf install -y lsof              // CentOS 8 / RHEL 8

For Ubuntu / Debian

$ apt-get install -y lsof
Or
$ apt-get install -y lsof

To use lsof commmand, type lsof and hit enter

lsof-command-output-linux

Also Read : 18 Quick ‘lsof’ command examples for Linux Geeks

4) tcpdump

Tcpdump is another command line utility that allows Linux system administrators and network engineers to monitor all TCP/IP packets transferred over a network. Using tcpdump, one can also save all the packets in a separate file for analysis in the future.

Tcpdump is not part of default OS installation, so before start using it first install via following commands:

$ sudo yum install tcpdump -y    // CentOS 7 / RHEL 7 or before
$ sudo dnf install tcpdump -y    //CentOS 8 / RHEL 8
$ sudo apt install tcpdump -y    // Ubuntu / Debian

To Start capturing the packets on specific interface, run the following command,

# tcpdump -i enp0s3

tcpdump-command-line-tool-linux

Also Read: How to capture and analyze packets with tcpdump command on Linux

5) netstat

Netstat is one of the oldest command line utility used for network troubleshooting. Using netstat we can easily find network …

0
Read More

How to Add Remote Linux Host to Cacti for Monitoring

In the previous guide, we demonstrated how you can install Cacti monitoring server on CentOS 8. This tutorial goes a step further and shows you how you can add and monitor remote Linux hosts on Cacti. We are going to add remote Ubuntu 20.04 LTS and CentOS 8 systems to the cacti server for monitoring.

Let’s begin.

Step 1)  Install SNMP service on Linux hosts

SNMP, short for Simple Network Management Protocol is a protocol used for gathering information about devices in a network. Using SNMP, you can poll metrics such as CPU utilization, memory usage, disk utilization, network bandwidth etc. This information will, later on, be graphed in Cacti to provide an intuitive overview of the remote hosts’ performance.

With that in mind, we are going to install and enable SNMP service on both Linux hosts:

On Ubuntu 20.04

To install snmp agent, run the command:

$ sudo apt install snmp snmpd -y

On CentOS 8

$ sudo dnf install net-snmp net-snmp-utils -y

SNMP starts automatically upon installation. To confirm this, confirm the status by running:

$ sudo systemctl status snmpd

If the service is not running yet, start and enable it on boot as shown:

$ sudo systemctl start snmpd

We can clearly see that the service is up and running. By default, SNMP runs listens on UDP port 161, You can verify this using the netstat command as shown.

$ sudo netstat -pnltu | grep snmpd

netstat-snmp-linux

Step 2) Configuring SNMP service

So far, we have succeeded in installing snmp service and confirmed that it is running as expected. The next course of action is to configure the snmp service so that data can be collected and shipped to the Cacti service.

The configuration file is located at /etc/snmp/snmpd.conf

For Ubuntu 20.04

We need to configure a few parameters. First, locate the sysLocation and sysContact directives. These define your Linux client’s Physical location.

Default-syslocation-syscontact-snmpd-linux

Therefore, feel free to provide your client’s location.

Syslocation-Syscontact-snmpd-ubuntu-20-04

Next, locate the agentaddress directive. This refers to the IP address and the port number that the agent will listen to.

Default-agent-address-snmpd-ubuntu-20-04

Adjust the directive as shown below where 192.168.2.106 is my client system’s address.

agentaddress  udp:192.168.2.106:161

AgentAddress-cacti-server-Ubuntu-20-04

The directive will now allow the system’s local IP to listen to any snmp requests. Next up, add the view directive below above the other view directives:

view     all      included     .1      80

View-Directive-snmpd-Ubuntu-20-04

Next, change the rocommunity attribute shown below

rocommunity  public default -V systemonly
to:
rocommunity  public default -V all

rocommunity-snmpd-linux

Finally, to ensure the snmp service is working as expected, run the command below on the Linux host.

$ sudo snmpwalk -v 1 -c public -O e 192.168.2.106

You should get some massive output as shown.

snmpwalk-command-cacti-ubuntu-20-04

For CentOS 8

In CentOS 8, the configuration is slightly different. First, locate the line that begins with the com2sec  directive as shown:

default-com2sec-directive-snmpd-centos8

We will specify a new security name known as AllUser and delete the notConfigUser as shown:

Update-com2sec-directive-snmpd-centos8

Next, locate the line that starts with the group directive as shown.

Default-Group-directive-snmpd-centos8

We will modify the second attribute and specify AllGroup as the group name and AllUser as the security name as previously defined.Change-group-directive-snmpd-centos8

In the view section, add this line

view    AllView         included        .1

View-Directive-snmpd-centos8

Finally, locate the line beginning with the access directive.

Default-access-directive-snmpd-centos8

Modify …

0
Read More