quarta-feira, 24 de fevereiro de 2010

Seting up a DHCP server

To quickly install and set up a DHCP server on Linux you need to download the DHCP software from here.
After the download do:
$ tar xzvf dhcp-4.1.1.tar.gz
After extract do:
$ cd dhcp-4.1.1/
$ ./configure
$ make; make install
 Now we have the dhcp server installed so we need to configure that.

The /etc/dhcpd.conf File

When the server starts it reads the dhcpd.conf file. In this file we need to pute the configurations that we wish to our network.

Normally this file is NOT created in installation, but you can:

$ touch /etc/dhcpd.conf

Finally we need to edit the file for our case.
So let's see an example that explains the most important fields. Adapt for your case:
ddns-update-style interim
ignore client-updates
 
subnet 192.168.1.0 netmask 255.255.255.0 {
 
   # The range of IP addresses the server
   # will issue to DHCP enabled PC clients
   # booting up on the network
 
   range 192.168.1.201 192.168.1.220;
 
   # Set the amount of time in seconds that
   # a client may keep the IP address

  default-lease-time 86400;
  max-lease-time 86400;
 
   # Set the default gateway to be used by
   # the PC clients
 
   option routers 192.168.1.1;
   # Don't forward DHCP requests from this
   # NIC interface to any other NIC
   # interfaces
 
   option ip-forwarding off;
 
   # Set the broadcast address and subnet mask
   # to be used by the DHCP clients
 
  option broadcast-address 192.168.1.255;
  option subnet-mask 255.255.255.0;
  
   # Set the NTP server to be used by the
   # DHCP clients

  option ntp-servers 192.168.1.100;

   # Set the DNS server to be used by the
   # DHCP clients

  option domain-name-servers 192.168.1.100;
 
   # If you specify a WINS server for your Windows clients,
   # you need to include the following option in the dhcpd.conf file:

  option netbios-name-servers 192.168.1.100;
 
   # You can also assign specific IP addresses based on the clients'
   # ethernet MAC address as follows (Host's name is "laser-printer":

  host laser-printer {
      hardware ethernet 08:00:2b:4c:59:23;
     fixed-address 192.168.1.222;
   }
}
#
# List an unused interface here
#
subnet 192.168.2.0 netmask 255.255.255.0 {
}
 To see more options:
$ man dhcp-options

So to start our DHCP server:
$ dhcpd start 



segunda-feira, 8 de fevereiro de 2010

Linux Training from Linux Experts - FREE

"A little less than a year ago, the Linux Foundation launched a program to provide a variety of training opportunities for Linux professionals. Just a few months later, the Foundation moved the program online, offering web-based sessions of select courses to reach a wider audience. On Tuesday, they took it one step further, announcing the free — as in beer — Linux Training Webinar Series.
The idea behind the Linux Foundation Training Program was to offer job training that would help fill the continuing demand for Linux professionals. The courses would be taught not by professors or lecturers, but by actual Linux developers, including the Foundation's Technical Advisory Board which boasts names like Ted Ts'o, Jonathan Corbet, Alan Cox, and Chris Wright, among others.
The first courses were held on-site at Linux Foundation events, including the inaugural event at the annual Collaboration Summit, as well as independent sessions in various cities and corporate-sponsored training. With the success of the Collaboration Summit sessions, the Foundation branched out, offering the same classes taught by the same faculty, but in a Virtual Classroom setting. The courses — which the Foundation will continue to offer — last from two to five days, and run anywhere from $1,200 (for two days) to $2,750 (for five days).
The new classes, designated the Linux Training Webinar Series, will provide an introduction to the basics of Linux, from tuning and file systems to community interaction. Instructors will continue to include prominent Linux developers, including TAB members. Foundation Executive Director Jim Zemlin described the program as "connect[ing] developers and users with the rock-stars of Linux...to expand the talent pool for Linux."
A number of courses have already been arranged, beginning with Jon Corbet's How to Work with the Linux community on March 1st. Other sessions will include Linux Performance Tuning with Ted Ts’o, Christoph Hellwig's A Linux Filesystem Overview, James Bottomley presenting An Introduction to Git, and “Btrfs: An Intro and Update from Chris Mason. Registration has already opened for Corbet's course, and those interested in other offerings can sign up to be notified as more information becomes available.
Additionally, the Foundation released its Winter/Spring 2010 course catalog for its Classroom, Virtual Classroom, and On-Site training programs. Developer sessions will include Developing Applications For Linux, Embedded Linux Development, Developing with GIT, Linux Kernel Internals and Debugging, and Developing Linux Device Drivers, with Linux Performance Tuning announced for the administration track.
More information on all of the Linux Foundation's training opportunities is available from training.linuxfoundation.org."
in LinuxJournal

