Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

2012-01-17

Configure a DHCP server (debian)


Installing dhcp server:
# apt-get install isc-dhcp-server

Define a static IP for the server
# nano /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.0.2 # server's IP address
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.1.255
gateway 192.168.0.1 #router's IP address


Configure DHCP server settings at /etc/dhcp/dhcpd.conf
# nano /etc/dhcp/dhcpd.conf

default-lease-time 600;


max-lease-time 7200;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "yourdomainname.com";

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.150 192.168.0.200; #Range of client's IP addresses: 150 to 200

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}


Restart dhcp-server
# /etc/init.d/isc-dhcp-server restart

Restart eth0
#ifdown eth0
#ifup eth0

Links:
http://wiki.debian.org/DHCP_Server

2008-03-01

Debian - NVIDIA drivers

A quick and easy tutorial about how to install NVIDIA drivers as simply as possible.

Prerequisites:

As a starting point, download the latest stable drivers.

Then you’ll need to install a few packages :

$ sudo apt-get install build-essential linux-headers-$(uname -r)
Debian Sarge users have to replace linux-headers with kernel-headers.


Installation:

First you’ll need to kill the X server. You can do that by switching to console #1 : press CTRL-ALT-F1 simultaneously.

Once there, log in with your username and password.

Stop the graphical login manager :

$ sudo /etc/init.d/gdm stop
Then install the drivers :

$ sudo sh NVIDIA-Linux-x86-1.0-9755-pkg1.run
and follow the installation process.

Make sure you tell the installer to automatically modify your /etc/X11/xorg.conf file so you’ll end up using the NVIDIA drivers.


Xorg.conf:

If you haven’t, then you simply have to make a few changes to your /etc/X11/xorg.conf file. Here they are. Debian Sarge users have to modify /etc/X11/XF86Config-4 instead.

In Section “Modules” comment the dri and GLcore modules :

#Load "dri"
#Load "GLcore"

In Section “Device” make sure you use the NVIDIA driver :

Driver "nvidia"

And finally comment the whole Section “DRI” :

#Section "DRI"
# Mode 0666
#EndSection

Here is an example xorg.conf file with the proper changes made.


X:

Once done, load the NVIDIA module :

$ sudo modprobe nvidia
And restart the graphical login manager, which will bring back X :

$ sudo /etc/init.d/gdm start

Tips:

If you happen to update your kernel, then you don’t need to reinstall the whole NVIDIA driver, but only the kernel module. So running this command will do the trick :

$ sudo sh NVIDIA-Linux-x86-1.0-9755-pkg1.run -K