Tag: Linux

Rocky Linux is Ready to Download

After months of waiting and after refreshing the twitter feeds, news groups, Reddit, and Rocky Linux homepage, Rocky Linux is now available for download.  DistroWatch.com doesn’t even have it listed yet as it is so new. While it is a Release Candidate, it is only hours old at the time of this writing 7:32 AM on May 1, 2021!  I…

Read More »

Disk Full Error: Cannot logon via SSH

The issue is that there may be a policy in place to prevent logons if there is any mount that is full.  There are a couple of approaches towards resolution.  Both approaches require a system shutdown.  One approach requires access to the ISO, which leaves a plausible solution. reboot Hit CTL+X to edit the boot kernel ##CHECK THIS ONE, MIGHT…

Read More »

How to add desktop icons on CentOS 7

For the most part, I prefer to work using the terminal on a minimal install of Linux; however, there are those occasional times where the GUI is necessary.  Recently faced with having to add a few desktop shortcuts to the Desktop posed a bit of a problem for me. Basically, wanted to achieve two things, a Desktop icon to launch…

Read More »

Linux: How to logout a user

A user was logged in via XRDP and the screen locked.  Each attempt to logon also resulted in a locked screen.  Rebooting is not an option.  There needed to be a way to identify the user and forcibly log them off, and there is. Logged on as root and typing the who command lists users and logons.  A great working…

Read More »

Reduce the number of commands with sed

Suppose there is a situation that a server has multiple files that are nearly identical and you want to remove content from them.  In this example suppose that server has multiple NIC cards.  There is content that needs to be deleted. The situation, you have five NIC cards.  Each ifcfg-ethx config file contains the values for NM_CONTROLLED, HWADDR, GATEWAY, and…

Read More »

“cannot set user id: Resource temporarily unavailable” [Resolved]

There are several servers that seemed to be setup identically with a local user account called user1 which may be found using getent passwd user1. However, for one reason or another, the account had become inaccessible and returned an error. Although a reboot of the CentOS 6 server resolved the issue, I wanted to know more. It is Linux after…

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 »

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 »

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 »

Linux: Running Processes Display UID instead of Username

Running the command ps to display a list of currently running processes may display a UID instead of the username. There is a reasonable explanation for that. An example command may look like this May return something like 501 28373 15080 0 … You may have expected a return like thisismyuser 28373 15080 0 … This behavior occurs because: Why…

Read More »

Group Permissions Look Good But Permission Denied

A situation existed where a user needed access to a CentOS 6 server to provide support for a specific application. This application is associated with a unique username to that application. For the sake of argument, an application xyz has a user xyz which automatically puts that user in a group of the same name, xyz. The additional user whom…

Read More »

Check Hard Drive Performance in Linux with hdparm

There are many tools to check the hard drive performance on Linux system. Here we are are concentrating on hdparm. A CentOS 6.7 Linux distribution is what is being used for this article. To install it, yum install -y hdparm. A sample run, hdparm -Tt /dev/sda The man pages (man hdparm) will offer many different configuration options, the two switches…

Read More »

Interesting Results when using cat with grep vs only grep

A typical situation is one where there is a directory that contains many files. Maybe 100s of files or more. Searching through however many files for a specific string can get annoying, however, here are a couple of ways to do just that. Note that there are many more, but this really isn’t the point of this article. A use…

Read More »

Install htop as a top Alternative

htop, an interactive process viewer for Linux. It is a text-mode application (for console or X terminals). It is a powerful alternative to using the top command. Here is a little script to install htop, which can easily be applied to any number of other simple installs too. After creating the script and making it an executable, run the script…

Read More »
MySQL

MySQL Disable Bin Logging

One of the MySQL servers was running out of space, it turned out to be over 7GB of bin logs filling up the hard drive rather quickly. Since this server is not replicating, then a few modifications to the my.ini or my.cnf file will disable this “feature”. Edit the my.cnf file. Yours may be somewhere so search for it with…

Read More »