Archive
Posts in Linux
Displaying a file or device in hex
A while back I came across the hexdump utility, which allows you to dump the contents of a device or file in hexadecimal: This is a super useful utility!
$ read more →2.6.32 Linux kernel Virtualization memory De-Duplication
This is pretty sweet. In the 2.6.32 Linux kernel released yesterday, a new feature of de-duplicating memory of virtualized instances, was introduced. Modern operative systems already use memory sharing extensively, for example forked processes share initially with its parent all the memory, there are shared libraries, etc. Virtualization however can't benefit easily from memory sharing…
$ read more →Configuring yum to use an HTTP or FTP proxy
I have been experimenting with squid at home, and recently configured yum to use the squid proxy server I set up. There are two ways you can get yum to use an HTTP or FTP proxy. First, you can make yum use a proxy for a single session by setting the http_proxy and ftp_proxy environment variables: If you want to make the proxy settings permanent, you can add a proxy directive to /etc/yum.conf: If your proxy requires you to authenticate, you can add the credentials to the configuration file as well.
$ read more →Adding 3rd party package repositories to CentOS Linux
As a long time CentOS user, I have grown accustomed to firing up yum to install my favorite packages. Periodically a package I'm looking for isn't available, and I need to go out to a 3rd party repository to snag it. One awesome source for 3rd party repositories is the repositories section of the CentOS website, which contains the yum repository files for several extra package sources. If you are looking for a file that isn't available in the stock CentOS distribution, you should take a look at that site!
$ read more →Dealing with yum checksum errors
I support a couple of yum repositories, and use the yum repository build instru ctions documented in my previous post to create my repositories. When I tried to apply the latest CentOS 5.3 updates to one of my servers last week, I noticed that I was getting a number of "Error performing checksum" errors: After reading through the code in yumRepo.py, I noticed that the error listed above is usually generated when the checksum algorithm specified in the repomd.xml file isn't supported. The createrepo utility uses the sha256 algorithm by default in Fedora 11 (I created my repositories on a Fedora 11 host), so I decided to create my repository using the sha1 algorithm instead: Once I created the repository metadata using the sha1 algorithm, everything worked as expected: This debugging experience made me realize two things: Having your package manager written in Python makes debugging super easy Python 2.6 uses hashlib to perform checksums, and Python 2.4 uses the SHA module to perform checksums. The version of the SHA module that ships with CentOS 5.3 doesn't support sha256, which is why we get the checksum error listed above…
$ read more →