Instaling pip command on CentOS

Enable the epel repository and run:

yum install python-pip to get:

yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nexcess.net
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: centos.sonn.com
 * updates: centos.sonn.com
Resolving Dependencies
--> Running transaction check
---> Package python-pip.noarch 0:7.1.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

Rename network interface back to old "eth0" on Fedora/RHEL/CentOS

The easiest way to restore the old way Kernel/modules/udev rename your ethernet interfaces is supplying these kernel parameters to Fedora 19:


To do so follow this steps:

  1. Edit /etc/default/grub
  2. At the end of GRUB_CMDLINE_LINUX line append "net.ifnames=0 biosdevname=0"
  3. Save the file
  4. Type "grub2-mkconfig -o /boot/grub2/grub.cfg"
  5. Type "reboot"

Removing the RAID metadata

If you see the “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda” error message during OS installation, then you need to remove the raid metadata the “classic” way:

dmraid -r -E /dev/sda
Do you really want to erase "pdc" ondisk metadata on /dev/sda ? [y/n] :

How to keep a detailed audit trail of what’s being done on your Linux systems

Intrusions can take place from both authorized (insiders) and unauthorized (outsiders) users. My personal experience shows that unhappy user can damage the system, especially when they have a shell access. Some users are little smart and removes history file (such as ~/.bash_history) but you can monitor all user executed commands.

Mdadm Cheat Sheet

Mdadm is the modern tool most Linux distributions use these days to manage software RAID arrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of software RAID and Linux in general, and it will just explain the commands line usage of mdadm. The examples bellow use RAID1, but they can be adapted for any RAID level the Linux kernel driver supports.

Create a bootable USB flash media drive for CentOS 7

On Mac OSX:

First go to http://isoredirect.centos.org/centos/7/isos/x86_64/ and select nearest to you source, click on it and then download image called CentOS-7-x86_64-Minimal-1611.iso

Older versions:

Finding out why a hard drive, member of software RAID 1, failed

Today we've received the following message from mdadm monitoring on one of our servers:

This is an automatically generated mail message from mdadm running on host.website.tld
A Fail event had been detected on md device /dev/md126.
It could be related to component device /dev/sda.
Faithfully yours, etc.
P.S. The /proc/mdstat file currently contains the following:
Personalities : [raid1] 
md126 : active raid1 sda[1](F) sdb[0]
     1953511424 blocks super external:/md0/0 [2/1] [_U]
md0 : inactive sda[1](S) sdb[0](S)
     6056 blocks super external:imsm

Disable Named in chroot and remove chroot partition

The recent versions of bind recommends the chroot environment for better security. When considering the most used popular Linux distribution ‘Red Hat’, they ship a package called ‘bind-chroot’ for the chrooting of bind. By default the bind or named daemon runs in a chroot environment.

But users who want to run ‘named’ in the old fashion may do so by disabling the ‘chroot’ environment. The ‘chroot’ing feature can be disabled by commenting out the directive ‘ROOTDIR=/var/named/chroot’ in the file ‘/etc/sysconfig/named’ and then restarting the ‘named’ service.

df -h

How to install IonCube loader on CentOS 6.3

Download and uncompress the latest IonCube version:

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz # 32 bit
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz # 64 bit
tar xvfz ioncube_loaders_lin_x86-64.tar.gz

Then we go to the new IonCube source directory:
 cd ioncube/

Move ioncube_loader_lin_5.3.so:
 mv ioncube_loader_lin_5.3.so /usr/lib/php/modules/

Now edit /etc/php.ini and add the line zend_extension = /usr/lib/php/modules/ioncube_loader_lin_5.3.so

Another MySQL daemon already running with the same unix socket.

After upgrading to CentOS 5.6 MySQL deamon on my server didn't want to start complaining about Another MySQL daemon already running with the same unix socket. Firing up service mysqld restart didn't help. So I had to

rm -rf /var/lib/mysql/mysql.sock
service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

Syndicate content