How Do You Configure HeidiSQL to Work with Postgres?

Problem scenario
You have a Windows desktop computer with HeidiSQL installed on it. You have a Linux server with Postgres installed on it.  How do you get your SQL front end (e.g., Hiedi SQL), to work with the Postgres database?

Solution
Part 1 / From the back end:
1.
  Modify this file /etc/postgresql/9.5/main/postgresql.conf so this stanza is not commented out:
listen_addresses = ‘localhost’ 

# Make sure in the quotes there is a space and then the external IP address of the Postgres server.

 » Read more..

How Do You Troubleshoot this Error “java.lang.ClassNotFoundException: com.mysql.jdbc.Driver”?

Problem scenario
In Linux you are trying to run a Java program that connects to a MySQL database. The program compiles, but it does not run. You get this error: “java.lang.ClassNotFoundException: com.mysql.jdbc.Driver” What should you do?

Solution

1. Set the CLASSPATH variable in two steps. First set it to where the .class file is for the Java file you are running. If the .class file of the program you are running is in /home/jdoe/javaprograms run this command:

export CLASSPATH=/home/jdoe/javaprograms

2.

 » Read more..

What is a Jenkins Project?

Question
With the CI/CD pipeline, you hear about projects in the context of Jenkins. What is a Jenkins project?

Answer
A Jenkins project is a job. However, the term “job” is no longer used. Jenkins’ website defines a project as this: “A user-configured description of work which Jenkins should perform, such as building a piece of software, etc.” Taken from Jenkins’ website.

 » Read more..

How Do You Troubleshoot The Message “Error from server (NotFound): the server could not find the requested resource”?

Updated 9/20/19

Problem scenario
You run the kubectl command. You receive “Error from server (NotFound): the server could not find the requested resource.” How do you resolve this?

Solution
1.a. Run this command: kubectl version | grep Version

Look at the GitVersion values for the client and server. They should match or nearly match. (You do not necessarily want the latest version for the client.

 » Read more..

What is a Jenkins Node?

Question
You have read about Jenkins nodes. Cloudbees uses the term.

You have heard of the term “Jenkins slave” servers (which are configured to use their CPU and RAM according to the main Jenkins server’s needs). What is a Jenkins node?

Answer
A Jenkins node is a Jenkins slave server.

The main Jenkins website defines a node as “A machine which is part of the Jenkins environment and capable of executing Pipelines or Projects.

 » Read more..

How Do You Troubleshoot the Python Message “ImportError: No module named setuptools”?

Problem scenario
You try to run sudo python setup.py build but you encounter a problem. You get a message that says “ImportError: No module named setuptools”. What should you do?

Solution
If you are running Debian/Ubuntu Linux, run this: sudo apt-get -y install python-setuptools

If you are running CentOS/RedHat/Fedora Linux, run this: sudo yum -y install python-setuptools

 » Read more..

How Do You Get Apache Tomcat to Work from the Source Installation Media?

Problem scenario(s)
One of the following problems apply.

1. You are trying to start Tomcat on Linux (e.g., with bash catalina.sh start) and you get this error:

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:262)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:444)

* OR *
2. You have nothing installed on Linux yet. You want to install Apache Tomcat from the source (not binary) installation media here.

 » Read more..

How Do You Troubleshoot no_manifest Being Returned by a “puppet master –configprint manifest” Command?

Problem scenario

From the Puppet master server you run this command: puppet master –configprint manifest

But it returns “no_manifest”

Manifests are working. Puppet agent nodes are receiving the changes of manifests on the Puppet master server.

This command seems to work perfectly (except for the manifest line): puppet master –configprint all

What is wrong?

Solution

Possible solution #1
The root cause could be a permissions issue.

 » Read more..

How Do You Install Katello (and Foreman) on a Linux Server?

Problem scenario
You have heard of a Foreman plugin called Katello that supports Red Hat subscription and repository management. Katello supports other plugins such as Pulp (for downloading content) and Candlepin (for managing the meta aspects of the subscriptions themselves). How do you install Katello?

Solution
Warning 1: This works for CentOS. It may work for Fedora. It will not work for RHEL;

 » Read more..

How Do You Install AppArmor on a Debian or Ubuntu Linux server?

Problem scenario
You want to protect your Debian/Ubuntu Linux server. You do not want to run SELinux. What should you do?

Solution
Run this command:
sudo apt install apparmor-profiles

Check the status with this command:
sudo apparmor_status

You are done. If you want to learn more go to this site.

 » Read more..