Jump to content


2
[Tutorial]

How To Install GNS3 on Centos/Redhat/Fedora



33 replies to this topic

#1 Glavin

Glavin

    VERSION 1.0

  • Senior Super Moderators
  • 698 posts
  • 42527 thanks

Posted 20 June 2010 - 11:05 AM

You won't find detailed instructions for GNS3 installation on Centos/Redhat/Fedora over the net, So I decided to make one for our certcollection members. Installing GNS3 on Centos/Redhat/Fedora can be very tedious task. But If you follow my Steps given below you can setup and run GNS3 without any difficulty. Since Qt 4.5.1 binary which is required for GNS3 is not available for these OS's, we'll have to compile it from the source.

IMP:: Installation of all this packages will take a lot of time. So do it in the free time.

OK lets roll

First we'll have to install dependencies

[user@admin ~]$ su

Password: (Type in your root password here)

[root@admin /]# yum install python python-devel xorg-x11-proto-devel libXext-devel

[root@admin /]# yum install gcc-c++



Now we'll download and install Qt4

[root@admin /]#cd /tmp

[root@admin tmp#wget http://ftp.heanet.ie/disk1/ftp.trolltech.com/pub/qt/source/qt-x11-opensource-src-4.5.1.tar.gz

[root@admin tmp]#tar xzf qt-x11-opensource-src-4.5.1.tar.gz

[root@admin tmp]# cd qt-x11-opensource-src-4.5.1

[root@admin qt-x11-opensource-src-4.5.1]#./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support

[root@admin qt-x11-opensource-src-4.5.1]#gmake <====This might take 2-3 hrs.

[root@admin qt-x11-opensource-src-4.5.1]#gmake install <====Another 30 mins or so

[root@admin qt-x11-opensource-src-4.5.1]#PATH=/usr/local/Trolltech/Qt-4.5.1/bin:$PATH

[root@admin qt-x11-opensource-src-4.5.1]#export PATH


Next we'll install SIP

[root@admin qt-x11-opensource-src-4.5.1]#cd ..

[root@admin tmp]#wget http://cvs.fedoraproject.org/lookaside/pkgs/sip/sip-4.8.1.tar.gz/859e5b103ba5a083e4f2021eb6d99b26/sip-4.8.1.tar.gz

[root@admin tmp]#tar xzf sip-4.8.1.tar.gz

[root@admin tmp]#cd sip-4.8.1

[root@admin sip-4.8.1]#python configure.py

[root@admin sip-4.8.1]#make

[root@admin sip-4.8.1]#make install


Next we'll Install PyQt4

[root@admin sip-4.8.1]#cd ..

[root@admin tmp]#wget http://cvs.fedoraproject.org/lookaside/pkgs/PyQt4/PyQt-x11-gpl-4.5.2.tar.gz/997269d78aced5b1105edb155d49e248/PyQt-x11-gpl-4.5.2.tar.gz

[root@admin tmp]#tar xzf PyQt-x11-gpl-4.5.2.tar.gz

[root@admin tmp]#cd PyQt-x11-gpl-4.5.2

[root@admin PyQt-x11-gpl-4.5.2]#python configure.py

[root@admin PyQt-x11-gpl-4.5.2]#make <=====This will take 30-60 mins

[root@admin PyQt-x11-gpl-4.5.2]#make install


We are done with compiling part, now lets download GNS3 source files

[root@admin tmp]#cd /opt

[root@admin opt]#wget http://space.dl.sourceforge.net/project/gns-3/GNS3/0.7.3/GNS3-0.7.3-src.tar.bz2

[root@admin opt]#tar -xjvf GNS3-0.7.3-src.tar.bz2 && rm GNS3-0.7.3-src.tar.bz2

[root@admin opt]#mv GNS3-0.7.3-src /opt/GNS3


Create the following directories:
These directories will be used by GNS3 – such as projects – where your working projects will be stored, cache, temp, IOS images, etc.

[root@admin opt]#cd /opt/GNS3
[root@admin GNS3]#mkdir Dynamips
[root@admin GNS3]#mkdir IOS
[root@admin GNS3]#mkdir Project
[root@admin GNS3]#mkdir Cache
[root@admin GNS3]#mkdir tmp
[root@admin GNS3]#chmod o+rw -R ./Project
[root@admin GNS3]#chmod o+rw -R ./tmp

[root@admin GNS3]#chmod o+rw -R ./IOS

Download binary of dynamips and make it executable

[root@admin GNS3]#cd Dynamips

[root@admin Dynamips ]#wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin

[root@admin Dynamips ]#chmod +x ./dynamips-0.2.8-RC2-x86.bin

IMP:: For 64-bit users
[root@admin Dynamips ]#wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin
[root@admin Dynamips ]#chmod +x ./dynamips-0.2.8-RC2-amd64.bin

You can create a desktop shortcut by right-clicking on the desktop and select “Create Launcher..”, Name it GNS3 and in the command section type in


python "/opt/GNS3/gns3"

Double click to open GNS3 and we will edit the default settings. If you don’t want to use desktop icons you can create a launcher from your programs menu by right clicking on the Main Menu, selecting Edit Menu. Select New Item on the right and you will be presented with the same window where you type in the above. From there you can move the launcher into any menu section of your choice.

Fire up GNS3

* Go to edit | preferences and in the ‘Terminal command:’ section type in:
gnome-terminal -t %d -e 'telnet %h %p' > /dev/null 2>&1 &

* Under ‘Paths’ change the ‘Project directory:’ to
/opt/GNS3/Project
and the ‘IOS/PIX directory:’ to
/opt/GNS3/IOS

* Click on Dynamips tab on the left
For the ‘Executable path:’ type in
/opt/GNS3/Dynamips/dynamips-0.2.8-RC2-x86.bin

* Change the ‘Working directory:’ to
/opt/GNS3/tmp
Click on the Capture tab on the left

* For the ‘Working directory for capture files:’ change it to
/opt/GNS3/Project

Imp:: When you want to stop the router, use right click stop on the router.

After you have done all that, you will be able to Open and Save your GNS3 projects properly and have an efficient setup for GNS3. In order to use the devices in GNS3 you must obtain our own IOS images from Cisco or you can request for it @ http://certcollection.org/forum/index.php?/forum/203-ios-and-related-cisco-files/

In my next tutorial, we'll install loopback adapter on Centos/Redhat/Fedora for GNS3.

http://certcollection.org/forum/index.php?/topic/36486-tutorialhow-to-create-a-loopback-interface-in-linux-for-gns3/

Find More Tutorials on Gns3
http://networkingtips-tricks.blogspot.com/search/label/GNS3%20Tutorials


Happy Learning :)
Before posting under Share sections, Make sure you've read the updated rules posted here http://certcollection.org/forum/forum-175/announcement-8-share-section-rules-read-before-posting/

