Educating the world

Our blog has over 10,000 readers a month

Yum installing from EPEL repository on CentOS

July 24th, 2013

EPEL stands for Extra Packages for Enterprise Linux. It contains open source projects compiled up for many versions of the Red Hat distribution, like CentOS.

Follow these instructions to allow yum install to select packages from the EPEL repository.

First we need to find out a few things about our system:

[root@mrn ~]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m

[root@mrn ~]# uname -a
Linux mrn 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

We now know that we are using major version number 6 on x86_64.

It’s very likely that we will need to update our security keys in order to install the latest EPEL repository RPM, so let’s do that first.

Navigate to http://dl.fedoraproject.org/pub/epel/ and get the RPM-GPG-KEY-EPEL file for your major version number, in my case RPM-GPG-KEY-EPEL-6.

wget http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6

Move it into position:

mv RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/

And import:

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Keys are in, so lets get a copy of the latest catalogue.

Navigate to http://download.fedoraproject.org/pub/epel/6/x86_64/repoview/epel-release.html where 6 is the operating system major number and x86_64 is the platform architecture. You can go from http://download.fedoraproject.org/pub/epel/ if it’s simpler.

There will be a link to the latest version of the epel-release-6-?.noarch. Install it.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

Now check that it has worked:

[root@mrn tmp]# yum repolist
repo id   repo name                                      status
base      CentOS-6 - Base                                6,381
epel      Extra Packages for Enterprise Linux 6 - x86_64 9,341
extras    CentOS-6 - Extras                                 13
updates   CentOS-6 - Updates                             1,023
repolist: 16,758

Finally, list all the packages available at that repository:

yum –disablerepo="*” –enablerepo="epel” list available

Nepal Day 3 - Swayambhunath, Kumari, Patan

July 19th, 2013

Left at 9am to Swayambhunath the Monkey temple. Not as many beggars as I thought. There was a fountain at the foot of the temple and it was said that if you could throw a coin into the jar held by the statue in the centre then it was better luck than just blindly throwing it in. I had some Indian rupees left over from Mumbai airport so I used them. One missed and the other bounced off the rim - so close.

Angel Holidays, or more Steve, had links with all sorts of institutions and so we picked up the Professor of Hindu Studies at Kathmandu University to be our history/tour guide. We got back on the coach and headed for Patan the home of the Kumari. Matina Shakya is the current living goddess but she was having lunch! So we had to come back later. Had lunch in restaurant overlooking the square. Waiters short changed us by 100rs but we didn’t mind cos it’s only 60p and we felt that they needed it more. Sadly this did seem to be a bit too common in the tourist areas of Kathmandu. Lunch was nice though.

There was a festival going on in Lalitpur which is a district of Kathmandu famous for its schools, to promote the educational establishments. The stalls were showcasing their courses with demonstrations by the students of robotics and other disciplines. A band played some pretty decent rock music and we even saw someone selling 1MB broadband. It wasn’t characteristic of a poor country at all, more of a country reaching up.

Rickshaw ride to the coach was definitely a highlight of the day. They had horns made from squizzy bottles. Travelling in convoy, but when the road widened it became a race. Overtaking, undertaking, leaning into the turns then straight out into a main road of busy traffic. I thought that our number was up, but we narrowly avoided getting killed as the buses slammed their breaks on! In spite of that it was excellent fun, so we gave our driver a decent tip of 100rs (1 pound!)

We all ate out again as a group. Had a really nice pizza in a chain restaurant. Steve had coined it “last chance for a proper pizza". It wasn’t but it was a nice excuse. Early night as it’s the Everest flight tomorrow.

Photos on my FaceBook page.

Nepal Day 2 - Kathmandu

July 18th, 2013

Woke up at 2am, but didn’t have any problem getting back to sleep. Slept all the way to 9am when I showered and went down for breakfast. Chopped melon with yoghurt, a croissant, a boiled egg and a coffee.

At 10.30 met up with the other new arrivals and headed into Kathmandu. Steve showed us some nice places to eat, where the palace was and the Garden of Dreams. All 10 of us went to Pilgrims, a book shop that backed onto a coffee shop. Most of us had lime juice with soda water, very refreshing. Afterwards Steve and Pabi left and we were on our own.

Rob and I thought that the Garden of Dreams looked nice so we went there. It was an old colonial building that had been neglected and vandalise when the king left. The city had been restoring it over the last couple of years and it was lovely. They had repaired all the plaster garden furniture and buildings and were now working on part of the grass around the main pagoda. There were several water installations including cascading water features and goldfish ponds. It looked like a place where couples go as it was very quiet compared to the hustle and bustle behind the walls.

