Category: Linux

How to Build a Better haproxy RPM

There are several RPM builds of haproxy that can be found throughout the Internet.  There are GitHub repositories with customized .spec files to build your own RPM.  In fact, there is an haproxy.spec file that may be found in the official .tar.gz file under examples.  However, here is a unique way to build one as close to the original, haproxy-1.5.4-2.el6.rpm,…

Read More »

How to escape double quotes in sed

A recent attempt to replace a string within double quotes “string value” while using sed resulted in much trial and error. A quick Internet search revealed a working answer.  It is here for my reference. I wanted to replace “this value” with “that one” in a file, we’ll call testfile.  According to multiple sources, the sed command allows the use…

Read More »

Install VMware tools on CentOS

There is a great deal of material on this subject.  However, this guide is a simplistic one for my reference.  If anyone should find it useful, that would be great too. Here are the steps to install VMware tools on Linux CentOS 6 and Linux CentOS 7. CentOS 6: Install VMware tools From within the VMware  vSPhere Client: From within…

Read More »

RDP into CentOS 7 with XRDP

From the man page, xrdp is a remote desktop protocol (RDP) server. Unlike Windows, xrdp will not display a Windows desktop but an X window desktop to the user. To install on a CentOS 7 Linux box with a GUI installed, turns out to be quite simple. A prerequisite will be the EPEL repository. yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm Now that EPEL…

Read More »
MySQL

Change Forgotten root password in MySQL 5.7.10

After trying several iterations from multiple websites, a combined effort between them made it possible to change the root password to a MySQL install for MysQL 5.7.10 which has changed over the more recent versions.  Anyway, if you were unsuccessful using other approaches, maybe you found this because you didn’t give up.  Hopefully, it will work for you as it…

Read More »

ScreenFetch

ScreenFetch is a Bash Screenshot Information Tool, that generates terminal information and ASCII distribution logos.  After seeing it somewhere, I thought I would have to try it out.  I’m glad I did. There are several ways that this can be installed, here is one I elected to use. After ensuring that it runs, I updated the man page and added…

Read More »

Monitor multiple logs simultaneously

One way to monitor multiple logs simultaneous is to use tail.  Although this works, and works well, if the logs are modified frequently, they seem to scroll endlessly and messily.  What is meant by messily. As a log file is modified, it takes precedence over the previous log as it updates the terminal. One way around this is with multitail….

Read More »

Real time Web Log analyzer using GoAccess

Scrolling through log files is unrealistic.  Using ‘awk’, ‘grep’, ‘sed’, and ‘cut’ to parse through them can be quite a chore – and still has it’s place for specific searches.  However, here is an interesting tool called GoAccess.  GoAccess is a real time web log analyzer tool. Running a CentOS 6, minimal installation, to install. To use, for example to…

Read More »

Create an nginx load balancer

I wanted to play with a simple load balancer with powerful implications. A load balancer using nginx as the front end and two apache servers on the backend. server1 – apache – 192.168.1.89 (CentOS 6) yum -y install httpd echo server1 /var/www/html/index.html lokkit -s http -s https chkconfig httpd on && service httpd restart server2 – apache -192.168.1.90 (CentOS 6)…

Read More »

Install and upgrade nginx on CentOS6

Nginx is a web server. It can act as a reverse proxy server, as well as a load balancer and an HTTP cache. There was a need for an nginx reverse proxy (RP), so found a set of instructions that worked. However, after implementing those instructions, and getting everything configured, it was a determined a newer version of Nginx was…

Read More »

Another way to install Java JDK 8

I have written on and improved upon the installation process for Oracle’s Java JDK over the years.  Creating a script with a hard-coded filename has a considerable drawback, particularly as it pertains to Java JDK. Oracle updates their product often and with a naming convention that doesn’t permit for any reasonable guess as to what the next version should be. …

Read More »

Install DOSBox on CentOS 7

There are so many websites and YouTube videos that indicate and demonstrate that it is possible to install and use DOSBox on CentOS 7.  I tried many different things which all seemed to roadblock at the prerequisite for libSDL_sound-1.0.so.1. Ranging from building from source that one specific prerequisite, where the build was apparently successful, the prerequisite still remained.  A build…

Read More »

Create a man page

This little exercise is to create a man page.  The goal is to take a simple online man page that is in XML and copy into a text file.  Add a couple of markups here and there, test, and validate it. Create a manpage Additional examples and options are available on the author’s site, here.  I took that html page…

Read More »

Display Man pages in color

While learning about the creation of man pages, I came across something that I had not considered before, man page in color?  This can be done with a little installation of most. Using a CentOS 6 minimal install, most can be installed via yum. Add most to the environment. Check out the man pages in color. Source(s) https://www.cyberciti.biz/faq/unix-linux-color-man-pages-configuration/

Read More »

Using shc to compile a shell script

Not being a programmer, I do write a descent shell script from time to time.  In the Microsoft world, there are all sorts of script compilers that will compile a batch, visual basic, or any number of other scripts into an executable.  A benefit of an executable could be the files portability or even an attempt to obfuscate the code. …

Read More »

Msys2 a Cygwin alternative

Cygwin has served well over the years and still does; however, recently on a Microsoft Windows 10 computer, cygwin did not cooperate.  Removing all remnants and services related to cygwin and then reinstalling from scratch seemed to resolve any issue that I was encountering.  There was an issue that still remained that could not be fully resolved.  The issue, whenever…

Read More »