Help us keep this forum clean by reporting spam / scam / non IT related posts and threads.

Follow us on http://twitter.com/certcollection

Thanked by 7 Members:
tazzmancd , Muntu , kimbushero , zizozoro , rsaim , rajgan , abode83

#2 thinmin

thinmin

    Advanced Member

  • Members
  • PipPipPip
  • 254 posts
  • 5352 thanks

Posted 20 June 2010 - 02:19 PM

Nice work, Tks man!
Pls follow the forum rules.
Use [Req] for request.
Use [Offer] for offer.
Use search option before you post.


Now you joined the top IT Community. It is time to join the number 1 team

http://certcollection.org/forum/index.php?/topic/41225-join-our-staff-team/
http://certcollection.org/forum/index.php?/blog/3/entry-505-join-our-staff-team/

Thanked by 1 Member:
dolbyamsc

#3 henyongadik01

henyongadik01

    Advanced Member

  • Members
  • PipPipPip
  • 182 posts
  • 1486 thanks

Posted 20 June 2010 - 09:34 PM

hahaha! you're awesome! thanks!
MCTS 83-640 70-642
MCITP 70-646
CCNA
MBA

Loading Linux...

#4 iQvoice

iQvoice

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts
  • 148 thanks

Posted 21 June 2010 - 04:07 AM

Hi Glavin...

