Rabu, 01 Agustus 2012


Install DHCP on Ubuntu SeDHCP & ubuntu server

How To Install DHCP Server on Ubuntu

Previously here assumed that the dhcp server to be made: 
* Using the eth0 interface 
its IP Addres * Range: 192.168.0.100 to 192.168.0.200 
* Subnet Mask: 255.255.255.0 
* DNS Servers: 202.188.0.133, 202.188.1.5 
* Domains: tm. net.my 
* Gateway Address: 192.168.0.1 

OK, now we start immediately wrote! 
Bismillahirahmanirrahim, 
* First install dhcp3-server first via Synaptic or via command prompt by: 
sudo apt-get install dhcp3-server 
* Then we will make changes to the file using gedit, but before the first backup to first edit the original file so that when damaged can be restored to the default 
sudo cp / etc/default/dhcp3-server / etc/default/dhcp3-server_backup 
gksudo gedit / etc / default/dhcp3-server 

* Then find the line below: 
INTERFACES = "" 
then replace the line above a row are like below: 
INTERFACES = "eth0" 
* Save the file 
* Next we will make changes to the configuration file, but before just as in the first backup file 
sudo cp / etc/dhcp3/dhcpd.conf / etc/dhcp3/dhcpd.conf_backup 
gksudo gedit / etc/dhcp3/dhcpd.conf 

* Find the line - the line below 
# option definitions common to all supported networks ... 
option domain-name "example.org"; 
option domain-name-servers ns1.example.org, ns2.example.org; 

default-lease-time 600; 
max-lease-time 7200; 

then replace the lines in on a line are like below: 
# option definitions common to all supported networks ... 
# option domain-name "example.org"; 
# option domain-name-servers ns1.example.org, ns2.example.org; 

# default- lease-time 600; 
# max-lease-time 7200; 

* Find another line below: 
# A slightly different configuration for an internal subnet. 
# subnet 10.5.5.0 netmask 255 255 255 224 { 
# range 10.5.5.26 10.5.5.30; 
# option domain-name-servers ns1.internal.example.org; 
# option domain-name "internal.example.org"; 
# option routers 10.5.5.1; 
# option broadcast-address 10.5.5.31; 
# default-lease-time 600; 
# max-lease-time 7200; 
#} 

