Earlier today while investigating the logs on a CentOS Linux server I noticed the btmp file had grown to over 5GB. I was curious to look into the log and when attempting to read the 5GB file using last I received an error since last will only handle files that are 2GB in size or less. So what needs to happen is to split the file into multiple pieces so they can be read via the last command. Below I describe the error in detail, how to resolve it by splitting the btmp file into multiple files, and then how to join them together if you need to read logs older than the last split file.
Installing the EPEL repository on CentOS Linux is easy to do so the below is simply a reference point if needed by anyone. EPEL stands for Extra Packages for Enterprise Linux and is a community based repository that was created for add-on Fedora Linux packages. There are many cases where installation instructions assume that the EPEL repo is already installed so if you run into an error because of a missing package or dependency package the EPEL repository is a great place to start. Below I have listed the i386(32-bit) and x86_64(64-bit) EPEL repository package list links which will allow you to easily verify that the packages you need are available before installing the EPEL repository. After the EPEL repository package list links there are separate commands listed to install the EPEL repository on 32-bit CentOS Linux 5.X and to install the EPEL repository on 64-bit CentOS Linux 5.X.
One of the annoying things about CentOS Linux is the current dependency on Python version 2.4. Typically I install Python version 2.6 and compile new programs using the 2.6 version of python instead of the 2.4 version. Recently on a server I had just installed CentOS 5.4 on I had a dependency issue when attempting to install python version 2.6 from the CHL repository. Below I display the error and describe how to install the libffi package on CentOS Linux.
I was messing around with the CPAN the Perl world wide archive of resources earlier today and it was asking for the default location of ncftpget. By default this is no longer installed on CentOS so you will first need to install the EPEL repository and then install NCFTP using yum. Follow the directions below to install ncftp which includes ncftpput, ncftpget, ncftpbatch, ncftpspooler, and more.
I recently was installing Django for a test project and needed to upgrade Python on a CentOS server to 2.6. The current revisions available via yum on CentOS are 2.4. The yum package manager requires Python 2.4 still to function properly so upgrading Python to 2.6 manually will break the CentOS yum package manager. After a little bit of research I found a yum repository that would allow you to install Python version 2.6 in parallel to Python version 2.4. Below I explain how to install the new Python version, not break the yum package manager, and modify a Django project that references Python to use the 2.6 version instead of the 2.4 version.