DUUUUUDDDE, YOU ARE AMAZINGLY TOO GOOD AT WHAT YOU DO!!!

YOUR LINUX PROFICIENCY... TWO THUMBS UP!!!

keep it rolling partner.

God bless,
iqvoice

Edited by iQvoice, 21 June 2010 - 04:11 AM.


#5 henyongadik01

henyongadik01

    Advanced Member

  • Members
  • PipPipPip
  • 182 posts
  • 1486 thanks

Posted 21 June 2010 - 10:00 PM

btw, is there a different instruction for 64bit?
MCTS 83-640 70-642
MCITP 70-646
CCNA
MBA

Loading Linux...

#6 Glavin

Glavin

    VERSION 1.0

  • Senior Super Moderators
  • 698 posts
  • 42527 thanks

Posted 22 June 2010 - 04:45 AM

View Posthenyongadik01, on 21 June 2010 - 10:00 PM, said:

btw, is there a different instruction for 64bit?

Just download dynamips-0.2.8-RC2-amd64.bin instead of dynamips-0.2.8-RC2-x86.bin, rest of the instructions are same for both 32 and 64bit systems.
#wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin
#chmod +x ./dynamips-0.2.8-RC2-amd64.bin
Before posting under Share sections, Make sure you've read the updated rules posted here http://certcollection.org/forum/forum-175/announcement-8-share-section-rules-read-before-posting/

Help us keep this forum clean by reporting spam / scam / non IT related posts and threads.

Follow us on http://twitter.com/certcollection

#7 henyongadik01

henyongadik01

    Advanced Member

  • Members
  • PipPipPip
  • 182 posts
  • 1486 thanks

Posted 22 June 2010 - 07:12 AM

thanks. btw, id done it successfully in ubuntu 64 bit. thanks again.
MCTS 83-640 70-642
MCITP 70-646
CCNA
MBA

Loading Linux...

#8 johnbozoin

johnbozoin

    Junior Member

  • Members
  • PipPip
  • 1 posts
  • 0 thanks

Posted 25 June 2010 - 09:22 AM

I dont know how to thank you .......you are my personal Jesus Christ ... man ....
You are 65,536 bit Awesome.... man

If i am not asking for tooo much ... Can you please explain how we can add ASA int this GNS3... I guess it needs Qemu

#9 futuredon

futuredon

    Member

  • Members
  • PipPip
  • 32 posts
  • 228 thanks

Posted 03 August 2010 - 04:00 PM

Respect Man, you are wonderful....God Bless you real good, you came in just in time

#10 sameerpervaiz

sameerpervaiz

    Member

  • Members
  • PipPip
  • 16 posts
  • 0 thanks

Posted 10 March 2011 - 10:42 AM

I am installling GNS on Cenos 5.5 everything is fine there is not error in the installation, when i run gns from link with python "/opt/GNS3/gns3" there is no error and gns is not running even i try to run gns from /opt/GNS3/gns3 but the result is same gns is not running

waiting for any helpfull commnets


View PostGlavin, on 20 June 2010 - 11:05 AM, said:

You won't find detailed instructions for GNS3 installation on Centos/Redhat/Fedora over the net, So I decided to make one for our certcollection members. Installing GNS3 on Centos/Redhat/Fedora can be very tedious task. But If you follow my Steps given below you can setup and run GNS3 without any difficulty. Since Qt 4.5.1 binary which is required for GNS3 is not available for these OS's, we'll have to compile it from the source.

IMP:: Installation of all this packages will take a lot of time. So do it when you are free.

OK lets roll

First we'll have to install dependencies

[user@admin ~]$ su

Password: (Type in your root password here)

[root@admin /]# yum install python python-devel xorg-x11-proto-devel libXext-devel

[root@admin /]# yum install gcc-c++



Now we'll download and install Qt4

[root@admin /]#cd /tmp

