Monday, December 9, 2013

How to setup Debian Squeeze

Installation of Debian 6:

1. Boot from cd rom
2. It will promt you to install. select the Install and press enter.
3. Select Location other to chose region Asia. Then select Bangladesh.
4. Chose country to base default locale to United States and then select American English.
5. hostname : mail
6. Domain name: mehedi.com (yourdomain.com)
7. Select guided partition and select Manual partitioning method.
8.Now create new partition
    /boot partition    (remember bootable flag should be on)
     swap partion   (remember bootable flag should be off)
    /root partion   (remember bootable flag should be off)

9. Finish partitioning and write changes to disk....press enter and select yes.
10.now it will start for installing debian base systems
11.Now it will ask for archive mirroring country....select Go back and continue without network
   mirror...YES. ok. Otherwise later on it will use huge resource to synchronize packages wtih
   mirror server.
12.Software selection: uncheck ssh server & standard system utilities and continue.
13.Install Grub Boot loader ...Yes.



Preliminary Config for Package Install:

1.first time we will use nono editor to give ip address:  (As vim editor not available 1st time...after installation by default)
    #nano /etc/network/interfaces
configuration Script like this.....
______________________________________________________________________
------------------------------------------------------------------------
#The loopback network interface
auto lo
iface lo inet loopback                               
                                       
#The primary network interface                       
auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 192.168.0.244    [ISP provided WAN IP address here]
    netmask 255.255.255.0
    gateway 192.168.0.2


auto eth1
allow-hotplug eth1
iface eth1 inet static
    address 172.16.10.1    [Local LAN IP address here]
    netmask 255.255.0.0     [don't give any default gateway here]
-------------------------------------------------------------------------------------------
now reboot the Linux PC and  check through ping to default gateway of WAN ip address.....or
check both lan is detected through this command:
#mii-tool
_____________________________________________________________

2.Give the DNS IP in /etc/resolv.conf
LIKE THIS....


nameserver 202.84.33.13 202.844.33.20

or like this...

nameserver 202.84.33.13
nameserver 202.84.33.20   [max 3 nameserver entry allowed in debian]
nameserver 202.84.33.22


wow...now you can ping yahoo...google...etc.   


3. Now we have to update debian source list nano /etc/apt/source.list. Add the following lines...


deb http://ftp.debian.org/debian/ squeeze main
deb-src http://ftp.debian.org/debian/ squeeze main

or


deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main


4. GREAT...This is the Fianl step of Debian Priliminary Config....

#apt-get update    [It will download all the latest update]

#apt-get upgrade   [It will merge the downloaded update to installed debian ]

---------------------------------------------------------------------------------

        ****YAHOO!! Debian setup complete*******
---------------------------------------------------------------------------------


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
To Install Vim editor:
# apt-get install vim

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IF YOUR INTERNET CONNECTIVITY IS FROM NON-TRANSPARENT PROXY..
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Step 1: Edit your /etc/bash.bashrc file as root.
    #vim /etc/bash.bashrc   


Step 2: Put these line at the end of your /etc/bash.bashrc file :

    export http_proxy=http://root:mithupcs@192.168.0.1:8080/    [don't forget to give slash ( / ) at the end of both lines...]
    export ftp_proxy=http://root:mithupcs@192.168.0.1:8080/



N.B.R: You can omit the username:password, if your proxy server has no password.



============================================================
        @@@@@@@@ Enable ip_forwarding @@@@@@@@@@@
============================================================

Step 1: Edit the /etc/sysctl.conf and uncomment the following line to allow IPv4 forwarding:
    #vim /etc/sysctl.conf   

Step 2: Uncomment the line by removing hash (#)   
    net.ipv4.ip_forward=1

This will activate IPv4 forwarding at startup. If you don’t wan’t to restart your server, then execute the following command:

    #echo "1" > /proc /sys/net/ipv4/ip_forward

***Please remove the space between /proc and /sys.

No comments:

Post a Comment