How Do You Install SonarQube on a Red Hat Distribution of Linux?

Problem scenario
You have a Red Hat distribution of Linux (e.g., CentOS/RHEL/Fedora).  How do you install SonarQube?

Solution

Prerequisites
Install the Java Development Kit so you can later take advantage of plugins.  If you need assistance with this, see this link.

Procedures
For future reference, at some point the “9.6”s you see below will have to be incremented to a newer version of PostgreSQL. 

How Is the Password Set for a Challenge for a Password from a “git clone git@…” command?

Problem scenario
A “git clone git@…” command prompts the user for a password.  What is the password or how is it set?

Solution
The authentication for such a git command is usually done by the individual servers not through Git itself.  You should go to the server with the source repository, and run this to change the password to something you know:

sudo passwd git

Alternatively you could change the owner and group of the .git file or the permissions of the git file.

Why Do Linux Commands Not Work when They Work as Part of a Python Program with the subprocess.check_output Invocation?

Problem scenario
You are trying to debug a Python program that uses shell (or Bash) commands.  The shell or Bash commands work when they are called with Python’s subprocess.check_output.  They do not work when called directly from the Linux command prompt.  What is wrong?

Possible solutions
Normally I.T. professionals can get the Linux (Bash or shell) commands to work without as many moving parts.  In some instances the Python script that executes the Bash commands seem to help the reliability of the commands. 

How Do You Run a Groovy Program on a Debian or Ubuntu Server?

Problem scenario
You want to use a Java Virtual Machine language on an Ubuntu Linux server.  You want to test out the language too.  What should you do?

Prerequisites
Install Groovy version 1; this command should work:  sudo apt-get -y update; sudo apt-get -y install groovy

Procedures
1.  Create a file called hello.groovy with the following five lines:

class Example {
static void main(String[] args) {
println(‘Hello World’); …

How Do You Troubleshoot the Message “/usr/bin/mongodb/bin/mongod: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory”?

Problem scenario
You are using a Red Hat derivative of Linux (e.g., CentOS/RHEL/Fedora).  When trying to run a mongod command you receive this message: “/usr/bin/mongodb/bin/mongod: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory”.

What should you do?

Solution
Get different installation media.  If you try to install a .tgz file for Ubuntu on CentOS/RHEL/Fedora, you will get this message. 

How Do You Troubleshoot a C Program Displaying the Error “Segmentation fault” at Run Time?

Problem scenario
Your C program compiles.  But you get the error “Segmentation fault.”  You expect the value of a variable to be printed.  How do you get the value to be printed without this error?

Solution
Does every print function print?  If one print function seems to be displaying the “Segmentation fault” error, look closely at the syntax thereof.  Here is a line that will produce this error:

  

How Do You Fix a Non-Terminating (Hanging) Command Such as “git push origin master” ?

Problem scenario
The command “git push origin master” hangs. What should you do?

Solution
Cancel the job with ctrl-c.  (Hold the “Control” key and tap the “C” key.)

For the target .git repository, does the file have the owner and group associated with the “git” user?

If you used the git user in the “git clone” command (as in “git clone @…”) but then changed the owner and group of the .git repository to something else,

Can the Kernel Access Hardware Directly?

Question
Can the kernel, or code running in it, access hardware directly?

Answer
Yes. 

kernelspace lives in RAM (or memory) (1).  Code that is processing in kernelspace can fully access other processes in memory or fully access hardware directly (1).

The kernel governs hardware utilization via drivers, memory, disk space, memory and CPU (1).

In RedHat distributions of Linux (including CentOS and Fedora) userspace exists in RAM (or memory) (2). 

How Do You Deal with the Python Error “IndexError: pop index out of range”?

Problem scenario
You have a Python list with n items.  You are getting a “IndexError: pop index out of range” error.  The order that these lists are being printed (used or displayed) is not what you expect.  Your program prints the entire list initially, so you know what to expect.  This IndexError and the order of the items being displayed is not what you expect.  Here is an example:

print(fun_list)
[‘item1’,

How Do You Get hdfs or Yarn to Start the Jps Process You Expect to Start?

Problem scenario
You use start-dfs.sh and start-yarn.sh and there are no errors.  They seem to work, but when you use the jps command, you do not see the service you expect.  Why isn’t a jps process starting when you run one of these scripts?

Solution
The root cause could be a variety of root causes.  Here are some potential solutions.

1.  In these files, is there an all uppercase stanza like one or both of the following?