ansible-logo

Ansible tutorial for beginners on Linux

A system administrator, in the vast majority of cases, has to take care of more than one server, so he often has to perform repetitive tasks on all of them. In these cases automation is a must. Ansible is an open source software owned by Red Hat; it is written in the Python programming lanaguage, and it is a provisioning and configuration management software which help us in the aforementioned cases. In this tutorial we will see how to install it and the basic concepts behind its usage.

In this tutorial you will learn:

  • How to install Ansible on the most used Linux distributions
  • How to configure Ansible
  • What is the Ansible inventory
  • What are the Ansible modules
  • How to run a module from the command line
  • How to create and run a playbook
ansible-logo

Read more

Configuring and testing a BIND nameserver on Linux

Linux DNS server BIND configuration

The BIND DNS software is one of the most reliable and proven ways to configure name resolution on a Linux system. Having been around since the 1980s, it remains the most popular Domain Name Server (DNS) currently in use. This article serves as a quick configuration manual of a Linux DNS server using BIND.

This article is not an introduction to DNS or an explanation of how the protocol works. Rather we will simply concentrate on a simple configuration of a custom zone and config file for a given domain / host supporting www and mail services. Follow along with the instructions below to get BIND DNS set up and configured on your own server.

WARNING
Before you proceed with the installation and configuration of BIND nameserver, make sure that BIND DNS server is exactly what you want. Default setup and execution of BIND on Debian or Ubuntu may take around 200MB of RAM with no zones added to the config file. Unless you reduce the memory usage of a BIND via various BIND “options” config settings, be prepared to have some spare RAM available just for this service. This fact is even more important if you pay for your own VPS server.

In this tutorial you will learn:

  • How to install BIND on major Linux distros
  • How to create a DNS zone file
  • How to configure address to name mappings
  • How to check BIND zone file and configuration
  • How to start or restart the BIND DNS service
  • How to test a BIND configuration with dig command

Read more

Using a custom Red Hat repository - in this case from a Red Hat DVD

Creating a Redhat package repository

If your Red Hat server is not connected to the official RHN repositories, you will need to configure your own private repository which you can later use to install packages. The procedure of creating a Red Hat Linux repository is quite a simple task. In this article, we will show you how to create a local file Red Hat repository as well as a remote HTTP repository.

In this tutorial you will learn:

  • How to use official Red Hat DVD as repository
  • How to create a local file Red Hat repository
  • How to create a remote HTTP Red Hat repository

Read more

Connecting to FTP server on Ubuntu Linux

How to setup and use FTP Server in Ubuntu Linux

FTP stands for “File Transfer Protocol” and is a great protocol for downloading files from a remote or local server, or uploading files onto the server. Using FTP proves to be a pretty basic task after it has been setup properly. It works by having a server that is listening for connections (on port 21 by default) from clients. The clients can access a remote directory with their user account, and then download or upload files there, depending on the permissions that have been granted to them. It’s also possible to configure anonymous authorization, which means that users will not need their own account in order to connect to the FTP server.

On Ubuntu Linux, there are a multitude of different FTP server and client software packages available. You can even use default GUI and command line tools as an FTP client. A very popular and highly configurable FTP server package is vsftpd, available for many Linux systems, including Ubuntu.

In this guide, we will go over the step by step instructions to install vsftpd on Ubuntu. We’ll also see how to to configure the FTP server through various settings, then how to use command line, GNOME GUI, or FTP client software to connect to the FTP server.

WARNING
FTP will suffice for some situations, but for connections over the internet, SFTP is recommended. This is because FTP is not secure to use over an internet connection, since your credentials and data are transmitted without encryption. The ‘S’ in SFTP stands for ‘Secure’ and tunnels the FTP protocol through SSH, providing the encryption needed to establish a secure connection. To learn more about SFTP, see our guide on How to Securely Transfer Files With SFTP.

In this tutorial you will learn:

  • How to install and configure vsftpd on Ubuntu
  • How to setup an FTP user account
  • How to connect to FTP server via command line
  • How to connect to FTP server via GUI
  • How to configure anonymous FTP login
  • How to change the default FTP listening port
  • Troubleshooting “connection refused” FTP connection error

Read more

Configuring an NFS server share on Linux

How to configure NFS on Linux

Sharing files between computers and servers is an essential networking task. Thankfully, NFS (Network File System) is available for Linux systems and makes the job extremely easy. With NFS properly configured, moving files between computers is as easy as moving files around on the same machine. Since NFS functionality is built directly into the Linux kernel, it is both powerful and available on every Linux distro, although the configuration can differ slightly between them.

In this guide, we’ll show how to install and configure NFS on major Linux distros, like Ubuntu and others based on Debian, and Fedora and others based on Red Hat. The configuration will involve a server (which hosts the files) and one client machine (which connects to the server to view or upload files). Follow along with the steps below to get NFS setup on your own system.

In this tutorial you will learn:

  • How to install NFS server
  • How to configure NFS server shares
  • How to connect to NFS server from client machines

Read more

How to change password and account expiry

How to change password and account expiry options on Linux using chage

Managing the period of time a password of a user should be valid and the date in which said account should expire are very important tasks a system administrator should be able to perform. While some of these parameter can be set when creating an account, it is also possible to change them at a second time, using the chage utility; in this tutorial we see how to use this utility.

