Category: Linux

Remove Old Kernels on CentOS Linux and other distros

After a few years and many yum updates later, the hard drive begins to fill up. There may be many versions of the Linux kernel. Many of which may be removed and to do this the yum-utils package is needed. Pre-CentOS 8 Install the yum-utils package. yum install -y yum-utils Check your running version. [root@server01 opt]# uname -a Linux server01…

Read More »
MySQL

A Working MySQL Database Automatic CRON Backup Script

After creating a usable MySQL database backup script and having tested it throughly, I put it in the /etc/cron.daily directory where I had expected it to run automatically.  I had even tested it from that directory manually with success.  After some time had past, I realized that the script was running as it read in the logs; however had only…

Read More »
No Spam

Automatically Delete Emails Marked SPAM by Spamassassin

Great, so you have another service running on your Linux box. It’s main purpose is to intercept an email, run rules against it, and either mark it as spam or not. Either way, it sends the email through and you still have to deal with the message on the email client. From the email client, you could make the necessary…

Read More »
SpamAssassin Logo

Install SpamAssassin on CentOS 6

SpamAssassin is an e-mail spam filter which uses content-matching rules. For this install, CentOS 6.6 (64-bit) and Sendmail are used. Enable EPEL repository. One way is to download and install the EPEL repository. Another is to edit the /etc/yum.repos.d/epel.repo file and change enabled=0 to enabled=1 under the [epel] section. Yet another way to enable EPEL repository. Install Sendmail and spamassassin….

Read More »
OpenVZ Logo

Install OpenVZ and a CentOS Container

OpenVZ (Open Virtuozzo) is an operating system-level virtualization technology based on the Linux kernel and operating system. OpenVZ allows a physical server to run multiple isolated operating system instances, called containers, virtual private servers (VPSs), or virtual environments (VEs). OpenVZ is similar to FreeBSD jails and Solaris Containers. Download the OpenVZ repo. wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo Import OpenVZ GPG key….

Read More »
Rainloop

Install Rainloop Webmail on CentOS 6

Rainloop is an attractive webmail with a nice clean modern feel to it. After following several different installation procedures, I finally got a working copy. Assumptions: Apache has already been installed. Sendmail or Postfix is already installed correctly. Install Rainloop Create a configuration file for Apache. Restart or Reload Apache Logon to the admin control panel with default credentials. URL:…

Read More »
Speedtest

Command Line Testing Internet Bandwidth Using Python

Speedtest.net is a go to site for testing Internet speeds, which is usually accomplished through a web browser. There is a command line utility that offers the functionality without the need of a GUI or the web browser. To run the utility, type speedtest_cli.py. Here is an example of what one may expect to see. [root@localhost speedtest-cli-master]# speedtest_cli.py Retrieving speedtest.net…

Read More »
Speedtest

Network Speed Test for Linux

Have you ever wondered at what speed your network is really operating? There are several programs and utilities that are readily available. I have tested a couple, however, this one seems to be the easiest and very efficient. This was tested on a CentOS 7 server. From the server, which in this case is 10.10.10.10. From the client. A result…

Read More »
VMWare Logo

VMware Expand Hard Drive Size and Extend in CentOS Linux

One approach to adding space to an existing Linux hard drive that is using Linux LVM is to add space to the drive. This can easily be accomplished in VMware. This has been tested using VMware Workstation 9.0 for Windows with CentOS 6.5 (minimal install). To demonstrate a before and after, here are a few commands that can be used…

Read More »
Linux Logo

Linux: The Bash Bug Test and Fix

A bug which could allow for arbitrary code execution has been discovered, Red Hat alerted, and patches exist. So, I simple yum update should take care of things. However, Red Hat offers command line arguments which may be used to test for the vulnerability. Using the command issued below, different warnings may appear, however, the following result is one of…

Read More »
Linux Logo

One Way to “sysprep” a Linux Template to Clone

An anoyance with cloning a Linux virtual machine is that the /etc/sysconfig/network-scripts/ifcfg-eth0 file may contain a UUID and HWADDR which can be removed and the /etc/udev/rules.d/70-persistent-net.rules can be deleted or zero’ed out. So, here are the steps I use to create a “template”. After cloning the system, the first screen should be the option to set a root password. Since,…

Read More »
Linux Logo

Configure a Public Share with Samba on Centos 7 Linux

A CentOS7 Linux server was used to create Samba shares so that Windows clients of a home network may back up their stuff, resulting in one share with read write access. The ultimate goal was to create a Samba share that would act as if it were one of those off-the-shelf “solutions” like a Buffalo Linkstation, where no user password…

Read More »
Linux Logo

Use grep or awk to eliminate blank lines and comments

A configuration file, specifically, the /etc/samba/smb.conf file contains many lines of comments using both the simi-colon (“;“) and the hash (“#“) as well as many empty lines that are either blank or contain whitespace. Using grep to view the file without these lines is one way to do so. To write the correct command can be a bit more challenging….

Read More »
Linux Logo

Set the Envionrment Variable in CentOS through Best Practice

In the past, to make an environment variable perminant, I would append to the /etc/profile file the environment variable for JAVA_HOME for example and update the PATH. While this does work, it has recently come to my attention that a more appropriate and easier method exists which does not involve editing the /etc/profile file. For this example, the environment variable,…

Read More »
Linux Logo

Linux Centos 6 PYCURL ERROR 6 error RESOLVED!

A particular virtual machine running Linux CentOS 6.5 had been problematic when it came to yum updates. The result always ended with a PYCURL ERROR 6 – Couldn’t resolve host. After spending way too much time towards resolution, a solution finally came to light. The configuration of the system is a Linux CentOS 6.5 build with two network cards. One…

Read More »

Break the 2TB limit in Linux with gdisk

Without going into too much detail, for over 30 years the MBR has been the hard drive partition standard, which has a 2TB limit. GPT replaces MBR with one of it’s key benefits, exceeding the 2TB limit. While the fdisk tool is dated, there are several other tools that handle 2TB drives and beyond. gdisk One such tool, is gdisk,…

Read More »

[Resolved] Katello client returns 403 PYCURL errors when using yum

While testing a client connection to a Katello server, the client returns an error when any yum command is issued. The error is quite visible with [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 403 Forbidden”, however, it is not quite clear. While the environments will likely vary, this is the environment used for this test. Environment…

Read More »