3 Most Important Steps to Running Supervisord on Docker Ubuntu 18.04

Have you ever wanted to keep a docker container running in the background of your host machine, without the need for a bash entry-point?

Let’s get started installing ubuntu and configuring our instance.

Your Ubuntu 18.04 docker image will require a one-time configuration of Supervisord to get started with process monitoring.

Supervisord — A Process Control System, which will run and manage your command-based programs from a simple configuration file setup.

Install Ubuntu

Let’s first create a docker file to help install ubuntu from DockerHub.

FROM ubuntu:18.04
	RUN apt-get update && \
	    apt-get install -y supervisor && \
	    apt-get clean

	RUN mkdir -p /var/log/supervisor
	COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

	EXPOSE 8089

	CMD ["/usr/bin/supervisord"]

Supervisord

To create a long-running process ID on start-up, Supervisord needs to be installed on Ubuntu. The docker file will include a configuration file for Supervisord to read from the directory /etc/supervisor/conf.d/supervisord.conf

[supervisord]
	logfile=/var/log/supervisor/supervisord.log
	pidfile=/var/run/supervisord.pid
	nodaemon=true

You will be able to access a running docker container without the need for a _bash file _script running on start-up.

An example of a_ bash file_ script in docker would utilize an entry point of ENTRYPOINT ["/bin/bash", "/bootstrap.sh"]

This long-running process started in the background is created with the help of the command line tool “Supervisorctl”. This tool connects to a UNIX or TCP socket and initializes a “program” or “service” on the host machine.

Let’s look at the output log for clarity.

#docker-container #docker-run #supervisord #ubuntu

What is GEEK

Buddha Community

3 Most Important Steps to Running Supervisord on Docker Ubuntu 18.04

3 Most Important Steps to Running Supervisord on Docker Ubuntu 18.04

Have you ever wanted to keep a docker container running in the background of your host machine, without the need for a bash entry-point?

Let’s get started installing ubuntu and configuring our instance.

Your Ubuntu 18.04 docker image will require a one-time configuration of Supervisord to get started with process monitoring.

Supervisord — A Process Control System, which will run and manage your command-based programs from a simple configuration file setup.

Install Ubuntu

Let’s first create a docker file to help install ubuntu from DockerHub.

FROM ubuntu:18.04
	RUN apt-get update && \
	    apt-get install -y supervisor && \
	    apt-get clean

	RUN mkdir -p /var/log/supervisor
	COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

	EXPOSE 8089

	CMD ["/usr/bin/supervisord"]

Supervisord

To create a long-running process ID on start-up, Supervisord needs to be installed on Ubuntu. The docker file will include a configuration file for Supervisord to read from the directory /etc/supervisor/conf.d/supervisord.conf

[supervisord]
	logfile=/var/log/supervisor/supervisord.log
	pidfile=/var/run/supervisord.pid
	nodaemon=true

You will be able to access a running docker container without the need for a _bash file _script running on start-up.

An example of a_ bash file_ script in docker would utilize an entry point of ENTRYPOINT ["/bin/bash", "/bootstrap.sh"]

This long-running process started in the background is created with the help of the command line tool “Supervisorctl”. This tool connects to a UNIX or TCP socket and initializes a “program” or “service” on the host machine.

Let’s look at the output log for clarity.

#docker-container #docker-run #supervisord #ubuntu

Alycia  Klein

Alycia Klein

1596719640

How To Install Jenkins on Ubuntu 20.04 / Ubuntu 18.04

Jenkins is an open-source automation server that helps to automate the repetitive tasks involved in the software development process, which includes building, testing, and deployments.

Jenkins was forked from the Oracle Hudson project and written in Java.

Here, we will see how to install Jenkins on Ubuntu 20.04 / Ubuntu 18.04.

Install Jenkins On Ubuntu 20.04

Install Java

Since Jenkins is written in Java, it requires Java 8 or Java 11 to run. Here, I will install the OpenJDK 11 for Jenkins installation.

sudo apt update

sudo apt install -y default-jre apt-transport-https wget

If you want to use the Oracle Java in place of OpenJDK, then use any one of the links to install it.

READ: How To Install Oracle Java on Ubuntu 20.04

READ: How To Install Oracle Java on Ubuntu 18.04

Verify the Java version after the installation.

java -version

Output:

openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

Add Jenkins Repository

Jenkins provides an official repository for its packages. To use the Jenkins repository, first, we will need to add the Jenkins public key to the system.

wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

Then, add the Jenkins repository to your system.

echo "deb https://pkg.jenkins.io/debian-stable binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list

