rpm

How to perform python input/output operations on files with python open function

The manipulation of files is an operation which sooner or later we’ll need to perform in our programs. The python built-in open function returns a file object, which lets us interact with files in different modes: we will see them in this article.

In this python tutorial you will learn:

  • How to use the python open function.
  • What are the various modes of operation which can be used with the python open function.
  • How to interact with a file object.
  • Why is important to close a file object, and how to do it.

Read more

PHP installed

How To Interact With Docker Containers

This article extends the previous Docker article and shows how to interact with Docker containers by executing commands inside containers, installing software inside containers, inspecting container status, accessing containers using Bash, persisting changes into images and removing unused containers and images.

In this tutorial you will learn:

  • How to execute commands inside containers
  • How to install software inside containers
  • How to inspect container status
  • How to access containers using Bash
  • How to persist changes into images
  • How to remove unused containers and images

Read more

Docker Swarm Services

How to Configure Docker Swarm with multiple Docker Nodes on Ubuntu 18.04

Docker Swarm is a container orchestration and clustering tool to manage Docker hosts, and is a part of Docker Engine. It’s a native clustering tool provided by Docker which provides high-availability and high-performance for your application.

The primary objective of Docker Swarm is to group multiple Docker hosts into a single logical virtual server—this ensures availability and high performance for your application by distributing it over a number of Docker hosts instead of just one.

In this tutorial you will learn:

  • What is Docker Swarm
  • How to Configure Hosts
  • How to Install and Run Docker Service
  • How to Configure the Manager Node for Swarm Cluster Initialization
  • How to Configure Worker Nodes to join the Swarm Cluster
  • How to Verify the Swarm Cluster
  • How to Deploy new Service on Swarm Cluster

Read more

NVIDIA CUDA Toolkit on Fedora 28 Linux

How to install NVIDIA CUDA Toolkit on Fedora 29 Linux

The Nvidia CUDA toolkit is an extension of GPU parallel computing platform and programming model. The Nvidia CUDA installation consists of inclusion of the official Nvidia CUDA repository followed by the installation of relevant meta package.

In this How to install NVIDIA CUDA Toolkit on Fedora 29 Linux tutorial you will learn:

  • How to download the latest NVIDIA CUDA repository package.
  • How to install the CUDA repository package on Fedora 29.
  • How to select and install a CUDA meta package on Fedora 29.
  • How to export system path to the Nvidia CUDA binary executables.
  • How to confirm and test your CUDA installation.

Read more

NVIDIA CUDA Toolkit on Fedora 28 Linux

How to install NVIDIA CUDA Toolkit on Fedora 28 Linux

The Nvidia CUDA toolkit is an extension of the GPU parallel computing platform and programming model. The Nvidia CUDA installation consists of inclusion of the official Nvidia CUDA repository followed by the installation of relevant meta package.

In this How to install NVIDIA CUDA Toolkit on Fedora 28 Linux tutorial you will learn:

  • How to download the latest NVIDIA CUDA repository package.
  • How to install the CUDA repository package on Fedora 28.
  • How to select and install a CUDA meta package on Fedora 28.
  • How to export system path to the Nvidia CUDA binary executables.
  • How to confirm and test your CUDA installation.

Read more

Namenode Web User Interface

How to install Hadoop on Ubuntu 18.04 Bionic Beaver Linux

Apache Hadoop is an open source framework used for distributed storage as well as distributed processing of big data on clusters of computers which runs on commodity hardwares. Hadoop stores data in Hadoop Distributed File System (HDFS) and the processing of these data is done using MapReduce. YARN provides API for requesting and allocating resource in the Hadoop cluster.

The Apache Hadoop framework is composed of the following modules:

  • Hadoop Common
  • Hadoop Distributed File System (HDFS)
  • YARN
  • MapReduce

This article explains how to install Hadoop Version 2 on Ubuntu 18.04. We will install HDFS (Namenode and Datanode), YARN, MapReduce on the single node cluster in Pseudo Distributed Mode which is distributed simulation on a single machine. Each Hadoop daemon such as hdfs, yarn, mapreduce etc. will run as a separate/individual java process.

