Monday, September 8, 2014

Enable EPEL Repo on CentOS 5 and CentOS 6


What is the EPEL repo?

The EPEL (Extra Packages for Enterprise Linux) yum repository is an excellent source for additional packages for CentOS. Instead of having to compile applications that aren’t included in CentOS’ built-in repositories from source, EPEL can be used.
The EPEL repo is enabled by simply installing an RPM. Please use the command below to install the EPEL repository on your CentOS server. If you are unsure of your CentOS version or architecture, 

CentOS 6 – 32-bit

CentOS 6 – 64-bit

CentOS 5 – 32-bit

CentOS 5 – 64-bit

After running the above commands for your relevant CentOS version, the following file is created:
/etc/yum.repos.d/epel.repo
The above file can be edited directly to enable or disable the EPEL repo.

SSHFS: How to Mount Remote Partition via SSH on CentOS


We can easily mount a remote file system by using SSHFS.

1. Enable the EPEL repo

We will need to install a few packages that are not available in the standard CentOS repository. In order to do this, we must enable the EPEL repo.

2. Install FUSE and SSHFS packages

SSHFS uses FUSE (Filesystem in Userspace). Install the required packages:
1yum install fuse sshfs

 3. Load the FUSE module

1modprobe fuse
Confirm that the FUSE module is loaded:
1lsmod | grep fuse
2fuse                   84368  2
(Optional) Make sure the FUSE module is loaded upon a reboot:
1echo "modprobe fuse" >> /etc/rc.local

 4. Using SSHFS

Once the FUSE module is loaded, we can finally mount our remote partition using SSHFS:
1sshfs user@remote_host:/remote_directory /local_mount_partition
2sshfs root@1.2.3.4:/scripts /mnt
Note: SSHFS is not recommended for production, distributed file-systems. NFS is a better option, however, SSHFS can still be quite useful.