Archive

Posts Tagged ‘linux’

Svn global-ignore

February 27th, 2009

I want subversion to always ignore compiled files. There is lots on the internet about using property svn:ignore but nothing about setting a global-ignore.

Where the heck is this danged config file?

On FreeBSD I found it at “~/.subversion/config”.

Yes, in my home directory… so “global” means just global for one user which seems kinda pointless. I guess that’s why no-one uses it. I gave it a bit of this action which works.


[miscellany]
global-ignores = *.pyc

How to add a new user to SVN on Apache

February 19th, 2009

Problem:

I’ve started working on an existing project and needed to add myself as a user to the repository. It proved kinda tricky. First I couldn’t get Tortoise to authenticate, then I couldn’t add myself as a user, and then I couldn’t work out how to put a password on my svn user.

(“Here’s how I fixed all that…”)

A “testing” email server which doesn’t send out any emails

December 27th, 2008

Problem

I need an email server for testing. It accepts email just like a real one, but does not actually send any email out to the real world. I need to be able to see the emails that it is not sending.
Read more…

Set a Static IP Address with Ubuntu Linux

October 9th, 2008

Problem
I want to ensure my linux server always has the same IP address. If it still wants to use dhclient to find a dynamic ip address, and the nameservers, then that’s ok too.

Solution

By setting an “alias” for the fixed address in dhclient it will answer to both the static ip address you want and any dhcp address leased from a dhcp server.

Method

Edit /etc/dhcp3/dhclient.conf to include something like:

alias {
      interface "eth0";
      fixed-address 192.168.1.101;
      option subnet-mask 255.255.255.255;
}


Which tells dhclient that whatever ip address it gets for eth0, 192.168.1.101 is also its ip address. So it will answer to two ip addresses simultaneously.

Restart the network and you’re done…


john@lappy:/etc$ sudo /etc/init.d/networking restart
[sudo] password for john:
 * Reconfiguring network interfaces...
...
DHCPACK of 192.168.1.4 from 192.168.1.254
bound to 192.168.1.4 -- renewal in 120670 seconds.
                                                                                                                      [ OK ]
john@lappy:/etc$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0d:60:8a:35:92
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:60ff:fe8a:3592/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10012 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5789 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:13138975 (13.1 MB)  TX bytes:565365 (565.3 KB)

eth0:0    Link encap:Ethernet  HWaddr 00:0d:60:8a:35:92
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3850 (3.8 KB)  TX bytes:3850 (3.8 KB)

john@lappy:/etc$

Story

Once upon a time every computer had a static IP address and setting it was a trivial text edit or command line task. But today I had trouble getting Ubuntu Linux (Intrepid) to do it. A simple edit of /etc/network/interfaces no longer seems to work as expected. With a whiff of Microsoft “helpfulness” a irrepressible effort now goes into ensuring Ubuntu is dummy proofed to find an IP address for itself. Me trying to tell it not to find an IP address I found was working against the flow of traffic.