Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Wednesday, 22 April 2009

debian change from dhcp to static IP

One would think to achieve the update from the DHCP assigned IP to the static one, the only thing to do is to update your /etc/network/interfaces

from:
iface eth0 inet dhcp

to:
iface eth0 inet static
address 10.165.248.252
netmask 255.255.248.0
gateway 10.165.248.1
broadcast 10.165.248.255
network 10.165.248.0

and restart:
/etc/init.d/networking restart

(optionally you can adjust your /etc/resolv.conf (to update DNS servers, and search paths)

The changed IP is immediately visible.

How surprised I was when after couple of hours the IP was changed back to the one from the DHCP pool. (resolv.conf was then automatically updated from the DHCP server)

Solution was to kill the dhcp3-client. (and change again the resolv.conf and restart networking)

Tuesday, 20 January 2009

compiling VIM 7.2 with GTK2 under debian etch

To install GTK2 is not an issue since we can use the apt-get install libgtk2.0 libgtk2.0-dev to install gtk2 with dev libraries.

The issue I encountered was when I tried to compile VIm 7.2 with GTK2, which could not be found:
checking for GTK - version >= 2.2.0... no
checking for GTK - version >= 1.1.16... yes; found version 1.2.10

Then I decided to compile GTK2 on my own.

I failed when trying to install GTK2.14 with GLIB2.18.4 because some function definitions changed.

Finally the versions I successfully installed were:
- gtk2.8.20
- glib2.9.6
- pangoo1.11
- atk1.25.2
- cairo1.8.6
- pixman0.13.2

then to compile VIM i used (/opt/gtk2 is the prefix where I installed just compiled gtk2):
export PKG_CONFIG_PATH="/opt/gtk2/lib/pkgconfig"
export LD_LIBRARY_PATH=/opt/gtk2/lib
export CPPFLAGS="-I/opt/gtk2/include"
export LDFLAGS="-L/opt/gtk2/lib"
./configure --prefix=/opt/vim/ --enable-perlinterp --enable-rubyinterp --enable-multibyte --enable-gui --with-features=big

Finally GTK2 found:
checking for GTK - version >= 2.2.0... yes; found version 2.8.20

happy VImming :)