Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Thursday, December 22, 2011

Basic Network Configuration of Linux System

Main configuration files

  • /etc/hostname : contains name of host machine ; give the hostname in this file to permanently change the hostname. Otherwise, use "hostname" command to change the hostname temporarily

#hostname client1.ciscofriend.comLinux Basic Networking

  • /etc/hosts : Contains Name to IP mapping in the local system
  • /etc/resolv.conf : Contains address of DNS servers
  • /etc/nsswitch.conf : Determines order in which name resolution take place in system. We can change the order in this file  to configure  system to check first DNS then host file etc.

Redhat Network Files

  • /etc/sysconfig/networks-scripts/ifcfg-eth0 : IP address information stored here
  • /etc/sysconfig/network : This file contains the hostname; but this is a non standard way, Ubuntu/Debain is using the correct way

Debian/Ubuntu Network files

  • /etc/network/interfaces

Commands to configure network

  • Ifconfig : dipsplay and configure network interfaces

#ifconfig eth0 192.168.1.22  (set the IP of Ethernet 0 interface to 192.168.1.22)

#ifconfig eth0 netmask 255.255.255.0  (set the subnet mask)

#ifconfig eth0 hw ether 00:00:00:00:00:11 (To change the MAC address of eth0 interface)

#route add default gw 192.168.1.1  (To change the default gateway)

  • Ifup : configure and activate network interface based on config files

#ifup eth0

  • Ifdown- disable configured network interfaces

#ifdown eth0

Tuesday, December 6, 2011

HTTP installation of RHEL6/CentOS/SL-6

On Server

  • Install apache server (HTTP server) using yum apache webserver5

#yum install httpd

Note: if you don’t know how to setup yum you can see this post

  • Mount the DVD (which is also specified in the above post) and copy the content to /var/www/html/cdrom

For example, if DVD is mounted to /cdrom directory, then

#cp –vrf /cdrom /var/www/html/

Note: alternatively, we can mount the DVD directly to the web accessible, /var/www/html/ path

  • Now, start the http service

#service httpd start

  • Check the setting using the web browser with server’s IP. If server IP is 192.168.1.10 then use http://192.168.1.10/cdrom 

Note: if firewall is on, turn off firewall or add exception to port 80

 

On the installation system

  • Download boot.iso from redhat.

Note: boot.iso not ship with DVD now. So we need to download it from redhat site. Alternatively we can use CentOS netinstall.iso, both are same

  • CentOS 6 netinstall.iso is available here:  redhat logo

http://mirrors.hns.net.in/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-netinstall.iso

http://mirrors.hns.net.in/centos/6.0/isos/i386/CentOS-6.0-i386-netinstall.iso

  • Write the the image to a CD and put it in the CD-ROM drive. Alternatively, we can use USB key. It is explained here.
  • Reboot the system and supply the following boot string at the end of current line without quotes by pressing tab

'linux repo=http://192.168.1.10/cdrom ip=192.168.1.20 netmask=255.255.255.0 gateway=192.168.1.1 dns=192.168.1.1'

Note: if more than one DNS server is available specify it using comma. DNS server address is optional. Here IP is the address of the current system

Friday, November 4, 2011

Installing GNS3 on CentOS 6.x/RHEL 6.x/Fedora 15


  1. Login as root then do the following steps:
    yum install python python-devel xorg-x11-proto-devel libXext-devel gcc-c++ libXrender*

  2. Download and install Qt
    #wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz
    #tar -xzf qt-everywhere-opensource-src-4.7.4.tar.gz
    #cd qt-everywhere-opensource-src-4.7.4
    #./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support
    #gmake
    #gmake install
    #PATH=/usr/local/Trolltech/Qt-4.7.4/bin:$PATH
    #export PATH

  3. Download and install sip
    #wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.13.tar.gz
    #tar -xvf sip-4.13.tar.gz
    #cd sip-4.13.tar
    #python configure.py
    #make
    #make install

  4. Download and install PyQt
    #wget http://ftp.pardus.org.tr/pub/source/2009/PyQt-x11-gpl-4.8.4.tar.gz
    #tar xvf PyQt-x11-gpl-4.8.4.tar.gz
    #cd PyQt-x11-gpl-4.8.4
    #python configure.py -q /usr/local/Trolltech/Qt-4.7.4/bin/qmake
    #make
    #make install

  5. Download GNS3
    #wget http://downloads.sourceforge.net/project/gns-3/GNS3/0.7.4/GNS3-0.7.4-src.tar.gz
    #tar -xvf GNS3*.tar.gz && rm GNS3*.tar.gz
    #cd GNS3-0.7.4-src
    #mkdir Dynamips IOS Project Cache Temp

  6. Download Dynamips depending up on OS (64-bit/32-bit)
    #cd dynamips
    #wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC2-amd64.bin?download (for 64-bit OS)
    #wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC3-community-x86.bin?download (for 32-bit OS)
    #chmod +x dynamips-0.2.8-RC2-amd64.bin (if we use 32-bit version, use the name of that file)

  7. Creating Quick launch with gns3 icon
    #wget http://www.noahbeach.com/wp-content/uploads/2011/08/gns3.png
    Now right click on the panel and select add to panel > custom launcher > select the gns3 location and press on the icon button to locate the icon just downloaded. ok
    Now if we press that icon in the panel, gns3 will run...!!!