Found 1383 Articles for Open Source

How to change user config in Docker tomcat 8?

Hemant Sharma
Updated on 30-Jan-2023 09:59:03

2K+ Views

Introduction In a Docker Tomcat 8 container, you may want to change the user configuration to add or modify users and roles. This modification can be useful for tasks like securing access to the Tomcat 8 instance or setting up different levels of permissions for different users. This article explains how to change the user configuration in a Docker Tomcat 8 container. We cover the steps involved in modifying the tomcat-users.xml file, building a new Docker image with the modified configuration, and running a Docker container from the new image. Prerequisites Before changing the user configuration in a Docker Tomcat ... Read More

How to access JMX interface in docker from outside?

Hemant Sharma
Updated on 30-Jan-2023 09:56:58

2K+ Views

JMX and its use in Java applications JMX (Java Management Extensions) is a Java technology that provides a way to manage and monitor Java applications. It exposes a set of APIs and MBeans (Java objects that represent resources to be managed) that can be used to monitor and control the behaviour of a Java application. JMX is commonly used in Java-based applications to monitor performance metrics such as memory usage, CPU utilization, and thread counts, as well as to manage and configure the application at runtime. Accessing JMX from outside a Docker container When running a Java application in a ... Read More

Equivalent of Docker option --config in docker-compose

Hemant Sharma
Updated on 30-Jan-2023 09:53:41

130 Views

Overview If you are using Docker Compose to define and run multi-container Docker applications, you may want to specify custom configuration files or directories for your application. Fortunately, Docker Compose provides the --config option, which allows you to do just that. The --config option is used to specify a single configuration file or a directory containing multiple configuration files for Docker Compose. To use it, you can pass it as an argument to the docker-compose command. For example − $ docker-compose --config /path/to/custom/config.yml up This command would tell Docker Compose to use the configuration file located at /path/to/custom/config.yml ... Read More

Best way to install Docker on Vagrant

Hemant Sharma
Updated on 30-Jan-2023 09:50:55

2K+ Views

Introduction Vagrant is a tool for building and managing development environments using virtualization software such as VirtualBox. It allows you to define and configure a development environment in a Vagrantfile and then spin up and tear down virtual machines quickly and easily. By using Docker and Vagrant together, you can create a flexible and reproducible development environment that is easy to set up and maintain. This article discusses the best way to install Docker on Vagrant, including the prerequisites, installation steps, and verification. Prerequisites for installing Docker on Vagrant Before installing Docker on Vagrant, you must ensure you have the ... Read More

Evaluate XPath in the Linux Command Line

Satish Kumar
Updated on 27-Jan-2023 12:53:04

2K+ Views

Introduction XPath is a powerful language used for navigating and selecting elements within an XML document. It is commonly used in conjunction with XSLT, a language used for transforming XML documents, to extract specific information from a document. In this article, we will discuss how to evaluate XPath expressions in the Linux command line, using the command-line tool xmllint. Installing xmllint Before we can begin evaluating XPath expressions in the Linux command line, we must first install xmllint. xmllint is part of the libxml2 library, which is included in most Linux distributions. To check if xmllint is already installed on ... Read More

Move All Files Including Hidden Files Into Parent Directory in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:41:57

8K+ Views

Introduction In Linux, hidden files, also known as dotfiles, are files whose names begin with a dot (.) character. These files are often used to store configuration data or other important information that should not be changed or deleted by the user. If you have a directory with a large number of hidden files and you want to move them all to the root directory, there are several ways to do this. In this tutorial, we will discuss two methods for moving all files, including hidden files, from a directory to its home directory in Linux: the mv command and ... Read More

Run Cron Job Only If It Isn’t Already Running in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:40:53

2K+ Views

Introduction Cron is a utility in Linux that allows users to schedule commands or scripts to run automatically at a specific date and time. However, sometimes it may be necessary to ensure that a cron job does not run more than once at a time. In this article, we will discuss two ways to prevent overlapping cron tasks: using process tracking and using a “.pid” file. Locate running instances by process One way to avoid overlapping a cron task run is to check for the presence of the task's process before running it. This can be done using the pgrep ... Read More

Find the Current Working Directory of a Running Process in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:38:29

6K+ Views

Introduction One of the basic tasks when working with processes on a Linux system is determining the current working directory of a process. The current working directory, also known as the "current directory" or "current working folder, " is the directory in which a process runs and interacts with files. Knowing the current working directory of a process can be useful for a variety of purposes, such as debugging, understanding the environment in which a process is running, or simply monitoring the activity of a process. In this article, we will discuss how to find the current working directory of ... Read More

Remove the Last N Lines of a File in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:37:16

8K+ Views

Introduction There may be times when you need to remove the last few lines of a file on Linux. For example, you may have a log file that is constantly being added and you want to keep only the most recent entries. In this tutorial, we'll explore a few different methods to remove the last N lines of a file on Linux. Use the head and tail commands The head and tail commands are two very useful utilities for displaying the beginning and end of a file, respectively. By combining these commands, we can easily remove the last N lines ... Read More

Extracting a WAR File in Linux

Pradeep Jhuriya
Updated on 25-Jan-2023 10:33:04

10K+ Views

Introduction WAR (Web ARchive) files are a type of archive file used to package web applications into a single file. They are similar to Java ARchive (JAR) files and are typically used to deploy web applications in a Java environment. In this article, we will learn how to extract a WAR file on Linux using the command line. A WAR file is essentially a ZIP file that contains all the files needed for a web application, including HTML, CSS, JavaScript, and Java files. Checking out a WAR file allows you to access the individual files it contains and make changes ... Read More

Advertisements