Archive

Apt Get On Small Harddrive

Having a small hard drive can make apt-get dist-upgrades a complete nightmare, as apt-get likes to download everything and then dist-upgrade, filling up your harddrive before the download is complete.

However, there is a way round it – and this is how I did it.

Firstly, create a file which lists the packages that will be updates thus:

apt-get -s -u upgrade | sed -n -e Inst,/Conf/p -e /^Conf/q | cut -d” ” -f2 >update.packages

This will create a file called update.packages which has a list of packages to update. Before you do anything else, [continued…]

Crontab Format

Essential reading: man 5 crontab

The first and most important thing to remember about crontabs is that there are two types of crontab. There’s the system crontab, kept in /etc/crontab (and files in /etc/cron.d/, /etc/cron.daily/, /etc/cron.hourly/ and /etc/cron.weekly/). Then there’s the user crontabs, which are edited by running crontab -e and viewed with crontab -l. These have subtly different formats, and if you put the wrong format in the wrong place, things will not work (or at best, not as you expect them to).

System crontab format

Each line in the system crontab contains 7 whitespace-separated [continued…]

Blocking Adverts

Blocking Adverts

Suggestions on Blocking Adverts and Malware While Browsing

The following tips may prove useful in preventing adverts, and other forms of malware from degrading your browsing experience. These tips while useful to everyone, are I feel especially useful to users on slow connections, or when the person surfing needs more protection.

Blocking via hosts/DNS Filtering

One simple idea is to configure a computer’s DNS name to IP resolution so that many well know advertising and “undesirable” servers return an IP address that goes no where, e.g. 127.0.0.1. An easy way to do this is to [continued…]

Mozilla Firefox Java

A few people were saying they had trouble getting the Java plugin working in Mozilla Firebird.

Here’s what I did, and it worked. I was using debian unstable.

Mozilla installed using apt-get install mozilla-firefox

  • Download the latest JRE from Sun. At the time of writing, this was version 1.5.0. These instructions assume the use of the “Linux (self-extracting file)” download. It is possible to install from the “Linux RPM (self-extracting file)” download, but you cannot use the instructions on this page. Try the Sun instructions on installing Java and the Sun instructions [continued…]

  • Managing Packages

    PHP

    Question was “Can anyone recommend a good PHP book?”

    I have used both web sites and books over the past 4 years as I learned PHP.

    The php website uk.php.net (for the UK mirror) is excellent, especially the user comments, although beware that a number of user comments and tips are wrong. For that reason, it is worthwhile getting a good PHP book too, to cross reference other material. I have a number of books on PHP, but probably a good one to start with is the PHP Bible, published by Wiley. It also has specific focus [continued…]

    Boot Log

    Put the line

    BOOTLOGD_ENABLE=Yes

    in /etc/default/bootlogd, and Debian will log the output of all its init scripts on startup. That’s all.

    Yum

    Yum – Some Simplifying Tricks

    If you are using a distro that is able to use YUM and you have a couple of systems, you can save lots of time by:-

    • Creating your own Yum Repository
    • Sharing the updates for one machine with the other.

    This section describes how you can setup one machine and let others use the updates for themselves. It does not describe how to setup your own yum repository(that comes in another document)

    So, I have 2 systems. The first called Trophy650 is my general server. It is [continued…]

    Virtual Memory

    Most modern OSes don’t treat the physical RAM as a single contiguous area, from address 00000000 to 1fffffff (say, on a 512MiB machine). Instead, they have hardware (the MMU, or Memory Management Unit) which maps physical RAM to a logical address space. This is used heavily by the operating system to move memory about, usually in 4K chunks called “pages”.

    On systems with 32-bit address spaces, the total available address space is 4GiB. This space will be used sparsely, with different chunks of physical RAM mapped to different areas of the available logical address space. Each area of [continued…]

    DHC Pand DNS

    DHCP and DNS for a Private Network

    If you have more than a couple of machines and do have at least 1 permanently-connected server, I think you’ll find life easier if you use both DHCP and DNS provided from that server.

    Here’s what I would do:

    ==== Pick an internal domain name. ==== If you have an existing domain name like example.com then you could use a subdomain of it such as ‘int.example.com’ for internal hosts, or if you don’t have one then you can make up an ‘impossible’ top-level domain such as localnet. I shall [continued…]