In this tutorial you will learn:

  • How to get information about an user account ageing
  • How to set an account expiration date
  • How to set the minimum number of days which should pass between two password changes
  • How to set the password expiration date
  • How to set the inactive days threshold
  • How to set when a user should receive a warning about a future password expiration

Read more

Configuring Squid proxy on Linux

Squid proxy configuration tutorial on Linux

Squid is a robust proxy server that supports caching for protocols like HTTP, HTTPS, and FTP. It has the ability to speed up web requests by caching frequently accessed websites, and serving that cache to requesting clients. This is a great way for networks to reduce bandwidth consumption and provide snappier response times for web browsing.

In this guide, we’ll go over the step by step instructions to download, install, and configure Squid proxy on a Linux system. Follow along with us to get it setup on your own system, which can either provide caching just for yourself or all the way up to an entire organization of computers.

In this tutorial you will learn:

  • How to download and install Squid proxy on major Linux distros
  • How to configure Squid proxy
  • How to configure a browser to use Squid proxy

Read more

How to setup an FTP/SFTP server on AlmaLinux

How to setup FTP/SFTP server and client on AlmaLinux

FTP and SFTP are great protocols for downloading files from a remote or local server, or uploading files onto the server. FTP will suffice for some situations, but for connections over the internet, SFTP is recommended. In other words, FTP is not secure to use over an internet connection, since your credentials and data are transmitted without encryption. The ‘S’ in SFTP stands for ‘Secure’ and tunnels the FTP protocol through SSH, providing the encryption needed to establish a secure connection.

In this guide, we’ll go over the step by step instructions to setup an FTP server through VSFTP software or SFTP server through OpenSSH on AlmaLinux. Then, we’ll see how to connect to the server from a client AlmaLinux system. Setting up FTP/SFTP is a common step after installing AlmaLinux or migrating from CentOS to AlmaLinux.

In this tutorial you will learn:

  • How to setup an FTP server through VSFTPD
  • How to setup an SFTP server through OpenSSH
  • How to setup FTP and SFTP user accounts
  • How to allow FTP and SFTP through firewalld
  • How to connect to an FTP/SFTP server via command line
  • How to connect to an FTP/SFTP server via GNOME GUI
How to setup an FTP/SFTP server on AlmaLinux

How to setup an FTP/SFTP server on AlmaLinux

Read more

Setting up a Samba share on AlmaLinux

How to setup Samba Server and client on AlmaLinux

File servers often need to accommodate a variety of different client systems. Running Samba allows Windows systems to connect and access files, as well as other Linux systems and MacOS. An alternative solution would be to run an FTP/SFTP server, which can also support the connections from many systems.

In this guide, we’ll go over the instructions to setup a Samba server on AlmaLinux. This is a great way to prepare your file server after installing AlmaLinux or migrating from CentOS to AlmaLinux. We’ll also see how to connect to the file server from other AlmaLinux client computers.

In this tutorial you will learn:

  • How to install Samba on AlmaLinux
  • How to allow Samba through firewalld
  • How to create a Samba user
  • How to configure Samba to share a directory
  • How to allow Samba through SELinux
  • How to connect to Samba server from AlmaLinux client
Setting up a Samba share on AlmaLinux

Setting up a Samba share on AlmaLinux

Read more

The chrony NTP server source list on AlmaLinux

How to configure NTP server and client on AlmaLinux

NTP stands for Network Time Protocol and is used for clock synchronization across multiple computers. An NTP server is responsible for keeping a set of computers in sync with each other. On a local network, the server should be able to keep all client systems to within a single millisecond of each other.

Such a configuration would be necessary if, for example, the systems needed to start or stop a task in unison at a precise time. In this article, we’ll show you how to configure an NTP server on AlmaLinux and how to configure a client system to sync its system time with said server. This can be done from a fresh AlmaLinux installation or on a system that has migrated from CentOS to AlmaLinux.

In this tutorial you will learn:

  • How to install and configure chrony NTP server
  • How to open firewall to incoming NTP requests
  • How to connect to an NTP server from a client machine
The chrony NTP server source list on AlmaLinux

The chrony NTP server source list on AlmaLinux

Read more

Setting up a MySQL database and user on AlmaLinux

How to install MySQL on AlmaLinux

In this guide, we will show you how to install MySQL on AlmaLinux. There are two separate packages for this on AlmaLinux, depending on what you need to do. You can either install the MySQL client package, which is used to connect to MySQL servers, or install the MySQL server software, which can be used to host your own databases. We’ll cover both below.

After installing a MySQL server, we’ll also go over the first steps you’ll need to get started with hosting a database, which includes making a username and password, creating a database, and granting user permissions on that database. AlmaLinux is a good Linux distro for hosting MySQL, whether you’ve freshly installed AlmaLinux or migrated from CentOS to AlmaLinux.

In this tutorial you will learn:

  • Install MySQL Client on AlmaLinux
  • Install MySQL Server on AlmaLinux
  • How to setup a MySQL database
Setting up a MySQL database and user on AlmaLinux

Setting up a MySQL database and user on AlmaLinux

Read more