and replace the line above a row are like below: 
# A slightly different configuration for an internal subnet. 
subnet 192.168.0.0 netmask 255.255.255.0 { 
range 192.168.0.100 192.168.0.200 ; 
option domain-name-servers 202.188.0.133, 202.188.1.5; 
option domain-name "tm.net.my"; 
option routers 192.168.0.1; 
option broadcast-address 192.168.0.255; 
default-lease-time 600; 
max- lease-time 7200; 

* Save the edited file is! 
* Now restart the dhcp server by typing the following command: 
sudo / etc/init.d/dhcp3-server restart 
After we managed to do all of the above then we have completed create a DHCP Server on Ubuntu Feisty.Because this paper is to use your version of Feisty then please adjust if menggukan latest version of ubuntu.

Static IP steps in Ubuntu Server

Hellow friends, this time I will divide up the material from which the material results of studying my Ubuntu Server 10:10 . 10:10 Ubuntu Server in order to connect to the network, either local network or the Internet, the initial step is to do konfigrasi IP address. To configure the IP address of the steps are as follows:
  • Enter the username and password that is set in the previous step.In this article I use is userame  Berliana and my password also Berliana For the password will not be visible when typed for security reasons. Press Enter when you are sure to enter your username and password correctly.
  • After a successful entry will be shown when users last logged adamkurniawan. In the bottom row looks posts Berliana @ Server01: ~ $ , this means users with ids adamkurniawan still existed as a regular user and have not been able to make arrangements. In order to do the settings, the user must be logged in as root mode or ultimate mode in the system (administrator) by typing sudo su , then it will be the note [sudo] password for Berlana: it means the system prompts for a password that the user can enter the id adamkurniawan root mode. Password is used for root mode is the same password used to login at the beginning.Enter the password and press Enter . If the password is entered correctly, it will appear the words root @ Server01 :/ home / Berliana # , this means users with ids adamkurniawan already entered as root mode and are able to do the configuration.
  • Before configuring the IP address, check in advance what the name of the network card (ethernet) are available that can be used by typing: # ifconfig-a | more . Naming the network card on a Linux system begins with followed by eth network card number starting with 0, eg eth0, eth1, eth2, and so on. Because in this article, I use two network cards then after you type # ifonfig-a | more , it was found that the name of the network card I have on linux system known as eth0 and eth1.
  • type the command # nano / etc / network / interfaces to start configuring the IP address of the Ubuntu Server 10.10. At the end of the line type the following script: auto eth0 iface eth0 inet static 
    address 192.168.6.200 
    netmask 255.255.255.0 
    gateway 192.168.6.254
    the above script is a script that is used to set the first network card (eth0) to be connected to the internet. IP address should I give a segment to the existing network on the Ubuntu Server 10:10 that I use and the first gateway of the network card must also be an IP address of the device that acts as a gate of the Ubuntu Server 10:10 I use the internet. As for the second network card settings to be used as an interface to the local network are as follows:
    auto eth1 
    iface eth1 inet static 
    address 10.10.1.254 
    netmask 255.255.255.0
    When you have finished press the 
    Ctrl + O to save the configuration that has been done, give the name of the configuration file you just created, in this article I do not give a new name, so I immediately Just press the Enter key . Later press Ctrl + X to exit. Restart the network card using the command # / etc / init.d / networking restart so the new configuration can be made ​​readable by the system.
  • In general, if the network card has not been configured to use Ubuntu Server Ubuntu Server 10:10 or 10:10 is still used a newly installed (fresh install), a network card that is embedded in a computer has been read but not yet active. To see if the network card is active or not, type the command # ifconfig . In this article, I use a network card is not yet active.
  • To activate it type the command # ifconfig eth0 up (enable the first network card) and # ifconfig eth1 up (turn on a second network card). After that make use of the network card restart # / etc / init.d / networking restart . If it be checked again using the command # ifconfig , it will be seen that the network card is active and already has an IP address corresponding to that already in the configuration.
  • The next step is to provide DNS (Domain Name System). DNS is used as an interpreter of the domain names to IP addresses, and vice versa, ie from IP addresses into domain names. So when users type in google.com in the web browser, then that means the user dials the IP address of google.com is 74.125.71.103. To set the DNS in Ubuntu Server 10:10 user must create a new file calledresolv.conf which is placed in the directory / etc by typing # touch / etc / resolv.conf, but before the user must enter the root mode.Having successfully made, the next is filling the file resolve.confwith IP addresses that can translate domain names into IP addresses and vice versa, by typing the command # nano / etc / resolv.conf . Then type the nameserver and followed by the IP address that can be used as a control, in this article I use 2 pieces of DNS, which is 192.168.4.254 which is the gateway IP address of the Ubuntu Server 10.10 and 8.8.8.8 which is the address of the DNS provider is made ​​by Google. So the writing is as follows:nameserver 192.168.4.254 nameserver 8.8.8.8 

    Save by pressing 
    Ctrl + O , press the Enter key to replace the old name and press Ctrl + X to exit. Do it again to restart the network by typing # / etc / init.d / networking .
  • The next stage is to check whether Ubuntu Server 10:10've been able to connect to the internet and if DNS is working properly. How to do it is to do a ping to a domain address. In this article, I did a check by pinging yahoo.com domain. Typed command is # ping yahoo.com . here I have received a reply from yahoo.com and 10:10 which means that Ubuntu Server is used as the server is properly connected to the internet, as well as its DNS.
  • Next, do the configuration for all clients who are on the local network can access to the network that are outside the network (internet) or do NAT. If not configured then the packets originating from the local network card (eth1) will not be forwarded to the network card that leads to the internet (eth0). The trick is to type the following command: iptables-t nat-A POSTROUTING-o eth0-j MASQUERADE and then press Enter . If you want this rule to run when the computer is turned on, then the above rule then type in the file / etc / rc.local before the line exit 0.

  • Turn on the computer that will be installed Ubuntu Server 10.10 and make sure the Ubuntu Server installation CD is 10:10 in the CD-ROM from the computer.
  • Go to the BIOS settings of the computer to adjust the  firt boot  to directly read the CD-ROM by pressing  F2  or  Del  or F12  (each a different computer). Settings window will then appear. Go to the tab Boot  CD-ROM and slide it into the top. Then press  F10 to exit and save settings.
  • The computer will  restart  and return to  boot . For this time the user does not press anything, let alone to a window that requires the user to select one of the languages ​​that will be used to  interface  the Ubuntu Server 10.10 and not the language of the installation. On this occasion I use  English .
  • After selecting the language, the user will be forwarded to the main window display. Users are required to choose one of six options.Because here I will do the installation, so I chose the first option, the Install Ubuntu Server .
  • The next window the user will be presented again at the language selection. But for the language to be selected at this stage is the language used for the installation process. Here I am still using English .
  • The next step is to determine the state. At the beginning of the selection window display state, Indonesia there is no choice, so I choose  Other  and then selecting  Asia  and then choose  Indonesia .
  • The user will be asked whether to perform a test on the keyboard (keyboard)  is used, I answer  No , because I feel no need to do it.
  • Still associated with the keyboard is used, the next step the user must specify the type of keyboard used. Average outstanding keyboard in Indonesia is the keyboard with a standard USA. For that i choose  USA  as the Origin of the Keyboard  and  Keyboard Layout .
  • The next step is to determine the  primary network interface . Because in this tutorial I am using two  ethernet card  that I plug in the computer, then the Ubuntu Server will ask where is  the ethernet card to be  primary . I choose  eth0  is the  primary ethernet card .
  • After determining the  primary network interface , Ubuntu Server will instantly find a DHCP ( Dynamic Host Configuration Protocol ) is connected to the  network interface is  Ubuntu Server. Because the Ubuntu Server not connected with any network, I press  Cancel .
  • Furthermore users are faced with determining the stage of the network configuration. I will configure the network at 10:10 after the completion of this Ubuntu Server installed, so I opted for this stage Do not configure the network at this time .
  • The next process is to enter the name of the  host  from the  server  to be built this. Here I give the name of  Server01 . Giving the name of the host does not justify the space.
  • Furthermore the user is required to select the time zone ( time zone ) according to the user's city. Because in the previous step I had to choose Indonesia as my country, so here are four options: Jakarta, Pontianak, Makassar, Jayapura, and there is one choice  worldwide Select from the list if the time zones do not appear appropriate. In this tutorial I chose Jakarta, because according to my time zone is located.
  • Next step is to determine the method of providing partition  your hard disk . In this tutorial I am using the  Manual , because I want to determine its own partition.
  • The next process is to partition  the hard disk , because previously I chose to manually partition. Select the  hard disk  to be partitioned or divided. In this tutorial  hard disk  that I use is known by the name of SCSI3 (0,0,0) (sda).
  • Once selected it will display a dialog asking if the user would create a partition table  that will use new or old. In this tutorial I chose  Yes because I would make the  partition table  is new and delete old ones.
  • The next stage is to partition the  hard disk . In this step the user is required to create a new partition by selecting the  hard disk  that has been made ​​empty  partition table , and his status as  FREE  SPACE and not have a format. In the tutorial, it's the first time I will make the partition  swap , where the partition is used to help the working RAM on your computer at any time if the RAM can not handle the work in progress.
  • The next screen that appears is the question of what will be done by the user to  free  space  is. Because the goal is to create a new partition, I chose to  creat a new partition .
  • After that the user is required to include the capacity of the partition to be created, namely the partition  swap . In making the partition swap there is a formulation that can be used as a reference, ie if the RAM capacity of 1GB is smaller then the amount of  swap  is recommended is 2 x the amount of RAM, whereas if the RAM is greater than or equal to the number of partitions 1GB  swap  , it suggests the first x amount of RAM. However, this rule applies only to a relatively small RAM, if RAM is used is relatively large capacity, then the partition  swap  need not be large. On this occasion I was using 512MB of RAM, so the capacity of  swap that I give is 1 GB.
  • Users will be asked again associated type and location of the partition. For the type I use  Primary  and for the location, I put in the position of  Beginning .
  • The next step is to partition the setting of the  swap . On the  Use as , I chose  swap area  partition because it is intended to  swap . Select Done setting up the partition  which indicates the setting  swap has been completed.
  • Next is to create a partition for the system. Step-by-step through almost the same as creating a partition  swap  starting from number 17, namely by selecting the partition with the status of  FREE SPACE and not have a format  file system , then select  Create a new partition.
  • Then provide the capacity to be used by the partition, because I want to use all the remaining partitions from  the swap was (41.9 GB), then I just press the  Enter key . As for the type and location are still the same as the  swap , which is of type  Primary  and location of the Beginning .
  • For setting the partition ( Partition settings ) things to do, namely: the Use as  I use  JFS journaling file system . On the  label I put the SYSTEM . Label is used for naming, so it can be anything the user wants. Then select  Done setting up the partition , which means setting the system partition is complete.
  • Distribution of partitioning is almost complete. Next I choose Finish partitioning and write changes to disk  to resolve the division of partitioning  the hard disk . Ubuntu Server will show the summary  of the division of the partition that has been done, in the view users will also be asked if you want to implement it into your hard disk , so that the hard disk  can be used immediately I answered Yes and the basic system installation was performed.
  • The user will then dihadapkah in the process of  user and  password .For the first one done is giving the full name of the user who will use the system. In this tutorial I put my name is  Adam Kurniawan MRG .Enter the next  user  to be used as a  user login . For this I put adamkurniawan . The next process to enter a password  that will be used to log into the system twice. Ubuntu Server then asks if the user wants to perform encryption on  direcorty home  users. At practice, I answered  No .
  • The next process of Ubuntu Server will ask if the user wants to perform automatic updates using the internet or not. In this tutorial I chose  No automatic update  because I feel no need to do it.
  • The next stage is to choose soft peragkat everything I want to be paired on the Ubuntu Server. By  default  Ubuntu Server 10:10 provides software that usually runs on the  server . Software provided by Ubuntu Server are as follows: DNS server, LAMP server, Mail server, OpenSSH server, PostgreSQL database, print server, Samba file server, Tomcat Java server, and Virtual Machine host. For this tutorial in order to avoid  loss dependecy , so I chose it, because if at any time any of the above software needed for purposes that are not expected, the  administrator did not bother to install again.
  • After pressing  Enter , the installation began. In the midst of the installation process the user will be prompted to enter  a passwordfor MySQL as much as two times. Enter the  password  that is considered cool and safe. Still in the process of installing the software, return the user will be asked if you want to do konfgurasi Postfix or not. Postfix itself is a software used for the  Mail server . On this occasion I choose  No configuration . The installation process continues.
  • After the software installation process is complete, users will again be prompted to choose whether the user wants to install  the GRUB boot loader . In this tutorial I chose  Yes .
  • After the  Grub Loader  finished installed, then it indicates that the installation of Ubuntu Server is completed. In addition it also signified by the emergence of a new look  Finish the installation . SelectContinue , then the computer will  restart , and do not forget to change back  fisrboot it to  your hard drive .
  • After the  first boot  is changed to  the hard drive  and then after booting will instantly appear earlier than 10:10 Ubuntu Server that directly ask users to  login  to display CLI ( Command Line Interface ).