In this tutorial you will learn:

  • How to add users for Hadoop Environment
  • How to install and configure the Oracle JDK
  • How to configure passwordless SSH
  • How to install Hadoop and configure necessary related xml files
  • How to start the Hadoop Cluster
  • How to access NameNode and ResourceManager Web UI

Read more

Summary of interactive yum update

Preparing for applying updates on Red Hat Linux

Objective

Our objective is to ensure that updating the operating system will run smoothly and without errors.

Operating System and Software Versions

  • Operating system: Red Hat Enterprise Linux 6+

Requirements

Privileged access to the systems

Difficulty

EASY

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux commands to be executed as a regular non-privileged user

Introduction

Keeping the system up to date is an every day task for a sysadmin, as well as a desktop user. By applying the latest (stable) available software on the system we can take advantage of the latest features, and will be more protected from security issues and hopefully suffer less from bugs. To update the system you will need configured yum repositories that act as the source of the updated software.

If you sit next to the machine that is running the operating system to be updated, you can easily act if something goes wrong during update, like checking the output on the terminal, or boot to a live system if the upgraded one does not return from reboot – but this is not always the case. Think of a datacenter with hundreds or thousands of (virtual) machines, or simply a physical PC that you have to upgrade remotely.

There are simple steps we can perform to prepare the system for upgrade, and possibly clear any problem that would endanger a successful update.

Read more

TTY console resolution on Ubuntu 18.04 Server virtual machine

How to increase TTY console resolution on Ubuntu 18.04 Server

The default TTY console resolution on Ubuntu 18.04 Server is normally 800×600. This may be satisfactory in many cases. However, there are times that higher resolution is required. To increase TTY console resolution on the Ubuntu 18.04 server it is necessary to change the configuration of the relevant GRUB boot loader settings within the /etc/default/grub.

Read more

Installing custom scripts with rpm

Unifying custom scripts system-wide with rpm on Red Hat/CentOS

Objective

Our goal is to build rpm packages with custom content, unifying scripts across any number of systems, including versioning, deployment and undeployment.

Operating System and Software Versions

  • Operating system: Red Hat Enterprise Linux 7.5
  • Software: rpm-build 4.11.3+

Requirements

Privileged access to the system for install, normal access for build.

Difficulty

MEDIUM

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux commands to be executed as a regular non-privileged user

Introduction

One of the core feature of any Linux system is that they are built for automation. If a task may need to be executed more than one time – even with some part of it changing on next run – a sysadmin is provided with countless tools to automate it, from simple shell scripts run by hand on demand (thus eliminating typo errors, or only save some keyboard hits) to complex scripted systems where tasks run from cron at a specified time, interacting with each other, working with the result of another script, maybe controlled by a central management system etc.

Read more

Disabling proxy for internal repository

How to add repositories to Red Hat Linux with and without a proxy

Objective

Our objective is to set up access to internal and remote yum repositories while some of them are behind proxy servers.

Operating System and Software Versions

  • Operating system: Red Hat Enterprise Linux 7.5

Requirements

Privileged access to the system

Difficulty

EASY

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux commands to be executed as a regular non-privileged user

Introduction

In a corporate environment it is common to limit Internet access – both for security and accountability. This is often accomplished by using proxy servers that enable access to the Internet after some sort of authentication, while inspect and log all traffic passing trough them. This way the company can, for example find the employee who downloaded the virus that wreak havoc within the corporate system (or at least the employee who’s credentials where stolen to do so), or filter the traffic, preventing access to well-known harmful sites to protect employee equipment.

Read more

Tomcat providing the examples application

How to set up Apache webserver proxy in front of Apache Tomcat on Red Hat Linux

Objective

Our objective is to setup Apache httpd to work as a proxy in front of the Apache Tomcat application container.

Operating System and Software Versions

  • Operating system: Red Hat Enterprise Linux 7.5
  • Software: Apache httpd, Apache Tomcat

Requirements

Privileged access to the system

Difficulty

EASY

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux commands to be executed as a regular non-privileged user

Introduction

Using Apache httpd as a proxy to an Apache Tomcat application container is a common setup. It comes with many use cases, the most trivial is serving static content from httpd, while providing services implementing heavy business logic from an application written in Java that resides in the Tomcat container.

Read more