How to install and configure Debian 7 wheezy
Posted by Md. Mahidul Hasan on 1:04 PM with 1 comment
How to install and configure Debian 7 wheezy
I know for a new beginner Linux installation is not easy. Specially if you come from windows background. In Linux you need to understand some basic info regarding partitioning and Linux data structure for going forward. But don't worry everyone has started from zero. So, If you are a new bee in Linux, don't worry at all. Guys like us always here to help at your journey to the Linux world. :-D
Introduction:
In this document I have used the following settings as an example:
Real IP
Subnet mask : 255.255.255.224
Gateway
Local IP
Local Network
Domain name
So lets get start with Debian wheezy Installation. First put the Debian wheezy disk to the DVD drive. Then when a massage come about press any key. Then type any key from the keyboard. Then follow the bellow foot steps-
Language
Country
Keymap to use
IP address
Netmask
Gateway
Name server address
Domain name
Host name
Root password
Root password validity
Full name for new user
User name to the account
Choose a password
Scan another cd/ dvd
Use network mirror
Partitioning method
Select disk to partition
Partitioing Scheme
Partition for linux OS Debian. Keep 250 MB for boot and blootable flag shuld be on. Then make a partition of the double the size of your RAM and assign it as SWAP partition. Rest of the space keep as root(/).
Primary /boot - 256mb - Bootable Flag ON
Primary swap - 2 X Ram - Bootable Flag OFF
Primary / - Rest of HDD - Bootable Flag OFF
Finish partitioning and write changes to the disk: yes
Participate into popular uses survey : no
Chose software to install
Workgroup / domain name : mahidul.com
Modify smb.conf to us wins : no
Install the GRUB boot loader to the master boot: yes
Install the GRUB2 boot loader to the master boot: no
Choose software to install : Do not select any software from here.
Finish the installation and reboot the server. Now let assign network ip address so that we get Internet connectivity.
First update source list:
root@mail:~# nano /etc/apt/sources.list
deb http://ftp.us.debian.org/debian wheezy main
deb http://security.debian.org/debian-security squeeze/updates main
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main
Then setup ip address to the NIC card:
root@mail:~# nano /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
address 123.123.123.123
netmask 255.255.255.224
network 123.123.123.64
broadcast 123.123.123.95
gateway 123.123.123.65
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4
dns-search mahidul.com
allow-hotplug eth1
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
#This configuration divided eth1 into 2 logical port to support 2 network using 1 port. Genarelly you dont need the bellow configuration.
#allow-hotplug eth1:0
#auto eth1:0
#iface eth1:0 inet static
# address 192.168.1.254
# netmask 255.255.255.0
Restart the network interface.
root@mail:~# /etc/init.d/networking restart
Update your DNS address. It may be your own dns or may be your isp dns.
root@mail:~# vim /etc/resolv.conf
dns-name servers 8.8.8.8 8.8.4.4
Set the host name for the machine:
root@mail:~# vim /etc/hosts
123.123.123.123 mail.mahidul.com mail
root@mail:~# vim /etc/hostname
Now update the source list and upgrade your all software packages.
root@mail:~# apt-get update
root@mail:~# apt-get upgrade
root@mail:~# vim /etc/passwd
: %s/bin\ /sh/bin\ /false/g
Set the date:
root@mail:~# date
root@mail:~# date --set 12:33:00
root@mail:~# date --set 04-05-2011
root@mail:~# hwclock --systohc
Enable data transfer between the NIC cards. I mean enable packet forwarding:
root@mail:~# vim /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
Install some very important softwares:
root@mail:~# apt-get install vim iftop telnet alpine traceroute lynx -y
root@mail:~# apt-get install rcconf
root@mail:~# rcconf
# then selects the iptables option from here to start automatically every time after restart.
Install some dependencies:
root@mail:~# apt-get install gcc g++ make
Install and configure ssh for remote login:
root@mail:~# apt-get install ssh
root@mail:~# vim /etc/ssh/sshd_config
Port 78
Permit_Root_Login: no
root@mail:~# /etc/init.d/ssh restart
That’s all for a start. :-D Pretty easy! Isn’t it!!!!
Categories: How to install and configure Debian 7 wheezy
Hi there! I could have sworn I've been to this site before but after browsing through some of the post I realized it's new to me. Nonetheless, I'm definitely delighted I found it and I'll be book-marking and checking back often!
ReplyDelete