Creating a CentOS repository

This is just a quick howto on creating a CentOS repository with EPEL on CentOS.

First we need to have a webserver installed as we need to access the repository via http.
I am going to use Apache. On Redhat based systems the package is called httpd and on Debian it is Apache2.

Install Apache and rsync client
[root@logoff]# yum install httpd rsync
Start Apache
[root@logoff]# /etc/init.d/httpd start

The default directory for the DocumentRoot is under /var/www/html

Create the repository directory
[root@logoff]# mkdir -p /var/www/html/repo/CentOS
[root@logoff]# mkdir -p /var/www/html/repo/EPEL

Create the scripts directory
[root@logoff]# mkdir -p /opt/scripts

Create the CentOS mirror script
In your favourite editor add the following in /opt/scripts/


rsync="/usr/bin/rsync -avqHz --delete"

verlist="6 6.5"
baselist="SCL os updates extras isos centosplus contrib cr fasttrack xen4"

for ver in $verlist
for arch in $archlist
for base in $baselist
$rsync $remote $local/$ver/$base/$arch/

Make the script executable
[root@logoff]# chmod +x /opt/scripts/
Run the script
[root@logoff]# /opt/scripts/

Create the EPEL mirror script
In your favourite editor add the following in /opt/scripts/

#!/bin/bash /usr/bin/rsync -avqHz --exclude-from="/opt/scripts/epel_excludes.txt" --numeric-ids --delete --delete-after --delay-updates rsync:// /var/www/html/repo/EPEL/

Create the epel_excludes
In your favourite editor add the following in /opt/scripts/epel_excludes.txt


Make the script executable
[root@logoff]# chmod +x /opt/scripts/
Run the script
[root@logoff]# /opt/scripts/

Do note, this is extremely big. I have done 6 and 6.5 and it about 100GB
Once it has completed you can edit the following file on the client machine.
Replace the http://logoff part with your repository’s IP or dns name if you have set it up.


# CentOS-Base.repo
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.

name=CentOS-$releasever - Base

#released updates
name=CentOS-$releasever - Updates

#additional packages that may be useful
name=CentOS-$releasever - Extras

#additional packages that extend functionality of existing packages
name=CentOS-$releasever - CentosPlus

#contrib - packages by Centos Users
name=CentOS-$releasever - Contrib

name=CentOS-$releasever - SCL

name=CentOS-$releasever - cr

name=CentOS-$releasever - xen4

name=CentOS-$releasever - os

name=Extra Packages for Enterprise Linux 6 - $basearch

name=Extra Packages for Enterprise Linux 6 - $basearch - Source

Then run the following on the client machine:

[root@client]# yum update


Back to the books

I started working the first year I left school when one of my best friends gave me an opportunity to work for him. Being a computer geek at the time I couldn’t say no, so I took it with arms wide open. He introduced me to a wonderful thing called Unix. At the time I had no idea what the hell that was. Coming from only knowing windows this was challenging! When I say challenging, I mean the kids of today actually have it easy! We now have Google and a lot more resources and guides to help us. Back then we only had the operating system manual pages, the README files and books that you had to go buy!
Over the years I started to love open source software because it was free and you could do with it whatever you wanted! Those that knew Unix back then, most of the things you did was in the console unlike windows that you had a point and click interface.

I never did any qualifications, courses or anything. Everything I learnt was from hands on experience, friends, search engines, books, etc. I’ve never needed to study anything as I have been lucky enough to have been in companies that just saw my experience as enough. Over the years I have been a jack-of-all-trades in the sense that I never specialized in one aspect of I.T and am able to do most things, from setting up servers, be it web-servers, databases, DNS, etc, to creating websites, to writing some code, to creating networks, firewalls, storage servers and the list goes on. I’ve loved getting my hands dirty on every aspect I could! The past 2 years it has dawned on me that I want to get some sort of certificate or something that I want to do. Nothing out there really grabs my eye that is like WOW, I must do it! I mean Linux LPI, that’s so YAWN. Red Hat certification, you are limited to RedHat and maybe CentOS. I have considered maybe the Cisco route, but I realize I don’t like networking that much. I mean I love it, but it’s ok.

The past year or so I have been chatting to a friend who is big into I.T Security. He may not know, but I have always looked up to him as a mentor. I’ve loved the security side of I.T be it firewalls, securing a system, installing an IDS and analysing it and finding holes in systems and patching them up. Anyhoo, it got me thinking about studying. There is one certification I would love to get but it is pretty challenging and I have been scared shitless about it. CISSP (Certified Information Systems Security Professional). This is not an easy one to get as the requirements are daunting. I have forgotten what it is like to study! This is one reason why I am so scared! It’s not a month or two thing, this is a year or two thing depending how much I put into studying! Now, you can understand why! If I do this, I need to push myself!

Another certification I have been pondering about is the Puppet Professional Certification. Puppet is an automation software that helps manage infrastructure throughout its lifecycle, from provisioning and configuration to orchestration and reporting. I am not going to explain this in detail of course, but anyone in I.T would tell you that if you want to rather automate things in your environment rather than manual configuring things they would all tell you AUTOMATE! I know this is far different from the security aspect, but for me this also excites me.

So there you have it. I need a schedule and some motivation. If you have any tips for me please let me know!

Reinventing the wheel

So many of you may have been wondering what’s happened to me and why I stopped posting here well…

I have been blogging since 2005. I first started out on Xanga (I saw they redesigned the whole aspect of it) where I used that to vent my frustrations and it actually helped a lot! I then moved over to –> and then I finally moved it to Logoff.
My goal of blogging was to share some of my life moments, share funny videos and anything I found interesting. Towards the beginning of last year I found that many bloggers I followed would blog the same thing basically most of the time and it felt like I was wasting my time.
My last post was last year November and I decided to take a break.
During this year I have thought about what I wanted to do with my site to make it unique and see what direction I wanted to take it. The past month I’ve been thinking of making it a more technology based. So after a long year I think I am ready to pick this up and start something new. I see a goal, but to reach that goal I need to start somewhere and here I start. So expect more updates and cosmetic changes here the next couple of weeks!

My older posts are still going to be on this site of course, but I have decided to keep it out of the visible eye just to seem that it looks like a fresh clean blog again.

Thank you to those who have been following my blog over the years :)