Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Friday, August 17, 2007

Downloading rpm packages using yum - part II

Once you have done the steps mentioned in my previous post then you are one step ahead of collecting all the packages you need to install the application on some other system.

But the problem is the sub-folders under the cachedir will contain previously download packages too and you have to manually separate out those downloaded in the previous yum install or update which is very tedious. I wrote a shell script to do just the job we need but it is not modeled to handle error conditions, so here are the steps you need to follow,
  1. first of all it is used to install a package and not update, if you want to update a package and get all this done from the script then you need to change the command in script from "yum install $1" to "yum update $1".
  2. say you want to download the xchm viewer for your system
  3. you first type the command "yum install xchm"
  4. it will search for dependencies and take you to a prompt saying you want to download it or not, say no. If you get any other response from yum like saying "Nothing to do" then don't proceed any further.
  5. now execute the script with xchm as the argument, i.e. "./yum.sh xchm". It won't ask you this time if you want to download the packages or not.
  6. It will create a tar ball of all the packages downloaded and will place it in your home directory.
It is a very simple, unsophisticated maybe inefficient script but I don't think we will be using it for mission critical purposes :) . Download the script here.

PS: Remember this always, it is need which drives innovation.

Thursday, August 16, 2007

How to download rpm packages using yum

Yellowdog Updater Modified [ yum ] is used to download and install packages from various repositories. The main advantage of yum is that you can keep track of packages installed and update them as and when necessary. There are a lot of things you can do using yum like auto configuring the update operation, downloading packages from specific repositories, etc. I won't be delving into all that in this post.

Here I will tell a very simple yet one of the most sought after tasks that you can do using yum, i.e. to download and store the packages needed (including the dependencies ) so that you needn't have to download all the packages again if you want to do another local install of the same package.

It is very simple actually, all you need to do is change an entry in the /etc/yum.conf file. You need to set the keepcache entry to 1 i.e. your yum.conf file should look something like this after you have changed it,
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
....
....

if keepcache is set to one then the packages downloaded will not be deleted after install, they will be placed in sub-folders under the cachedir i.e. /var/cache/yum in this case.

you might want to look at this post too -
Downloading rpm packages using yum - part II

Monday, August 13, 2007

Linux over Windows - A callow developer's choice

I have been thinking about this for some time now. What will be my answer if someone asks me why did I join Novell, why do I pride about it and for knowing about Solaris (maybe not so much but still... ), for being associated with a company like Sun which is supporting open source with such vigor these days.

I am no expert or any kind of an authoritative person in Linux to fill this post up with so much technicalities that it becomes evident that I must like Linux very much to have spent so much time with it. My view is of a callow, I have been using windows from the time I can remember of having a computer in my room and I have been introduced to Linux only say for the last 2 or 3 years. What is it then that makes me like Linux so much ?

Have you ever taken up Microsoft Certification ? Well, I haven't but my guess is you would have to know quite a lot about various Windows based tools like Windows Server, Visual Studio etc etc. Lets say you did learn all that, now do you feel as if you own it, as if it belongs to you, as if you are the king of the OS ? No, it doesn't feel so. You feel as if you are cooperating with something or someone to get your job done.

Lets have a look at Linux, when you sit in front of the Linux command prompt based terminal and type away commands, being pleased with yourself and of course impressing yourself that you can do what an "expert in Linux" can do. You feel it is yours, it belongs to you, it will obey your commands; as if you "rule" it. All this because it is open source.

This is just my opinion as to why I like Linux so much over windows, that too in such a short time. Maybe this is the reason why so many developers opt for Linux over Windows but instead of accepting that Linux is good they besmirch Windows and gloat at it.