[root@admin tmp#wget http://ftp.uludag.org.tr/pub/source/2009/qt-x11-opensource-src-4.5.1.tar.gz

[root@admin tmp]#tar xzf qt-x11-opensource-src-4.5.1.tar.gz

[root@admin tmp]# cd qt-x11-opensource-src-4.5.1

[root@admin qt-x11-opensource-src-4.5.1]#./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support

[root@admin qt-x11-opensource-src-4.5.1]#gmake <====This might take 2-3 hrs.

[root@admin qt-x11-opensource-src-4.5.1]#gmake install <====Another 30 mins or so

[root@admin qt-x11-opensource-src-4.5.1]#PATH=/usr/local/Trolltech/Qt-4.5.1/bin:$PATH

[root@admin qt-x11-opensource-src-4.5.1]#export PATH


Next we'll install SIP

[root@admin qt-x11-opensource-src-4.5.1]#cd ..

[root@admin tmp]#wget http://ftp.uludag.org.tr/pub/source/2009/sip-4.8.1.tar.gz

[root@admin tmp]#tar xzf sip-4.8.1.tar.gz

[root@admin tmp]#cd sip-4.8.1

[root@admin sip-4.8.1]#python configure.py

[root@admin sip-4.8.1]#make

[root@admin sip-4.8.1]#make install


Next we'll Install PyQt4

[root@admin sip-4.8.1]#cd ..

[root@admin tmp]#wget http://ftp.uludag.org.tr/pub/source/2009/PyQt-x11-gpl-4.5.2.tar.gz

[root@admin tmp]#tar xzf PyQt-x11-gpl-4.5.2.tar.gz

[root@admin tmp]#cd PyQt-x11-gpl-4.5.2

[root@admin PyQt-x11-gpl-4.5.2]#python configure.py

[root@admin PyQt-x11-gpl-4.5.2]#make <=====This will take 30-60 mins

[root@admin PyQt-x11-gpl-4.5.2]#make install


We are done with compiling part, now lets download GNS3 source files

[root@admin tmp]#cd /opt

[root@admin opt]#wget http://space.dl.sourceforge.net/project/gns-3/GNS3/0.7.2/GNS3-0.7.2-src.tar.bz2

[root@admin opt]#tar -xjvf GNS3-0.7.2-src.tar.bz2 && rm GNS3-0.7.2-src.tar.bz2

[root@admin opt]#mv GNS3-0.7.2-src /opt/GNS3


Create the following directories:
These directories will be used by GNS3 – such as projects – where your working projects will be stored, cache, temp, IOS images, etc.

[root@admin opt]#cd /opt/GNS3
[root@admin GNS3]#mkdir Dynamips
[root@admin GNS3]#mkdir IOS
[root@admin GNS3]#mkdir Project
[root@admin GNS3]#mkdir Cache
[root@admin GNS3]#mkdir tmp
[root@admin GNS3]#chmod o+rw -R ./Project
[root@admin GNS3]#chmod o+rw -R ./tmp

[root@admin GNS3]#chmod o+rw -R ./IOS

Download binary of dynamips and make it executable

[root@admin GNS3]#cd Dynamips

[root@admin Dynamips ]#wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin

[root@admin Dynamips ]#chmod +x ./dynamips-0.2.8-RC2-x86.bin

IMP:: For 64-bit users
[root@admin Dynamips ]#wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin
[root@admin Dynamips ]#chmod +x ./dynamips-0.2.8-RC2-amd64.bin

You can create a desktop shortcut by right-clicking on the desktop and select “Create Launcher..”, Name it GNS3 and in the command section type in


python "/opt/GNS3/gns3"

Double click to open GNS3 and we will edit the default settings. If you don’t want to use desktop icons you can create a launcher from your programs menu by right clicking on the Main Menu, selecting Edit Menu. Select New Item on the right and you will be presented with the same window where you type in the above. From there you can move the launcher into any menu section of your choice.

Fire up GNS3

* Go to edit | preferences and in the ‘Terminal command:’ section type in:
gnome-terminal -t %d -e 'telnet %h %p' > /dev/null 2>&1 &

* Under ‘Paths’ change the ‘Project directory:’ to
/opt/GNS3/Project
and the ‘IOS/PIX directory:’ to
/opt/GNS3/IOS

* Click on Dynamips tab on the left
For the ‘Executable path:’ type in
/opt/GNS3/Dynamips/dynamips-0.2.8-RC2-x86.bin

* Change the ‘Working directory:’ to
/opt/GNS3/tmp
Click on the Capture tab on the left

* For the ‘Working directory for capture files:’ change it to
/opt/GNS3/Project

Imp:: When you want to stop the router, use right click stop on the router.

After you have done all that, you will be able to Open and Save your GNS3 projects properly and have an efficient setup for GNS3. In order to use the devices in GNS3 you must obtain our own IOS images from Cisco or you can request for it @ http://certcollection.org/forum/index.php?/forum/203-ios-and-related-cisco-files/

I
n my next tutorial, we'll install loopback adapter on Centos/Redhat/Fedora for GNS3.

http://certcollection.org/forum/index.php?/topic/36486-tutorialhow-to-create-a-loopback-interface-in-linux-for-gns3/

Find More Tutorials on Gns3
http://networkingtips-tricks.blogspot.com/search/label/GNS3%20Tutorials


Happy Learning :)