Install Jenkins

Install Jenkins package using the apt command.

sudo apt update

sudo apt install -y jenkins

The Jenkins service should now be up and running. You can check the status of the Jenkins service using the below command.

sudo systemctl status jenkins

#ubuntu #jenkins #ubuntu 18.04 #ubuntu 20.04

Myriam  Rogahn

Myriam Rogahn

1599423060

How to Secure phpMyAdmin Access with Apache on Ubuntu 18.04

How to secure PHPMyAdmin login access in ubuntu apache on aws. Here, we will show you a simple 2 solution to secure PHPMyAdmin login in ubuntu apache on aws web server.

The first solution is to change the PHPMyAdmin login URL. And the second solution is add an extra security layer for access PHPMyAdmin login url in ubuntu 18.04 apache 2 on aws. And prevent the attacks.

Because by default, phpmyadmin login url is located on http:///phpmyadmin. So, The main reason of change phpmyadmin login url in ubuntu apache aws server to prevent attackers attack.

How to Secure phpMyAdmin with Apache 2 on Ubuntu 18.04

Now, you can see the following two solutions to secure PHPMyAdmin login access in ubuntu apache 2 on aws server.

Solution 1 – Change PhpMyAdmin Login Page URL in Apache 2 Ubuntu

In ubuntu, default phpmyadmin login url can be located at apache configuration that name apache.conf.

So, you can use sudo nano /etc/phpmyadmin/apache.conf command to open apache.conf file:

sudo nano /etc/phpmyadmin/apache.conf

Then, you can add the following line with your phpmyadmin url:

Alias /my-phpmyadmin /usr/share/phpmyadmin

Note that, you can replace my-phpmyadmin to your own word.

Now you need to restart apache 2 web server. So type the following command on your ssh terminal to restart apache service:

sudo service apache2 restart

Solution 2 – Secure PHPMyAdmin Access in ubuntu aws

Now, you can add extra security layer for access phpmyadmin login in ubuntu apache 2 on aws web server.

So, first of all, you need to create a password file with users using the htpasswd tool that comes with the Apache package. So open your ssh terminal and type the following command:

sudo htpasswd -c /etc/phpmyadmin/.htpasswd

Note that, You can choose any username instance of myAdmin with above command.

After that, one prompt box appear with password and confirm password. So, you can add password and confirm password here.

New password:
Re-type new password:
Adding password for user myAdmin

Now, you need to configure Apache 2 to password protect the phpMyAdmin directory and use the .htpasswd file.

So, open your ssh terminal and type the below command to open the phpmyadmin.conf file.

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

Then add the following lines in phpmyadmin.conf file and save it:

Options  +FollowSymLinks +Multiviews +Indexes  ## edit this line
DirectoryIndex index.php

AllowOverride None
AuthType basic
AuthName "Authentication Required"
AuthUserFile /etc/phpmyadmin/.htpasswd
Require valid-user

Finally, restart apache web server by using the following command:

sudo service apache2 restart

#aws #mysql #ubuntu #how to change and secure default phpmyadmin login url ubuntu #how to change phpmyadmin login url ubuntu 18.04 #how to secure phpmyadmin access #how to secure phpmyadmin access with apache on ubuntu 18.04

Shawn  Pieterse

Shawn Pieterse

1625711252

Installing PHP 8.0 on Ubuntu 20.04 and Ubuntu 18.04

Add PHP Repository

  • Update the repository cache.
  • Install the below packages.
  • Add the repository to your system.
  • Update the repository index.

Install PHP
Install PHP 8.0 on Ubuntu 20.04 / Ubuntu 18.04
Install PHP 7.x on Ubuntu 20.04 / Ubuntu 18.04
Verify PHP Version
PHP Support for Web Server
Both Apache and Nginx do not support PHP language by default when the browser requests the PHP page. So, we need to install the PHP module package to support PHP.

#ubuntu #php 8.0 #ubuntu 20.04 #ubuntu 18.04

Linux Tutorial

1599543060

How To Install Nvidia Drivers On Ubuntu 20.04 / Ubuntu 18.04 | ITzGeek

All Desktops and Laptops come with a graphics card for displaying images over a monitor. Graphics cards either come with a system board or attached to the system board via a PCI-E slot. Nvidia and AMD manufactured graphics cards are the most commonly used graphics cards in laptops or desktops.

Here, we will see how to install Nvidia drivers on Ubuntu 20.04/Ubuntu 18.04.

#ubuntu #nvidia #ubuntu 18.04 #ubuntu 20.04