Posts Tagged apt-get

Checking the checksum of installed packages

Posted by on Thursday, 15 October, 2009

Occasionally you just want a bit of piece of mind about your server or Linux install. You may suspect there is somebody who has hacked your computer or even something changed by a package install that shouldnt have been.

Heres a couple of ideas on how to do a quick ‘health’ check on he md5sum of binary packages.

Debian based people should install dlocate and use that

apt-get install dlocate
dlocate -md5check openssh-server

To force a fail try something like this

mv /usr/share/man/man5/sshd_config.5.gz /usr/share/man/man5/sshd_config.5.gz-old
echo Boo > /usr/share/man/man5/sshd_config.5.gz
dlocate -md5check openssh-server

For Redhat/Centos etc based servers you can use yum

 rpm -qvV openssh

Again you can force a fail by changing a file

mv /usr/share/doc/openssh-4.3p2/CREDITS /usr/share/doc/openssh-4.3p2/CREDITS-old
echo Boo >/usr/share/doc/openssh-4.3p2/CREDITS
rpm -qvV openssh

For less verbosity just drop the lower case v (so its rpm -qV )

Centos 5 – Adding extra sources for bleeding edge

Posted by on Wednesday, 6 May, 2009

So you got yourself say a Centos VPS or Server. Some guy comes along and develops you a website made in the latest and greated PHP version and yours isnt running it!.

Easily fixed. First of all to know, is Centos 5 is basicly RHEL 5 only free, you can use the same sources lists and rpms between the two.

So adding the first source would be the DAG/RPMForge  lists. The FAQ is up here which is pretty generic and basic.

Red Hat Enterprise Linux 5 / i386:

rpm -Uhv

Remembering that Centos 5 is the same as el5 (Red Hat Enterprise Linux … RHEL) this works nicely. You may find that you get the following error when using apt to update

E: Dynamic MMap ran out of room
E: Dynamic MMap ran out of room
E: Error occured while processing packagename
E: Problem with MergeList
E: msync
E: The package lists or status file could not be parsed or opened.

This can be fixed by putting the following line into the bottom of /etc/apt/apt.conf

APT::Cache-Limit 50000000;

At Rimuhosting where i work we usually default to Centos 5.3 which is pretty much the latest release. I found the DAG/RPMForge lists not quiet as up to date as the Remi lists at

The easy way to get these ones going is as follows

rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

By default the remi lists are not enabled, you can use them indevidually with yum –enablerepo remi install packagename . Or you can edit the /etc/yum.repos.d/remi.repo and change the enabled=0 to enabled=1

Now you can yum update  and yum upgrade nicely!

Let me know any other mirrors you found handy.

Using apt-get

Posted by on Tuesday, 7 April, 2009

Using apt-get / Installing aplications on Debian based distro’s.

This is just a quick guide to get you started on installing and upgrading software on you debian or debian based distro of linux. It is not meant to be a comprehensive guide. From here on in where I refer to Debian I mean any debian based or other distro of linux that uses apt-get.

Finding Applications / Packages.

Software for debian is stored in packages. These packages contains the files required for an application and also referances to other packages required to run the software. The fastest way to search the packages currently availible (assuming your package cache is up to date, more later) is to use apt-cache.

The basic syntax is: apt-cache search

ie. finding an irc client

$ apt-cache search "irc client"
cgiirc - web based irc client
ctrlproxy - An IRC proxy with multiserver support
tinyirc - a tiny IRC client
tirc - token's irc client
xchat - IRC client for X similar to AmIRC
xchat-text - IRC client for console similar to AmIRC
zenirc - Major mode for wasting time

I have shortened the output here …

The alternative in to browse a package archive such as But keep in mind that depending on your installation sources and version some packages may not be available to you.

Installing an Application / Packages.

Lets, for example, choose to install xchat, an excellent IRC client. To do this we simply execute this at a command prompt as ROOT user. apt-get install xchat (To log in as root type ‘su’ at the prompt and enter you root password when prompted, if you are on knoppix or your user has sudo access preffix the command with ‘sudo’)

you should get something like the following:

Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  xchat-common xchat-text
Suggested packages:
The following packages will be upgraded:
  xchat xchat-common xchat-text
3 upgraded, 0 newly installed, 0 to remove and 350 not upgraded.

As you can see this will install extra required two packages. You maybe prompted to confirm the download of the packages. You should also receive a summury of sizes. On confirmation apt-get will download the packages and configure them. Some software will require user interaction and will prompt you for input.

To upgrade an existing package you similarly type apt-get upgrade

Upgrading and Updating apt-get

As the list of packages changes regularly you may need to update you cache of available packages. This is done by executing the following as root: apt-get update

To upgrade all packages on you system you can try the following (again as root) apt-get upgrade This will generally download alot of files !!!

Sometime packages will be held back because of conflicting dependancies, etc. To force this try apt-get dist-upgrade after running apt-get update then apt-get upgrade.

Last-Modified: 2007-03-07 19:38:50