quinta-feira, 4 de fevereiro de 2010

Symbian Opens Up

"Nokia bought Symbian in 2008, and nobody believes that their thoughts were anywhere near Open Source particularly given that just weeks prior, it's Open Source chief declared that when it came to FOSS, the company wasn't "ready to play by the rules." Nevertheless, Open Source was exactly what Nokia had in mind for Symbian, as as of today, the process is complete.
SymbianParts of the Symbian platform have been Open Source for quite some time — portions of the code were Open Sourced shortly after it was donated to the Symbian Foundation, and other portions have slowly been released in the nearly two years since. The complete opening wasn't expected until later this year, but finished ahead of schedule due, said Foundation Executive Director Lee Williams, to "the extraordinary commitment and dedication from our staff and our member companies."
The Symbian Foundation picked the Eclipse Public License as its Open Source variant of choice. According to the Symbian Developer Community site, the EPL was chosen "because it balances our goals of encouraging development of the Symbian platform, builds a contributor community and encourages vigorous commercial competition through innovation on top of the platform." It goes on to specifically address the choice not to use the GPL, saying they "[want] to be absolutely clear" that those using the Symbian platform in devices "will be able to add new features and support new hardware without having to make all of that code open source," excepting certain alterations of the licensed code itself. Some code, however, is available under other Open Source licenses, though examples were not immediately available.
The full Symbian^3 codebase — 108 packages in all — is now available for download from the Symbian developer site, including developer and product development kits."

in Linux Journal

Creating Bootable USB Install Drives with UNetbootin

You can make easier your iso files bootable with UNetbootin. See this tutorial and learn:

Run Windows Programs With WIN



"Wine lets you run Windows software on other operating systems. With Wine, you can install and run these applications just like you would in Windows.

Wine is still under active development. Not every program works yet, however there are already several million people using Wine to run their software."

To install WIN go to this website and get the program. According to your installation run the installation file.

Util programms:
  • WineCheck -script that check errors on wine configurations.
  • WineTools - a little script that helps in the configuration of programs.

segunda-feira, 1 de fevereiro de 2010

Add a script to run on boot

So if you have a script and you wish to run them each time you boot up. This will tell you how to do that.

Write a script. put it in the /etc/init.d/ directory.
Lets say you called it XPTO.
  • Give them execution privileges using:
$chmod + XPTO
  •  Now run

$update-rc.d XPTO defaults

You can check out
% man update-rc.d for more information. It is a Debian utility to install scripts. The option “defaults” puts a link to start XPTO in run levels 2, 3, 4 and 5. (and puts a link to stop XPTO into 0, 1 and 6.)

  • To know which runlevel you are in use:
  $runlevel


Add a Grub Splash Image

The grub selection menu does not have a image. If you want to add your images to that menu you can, doing this:


$sudo apt-get install grub-splashimages
This will put the images in:
/boot/grub/splashimages
To add your own do this:

$cd /boot/grub
$sudo ln -s splashimages/debsplash.xpm.gz splash.xpm.gz
$sudo update-grub

What we just did was to link /grub/boot/splash.xpm.gz to the debsplash.xpm.gz splash image, and then updated the grub menu.