GNS3 on Centos / Red
                        发布时间:2019-07-11 09:55:55编辑:auto阅读(2148)
                        
                        1.安装必要的软件包
yum install  python python-devel xorg-x11-proto-devel libXext-devel
yum install  gcc-c++
2.下载qt4、pyqt4、sip4,这几个包可以在我的服务器上下载
cd /tmp
wget http://61.160.250.243:1000/GNS3/GNS3-0.7.2-src.tar.bz2
wget http://61.160.250.243:1000/GNS3/PyQt-x11-gpl-4.5.2.tar.gz
wget http://61.160.250.243:1000/GNS3/qt-x11-opensource-src-4.5.1.tar.gz
wget http://61.160.250.243:1000/GNS3/sip-4.8.1.tar.gz
3.编译Qt4
cd /tmp
tar zxvf  qt-x11-opensource-src-4.5.1.tar.gz
cd  qt-x11-opensource-src-4.5.1
./configure  -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support  //等几分钟
gmake   //等吧,1小时-3小时不等
gmake install     //继续等,30分钟或者更长
export  PATH=/usr/local/Trolltech/Qt-4.5.1/bin:$PATH
 
 
4.编译sip
cd /tmp
tar zxvf  sip-4.8.1.tar.gz
cd sip-4.8.1
python  configure.py
make 
make install
5.编译PyQt
cd /tmp
tar zxvf  PyQt-x11-gpl-4.5.2.tar.gz
cd  PyQt-x11-gpl-4.5.2
python  configure.py
make   //继续等,差不多30分钟以上
make install 
 
  
6.安装GNS3
cd /tmp
tar jxvf  GNS3-0.7.2-src.tar.bz2 -C /opt
mv  /opt/GNS3-0.7.2-src /opt/GNS3
7.创建几个目录
mkdir  /opt/GNS3/Dynamips
mkdir  /opt/GNS3/IOS
cd  /opt/GNS3/Dynamips
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin     //for 32bit
chmod +x  ./dynamips-0.2.8-RC2-x86.bin
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin //for 64bit
chmod +x  ./dynamips-0.2.8-RC2-amd64.bin
8.运 行GNS3
python  /opt/GNS3/gns3
按照上述方法运行python   /opt/GNS3/gns3会提示:
[root@localhost GNS3]# ./gns3 
Can't import Qt modules, PyQt is probably not installed ...
解决方法:
I’ve finally decided to move away from configuring all my emulators  on the CLI and use 
GNS3. 
The primary reason for using a GUI over the CLI is ease-of-use. 
Whenever I run into a unique routing problem or need to conduct a proof
of concept on a technology at work, I found that the whole process of
generating a .net configuration was time consuming.  Using GNS3 allows
me to quickly point-and-click my way to a new scenario in just minutes.
After downloading the source files, I attempted to run ./gns3 and  encountered the following error message:
[root@CTSLA-NMS19 GNS3-0.6-src]# ./gns3
Can’t import Qt modules, PyQt is probably not installed …
To satisfy the installation requirements, I needed to install or  update a few of the dependencies:
[root@CTSLA-NMS19 GNS3-0.6-src]# yum -y install python sip qt4  PyQt4
[root@localhost GNS3]# yum -y install python sip qt4 PyQt4
已加载插件:presto, refresh-packagekit
设置安装进程
包 python-2.6.4-27.fc13.i686 已安装并且是最新版本
包 sip-4.10.2-1.fc13.i686 已安装并且是最新版本
包 1:qt-4.6.2-20.fc13.i686 已安装并且是最新版本
解决依赖关系
--> 执行事务检查
---> 软件包 PyQt4.i686 0:4.7.3-1.fc13 将被 升级
--> 完成依赖关系计算
依赖关系解决
================================================================================
 软件包          架构           版本                     仓库              大小
================================================================================
正在安装:
 PyQt4           i686           4.7.3-1.fc13             fedora           2.1 M
事务概要
================================================================================
安装       1 软件包
更新       0 软件包
总下载量:2.1 M
Installed size: 12 M
下载软件包:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 2.1 M
PyQt4-4.7.3-1.fc13.i686.rpm                              | 2.1 MB     00:16     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
  正在安装       : PyQt4-4.7.3-1.fc13.i686                                  1/1 
已安装:
  PyQt4.i686 0:4.7.3-1.fc13                                                     
完毕!
Once PyQt4  was installed, GNS3 opened properly.
至此,在Fedora上可以运行GNS3了
 
                            
关键字: