How Do You Set up a Send-Only Email (Postfix) Server on a Linux SUSE AWS Instance?

Problem scenario
You have a monitoring tool on a Linux server that needs to send out emails upon certain events happening. You want to install and configure an email server. You need to send outbound emails, but you do not need to receive inbound emails. How do you configure Linux SUSE to be able to send out regular emails over the internet?

Solution
1.

In Python How Is the List Function “remove” Different from “pop”?

Problem scenario
You want to know how remove is different from pop when manipulating a list in Python. What should you do?

Solution
Here are four facts which should help elucidate the differences.

  1. The remove keyword searches for a matching item in the list — not by its indexed, integer value; then the first matching item is removed.

How Do You Troubleshoot the nmap Results “Host seems down” when the Other Server is Not Down?

Problem scenario
Two servers have a specific incoming port open between them. But when you try nmap to test the port, you get a message like this:

Starting Nmap 7.60 ( https://nmap.org ) at 2019-10-08 19:57 UTC
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.04 seconds

What should you do?

How Do You Get the /var/log/mail File to Start Over?

Problem scenario
You want to search for activity associated with a given email address. You do not want to examine historical records because you made a configuration change. How do you eliminate the old records of the file and start over?

Solution
1. Make a back up of the file. (The commands below will eliminate the original copy.)
2. Run these four commands:

sudo su –
cd /var/log
mail
exit …

How Do You Find out What Packages You Can Install That Are Related to a Certain Category when Using CentOS/RedHat/Fedora Linux?

Problem scenario
You want to find what Java packages are available on the configured repositories of the RedHat distribution of Linux server you are using. What do you do?

Solution
Run a command like this: sudo yum list available | grep -i java

# Replace “java” above with the package you want to learn more about from the available options.

How Do You List the Repositories in GitHub for a Specific Organization without Using the Web UI?

Problem scenario
How do you use the GitHub API to list repositories for an organization?

Solution
Draft a command like this:

curl -u jdoe https://api.github.com/orgs/foobar/repos | grep git_commits_url

  • Change “jdoe” to the username of your GitHub account
  • Change “foobar” to the name of your organization

Why Does a PHP Program Call to a Python Program Work from the Back-End but Not from the Front-End?

Problem scenario
In your PHP program, the Python binary is executing regardless of how the PHP program is run (e.g., from a command line with the php command or when downloaded from a web browser). The PHP program will launch Python programs if the PHP program is invoked from the back-end with PHP. But Python programs are not being interpreted by Python when a web browser loads the PHP file.

How Do You Troubleshoot a Web UI Problem with GitLab?

Problem scenario
When you are using GitLab, you receive various 500 errors. The web UI is not working correctly. What should you do?

Possible solution #1
1. Go to the back-end of the GitLab server. Run this: sudo gitlab-ctl tail
2. Reproduce the web UI problems that you are having. Examine the output.

Possible solution #2
You may want to install Fiddler on your desktop to get more details about the front-end.