#11 Glavin

Glavin

    VERSION 1.0

  • Senior Super Moderators
  • 698 posts
  • 42527 thanks

Posted 10 March 2011 - 01:16 PM

Run GNS3 through the Terminal and post the error you are getting here.
Before posting under Share sections, Make sure you've read the updated rules posted here http://certcollection.org/forum/forum-175/announcement-8-share-section-rules-read-before-posting/

Help us keep this forum clean by reporting spam / scam / non IT related posts and threads.

Follow us on http://twitter.com/certcollection

#12 cyberwiz

cyberwiz

    Newbie

  • Members
  • PipPip
  • 1 posts
  • 0 thanks

Posted 13 April 2011 - 07:22 AM

New GNS3 0.7.4 released , New GNS3 source fix for this tutorial

OLD

Quote

We are done with compiling part, now lets download GNS3 source files

[root@admin tmp]#cd /opt

[root@admin opt]#wget http://space.dl.sourceforge.net/project/gns-3/GNS3/0.7.3/GNS3-0.7.3-src.tar.bz2

[root@admin opt]#tar -xjvf GNS3-0.7.3-src.tar.bz2 && rm GNS3-0.7.3-src.tar.bz2

[root@admin opt]#mv GNS3-0.7.3-src /opt/GNS3

New

Quote

[root@admin tmp]#cd /opt

[root@admin opt]#wget http://nchc.dl.sourceforge.net/project/gns-3/GNS3/0.7.4/GNS3-0.7.4-src.tar.bz2

[root@admin opt]#tar -xjvf GNS3-0.7.4-src.tar.bz2 && rm GNS3-0.7.4-src.tar.bz2

[root@admin opt]#mv GNS3-0.7.4-src /opt/GNS3

Edited by cyberwiz, 13 April 2011 - 07:31 AM.


#13 breadmakerca

breadmakerca

    Member

  • Members
  • PipPip
  • 21 posts
  • 0 thanks

Posted 24 April 2011 - 10:19 PM

Installing GNS3 on CentOS 5.6 64 bits ( vmware)
Followed the tutorial  and everything went fine.
But could not fire GNS3.
Nothing happens when double clicking the  shortcut.
When executing the command on a terminal session I keep receiving the error message:
[root@localhost Dynamips]# python /opt/GNS3/gns3
Can't import Qt modules, PyQt is probably not installed ...
[root@localhost Dynamips]# python2.6 /opt/GNS3/gns3
Can't import Qt modules, PyQt is probably not installed ...

Any help would be much appreciated.

#14 Glavin

Glavin

    VERSION 1.0

  • Senior Super Moderators
  • 698 posts
  • 42527 thanks

Posted 25 April 2011 - 06:08 AM

Go through Next we'll Install PyQt4 part again.
Before posting under Share sections, Make sure you've read the updated rules posted here http://certcollection.org/forum/forum-175/announcement-8-share-section-rules-read-before-posting/

Help us keep this forum clean by reporting spam / scam / non IT related posts and threads.

Follow us on http://twitter.com/certcollection




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Organization

Community

Downloads

Test Providers

Site Info


Go to top