Tag: Linux

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 »

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. Install the yum-utils package. Check your running version. Linux server01 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64...

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. Import OpenVZ GPG key. Install OpenVZ Modify the…

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. http://yourdmain.com/webmail/?admin...

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 »