Setting up your own simple debian repository

Random April 27th, 2009

In the process of getting a debian repostiry ready to allow easy installtion with debian’s apt, a small series of posts are going to be created here. So here is the initial post describing a very simple debian repository layout.

All that’s required to setup your own debian repository is the dpkg-dev package and a web or ftp server for serving the files. For a local deployement (e.g. within a company) also a file-system based approch is possible through a NFS mounted directory.

Make sure the dpkg-dev package is installed:

sh# aptitude install dpkg-dev

Copy all files into a directory binary on the server. So the layout will look something like this:

(webserver-root)
+-- debian
    +-- binary
    |   +-- myweb-2.0-1_i386.deb
    |   +-- myweb-utils-2.0-1_i386.deb
    +-- source

Here the packages in the binary directory can new be used to create the repository index and serve this then as a debian repository. To scan the packages and create the index use:

$ cd webserver-root
$ dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
$ dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz

Now the repository can be used by adding the following to /etc/apt/sources.list:

deb http://my.server.com/debian/binary ./
deb-src http://my.server.com/debian/source ./

See http://www.debian.org/doc/manuals/repository-howto/repository-howto for more details.

Starting up QuikIT…

Random September 15th, 2008

Das neue Einzelunternehmerprojekt QuikIT geht an den Start.

Nach doch inzwischen einigen Jahren der minimalen Zeitinvestition in diverse IT-Dienstleistungen soll nun das ganze in einer organisierteren Form von statten gehen und auch die Möglichkeit schaffen größere Projekte (wie eben http://www.quikplan.at) umzusetzen.

Fokus wird anfangs sicher auf:

  • Web-Hosting für Private, Vereine und Kleinunternehmen
  • Domain-Registrierungen verbunden mit obigem
  • System-Administration (Linux, MySQL, PostgreSQL, Virtualisierung)
  • Beratende Tätigkeiten im Bereich Linux, High-Availability mit Open Source, Virtualisierung, Datenbanken und auch der OpenSource Einsatz im Unternehmensumfeld

Mehr unter http://www.quikit.at

System backup vs. system images

Random October 13th, 2006

Creating a system image is IMHO different from creating a level 0 backup.

A backup is destined for the one host it was taken from, no other. MBR, partitioning, filesystems will all stay the same. Whereas a system image is used to multiply an installation to different hosts, with probably different partitioning, eventually different mount points. Differences of configuration is not part of this post, so yes, there are definitly different setting for network, hostname, …, but that has to be handled after restoring the image.

Target systems are Intel-based, so a Rescue-CD like RIP (Rescue Is Possible) can be used. The whole system is to be backed up, so unmounting of the root partition is going to be hard, meaning a boot from external media (e.g. CD) is required. We sure want to have a consistant state, so changes to the running filesystem must not be possible during backup. The backup destination is either an external storage like a DVD burner, tape or USB harddisk, but can also be a network storage like nfs directory, netcat tcp backup, …

Let’s take a closer look at the steps involved for either of the possibilities:

Blockbased

Operates on the block level. Similar to saving bit by bit from the blockdevice in question. This should never ever be done on a mounted filesystem.

Procedure:

  1. Boot from CD
  2. Prepare backup destination
  3. Backup MBR(s)
  4. Backup partition table(s)
  5. Backup whole disk(s) or required block devices
  6. Reboot

Advantages:

  • independence of the filesystem used (so indirectly all filesystem features are supported)
  • can be used for non-linux filesystems (e.g. backup NTFS partitions)

Disadvantages:

  • inflexible
  • unable to restore single files or directories
  • no listing / index possible

Tools:

Filesystem based

Operates on the filesystem level. The supported filesystems are known, usually with all the features they offer (e.g. extended attributes, ACLs). This should never ever be done on a mounted filesystem.

Procedure:

  1. Boot from CD
  2. Prepare backup destination
  3. Backup MBR(s)
  4. Backup partition table(s)
  5. Backup required filesystems
  6. Reboot

Advantages:

  • independence of the blockdevice
  • all filesystem features supported
  • only a limited number of filesystems supported (mostly linux)

Disadvantages:

  • some flexibility
  • unable to restore single files or directories
  • no listing / index possible
  • partition sizes must be at least as large as the original one

Tools:

Filebased

to be written

Blockbased backups are definitly more suitable for level 0 backups, as we definitly restore to the same host, and everything should be the same, bit by bit.
That leaves filebased archives for system images, as they are extremly flexible.

References

http://www.halfgaar.net/backing-up-unix

We got hacked…

Random November 3rd, 2005

Strange, but true. Our new server got hacked recently by some unknown folks. The downside of this incident was, that we had visitors from some unethnical hacking groups, which abused the server for UDP attacks and spam mailing. I cleared the remaining 18000+ mails in the deferred mail queue yesterday.

System was restored and the trojan files were removed (which was quite some fun as the were hidden and proticted by filesystem attr). We upgraded the system too to the latest versions, so that might make it harder for new attacks. We’ll see.

vServer move to fx7.org

Random October 18th, 2005

As always it seemed to be just a view hours work to move all services from the old mos.at hosted vserver to the new dedicated server owned by Duke. So we join efforts on that front and are going to share the server for all our vhosts and services.

Everything is moved now, except mail service. I still need to tweak the mail configuration by merging both our domains (database vs filebased). But I see the light at the end of the tunnel.

It’s obvious that also this blog is working again, fine so far.

Wordpress setup

Random August 5th, 2005

After some time, mambo was a little too complex for my needs, so i decided to try wordpress.

There are also tons of plugins available, and although not as easy to administer (still fine), it offers everything I need and is very fast compared to mambo (because it’s simpler).

So far so good, let’s see how it works out.