I sat in the bar and chatted to a Canadian girl who had already been hear for 2 weeks and was leaving in a few days. I had lime yoghurt cake and a coke which came to 435rs - a bit pricey but I think they are trying to fully restore the gardens.

Rob and I decided to walk back but got a bit lost. We ended up walking through a very deprived area, which in the story telling that followed we nicknamed The Shades. Derelict buildings and poverty everywhere but it wasn’t intimidating or scary at all.

At the beginning of the holiday I suffered with cow blindness. I could not see the large groups of cows standing in the middle of the road, Rob had to point them out. We joked that my mind couldn’t believe there was a huge herd of cows in the middle of town with cars overtaking, undertaking them and in some cases driving into them.

If you kill a cow you get 12 years in prison so they roamed free in the towns. The locals just let them do whatever they want.

We eventually hit the holly Bagmati River and followed it back to our bridge. To say the river was a bit dirty would be a massive understatement. Open sewers ran into the river and it was full of rubbish and it stunk to high heaven. It was a shame really because it would have been quite nice.

We passed a place of worship and popped in for a look. It stunk too! There appeared to be a load of men in the back sitting around doing nothing. There was rotting food laid out on the floor and areas where things had been burned. Big things! Maybe even people. It wasn’t particularly nice.

Eventually made it back to the hotel and sat on the roof garden with the others while they sunbathed and read.

Everyone had arrived but the holiday didn’t officially start until tomorrow. Steve took us out to a climber’s restaurant called Rum Doodle.

Pabi sorted out 2 taxies to take us all over to the restaurant and agreed a price with them. One of the taxi drivers tried to change the price when we arrived. It was quite a shock to see Pabi taking him down (verbally). Cute as a button but don’t try and pull one over on her.

The restaurant was named after a book called The Ascent of Rum Doodle which was a short 1956 novel by W. E. Bowman (1911–1985) that parodied non-fictional chronicles of mountaineering expeditions in the 20s and 30s. A couple of the people of the group bought the book and spent the next couple of days chuckling from behind its covers.

Each climbing expedition that came to the Himalayas ate here at the end of their visit. They all wrote the names on a foot which hung from the ceiling. While we were there we were blest with a visit from Carina Räihä who was the first Finnish woman to ascend Mount Everest.

We had been drinking Rum Doodle cocktails all night and weren’t used to the increased altitude so when Steve offered to show us some of the night life, everyone just wanted to go to bed!

Photos on my FaceBook page.

Nepal Day 1 - Heathrow, Mumbai, Kathmandu

July 17th, 2013

On the 29 March 2013 I caught a flight from London Heathrow to Mumbai with Jet Airways. They were late setting off but I wasn’t worried because I only had a 10 hour stop over waiting for me.

When we tried to enter the transit area of the airport we where told we couldn’t enter because of blar, blar, blar so we sat on the floor waiting for something to happen. I was there for about an hour but it gave me a chance to vet the other passengers and find out who else was going to Kathmandu.

I formed a little support group of other Kathmandu‘ers. Although 10 hours sounds a lot you’d be surprise how quickly it goes when you are trying to get to know 3 new people. Rachel a student doctor on an elective. Jen, who had helped out at the Olympics was visiting some friends. She was a strange new age young woman who lived in a van. Also visiting friends was an accountant.

Mumbai airport was okay for shopping, although we did think that $20 (US) for 4 cups of tea was a bit steep. It was also full of mosquitoes which made it feel dirty. I don’t think I’ll transit through Mumbai again.

On arriving at Kathmandu Airport I had to go through immigration. I sorted out my Nepalese visa when I was in England so I joined the queue with 3 people in it, instead of the queue with 300!

The Angel Holiday notes said that I’d be attacked by taxi drivers the moment I stepped outside. So I used an old tourist trick. I hovered inside the entrance and waited for a patsy. An arguing couple came along and so I let them go ahead of me. The herd of taxi drivers took the bait. I skirted around the outside and exited to the cacophony of cars and people.

While I was distracted by the myriad of signs being flashed at me, a stooped man tried to take my bag. When I turned to look what was going on he said, “I carry your bags". I’d just caught sight of the Angel Holiday’s sign, so thanked him and hastily headed over to it. The crazed porter followed me saying “I carry, I carry". The funniest part was when I got to the taxi, he wanted a tip, for doing nothing!!

Pabi was a delightful young woman whose calm demeanour put me at ease. One thing I immediately noticed was that there wasn’t a single car that didn’t have a considerable amount of damage. Pabi sat in the front and I tried to sort out the seat belt in the back, it’s safety first with me! It was hidden behind the seat so the taxi driver disassembled the car and dug it out. The clicker didn’t click anyway so it was useless!

The drive was amazing, frightening, extremely dusty and bumpy. Did I say bumpy? Really, really bumpy, there was no road for some of the journey. The smell fluctuated between in car air freshener, dust, more dust, sewage, more sewage, I’m gagging in the smell sewage to cooking.

Pabi pointed out various sights as we weaved through the traffic. The hotel was about 30 minutes so I listened to her giving the tourist spiel and enjoyed the spectacle of Kathmandu.

The hotel was lovely and seemed very separate from the world outside. It felt nice and safe. Pabi had put Jon and I together for room sharing. He was coming tomorrow so I picked the bed by the window. After unpacking, despatching an enormous cockroach in the bathroom and showering I headed back to the reception to see if I could find any of other Angel Holidayers.

Steve, the operator of the tour, was sitting in the garden doing his emails. Spent most of the afternoon chatting to him. He was a Welsh documentary broadcaster for the Beeb and was very well travelled with plenty of funny observations.

Towards the end of the afternoon Clare, Lisa and Simon came back from town. Clare and Lisa were fellow City Socialisers from Reading and Simon was a tall Mancunian, a few years younger than me who loved flowery shirts, music and spiritualness.

Steve had been going on all afternoon about the steak that the restaurant in the hotel cooks. I was staying in for the first night as I’d been watching films on the journey over instead of sleeping.

We all sat in the terrace bar overlooking Kathmandu for the evening and headed to the restaurant when the sun went down. I took Steve’s advice and I have to say it was pretty bad, not what I had been lead to believe. All my friends had said don’t eat the meat, just go vegetarian for your trip, so I was just happy to be able to ignore the advice.

Back to the terrace bar to play who can stay awake the longest. Several beers later and Rob and I are trying to explain to the girls how time travel is possible, according to the theory of relativity, don’t ask me how that came up.

Photos on my FaceBook page.

Installing Oracle Java 8 on Raspbian wheezy

July 16th, 2013

I had great trouble installing Oracle Java on my Raspberry Pi due to the liblji.so problem. The main Raspberry documentation tells you that you must use the soft-floating point (SFP) version of “wheezy” in order to run Oracle Java as it doesn’t have a version compiled for using the hardware floating-point (i.e. normal Raspbian).

It was only after I had re-installed everything using the software-floating point
versions (see Installing Oracle Java 7 on Raspbian wheezy) that I stumbled across a forum post that said there was a beta of Oracle Java 8 bundled with the JavaFX libraries that was compiled using the normal hardware floating point.

So here are the instructions for that.

  1. Using the instructions Installing and setting up a Raspberry Pi, install Raspbian “wheezy”, 2013-05-25-wheezy-raspbian (at the time of writing).
  2. Navigate to the JDK 8 Early Access Releases, accept the agreement and download the Linux ARM HardFP.
  3. Copy the file to the Raspberry Pi (from the command line).

    scp jdk-8-ea-b97-linux-arm-vfp-hflt-03_jul_2013.tar.gz pi@192.168.0.69:/home/pi

  4. Open a session to the Raspberry Pi.
  5. Do my sudo bash trick again to open a root shell. This will stop us having to write sudo in front of everything. It also has the handy benefit of separating the history of your sessions with extraneous commands that you wouldn’t normally use.
  6. Also there now! Create somewhere for Oracle Java to live and uncompress the downloaded zip file.

    mkdir -p /opt/java
    cd /opt/java
    tar -xvzf /home/pi/jdk-8-ea-b97-linux-arm-vfp-hflt-03_jul_2013.tar.gz

  7. Now we’ll tell the system about the Oracle Java 8 installation. (Note double minus on the –install and ‐set).

    update-alternatives –install “/usr/bin/java” “java” “/opt/java/jdk1.8.0/bin/java” 1

  8. We must also tell the system that we want it to use this version of Oracle Java 8 by default.

    update-alternatives –set java /opt/java/jdk1.8.0/bin/java

  9. Now test:

    root@drswifty:/home/pi# java -version
    java version “1.8.0″
    Java™ SE Runtime Environment (build 1.8.0)
    Java HotSpot™ Client VM (build 25.0-b97, mixed mode)

  10. The Java that has been installed here is the Java Runtime Environment (JRE). So when you type java you’re getting the JRE version and not the Java Development Kit version and as a result you are not getting javac either. This is ok because all the applications on the platform will run under it. As developers we need the JDK version so we’ll have to rejig our PATH environment variable so it picks up the JDK’s version of Java before the JRE’s. Edit ~/.bashrc and add the following lines. (Note double minus on the –list)

    export JAVA_HOME=`update-alternatives –list java | sed ’s>/bin/java>>’`
    export PATH=$JAVA_HOME/bin:$PATH

  11. Log out and log back in again and you should now have access to the Java Development Kit and the compiler tools e.g. javac.
  12. Give yourself a pat on the back!