云网牛站
所在位置:首页 > Linux教程 > 在Arch Linux和Manjaro系统上安装GNS3的方法

在Arch Linux和Manjaro系统上安装GNS3的方法

2019-03-15 09:01:28作者:陈自坚稿源:云网牛站

本文介绍在Arch Linux和Manjaro系统上安装GNS3的方法,适合所有基于Arch Linux的发行版。我们还将为Gns3创建一个启动器,适用于KDE、Gnome 3和Linux上其它桌面环境。其它系统安装参考在Ubuntu 18.04系统上安装GNS3的方法

 

安装GNS3的方法

按照如下步骤操作:

1、安装pip、wget、git和pyqt5:

sudo pacman -S python-pip wget git

sudo pacman -S python-pyqt5 qt5-tools qt5-multimedia

2、安装所需的所有Python包:

sudo pacman -S python-pyqt5 qt5-tools qt5-multimedia python-pyzmq

使用pip,也可以使用pip安装上面的python包:

sudo pip install --upgrade pip

sudo pip install -U tornado ws4py setuptools netifaces zmq dev

sudo pip install -U ws4py 

sudo pip install  pyqt5

3、安装gcc、cmake、libelf、libpcap:

sudo pacman -S gcc cmake libelf libpcap

4、安装Gns3 gui:

mkdir -p /tmp/gns3

cd /tmp/gns3 

git clone https://github.com/GNS3/gns3-gui.git

cd gns3-gui

sudo python setup.py install 

cd ..

5、安装Gns3服务器:

git clone https://github.com/GNS3/gns3-server.git

cd gns3-server

sudo python setup.py install 

cd ..

6、安装dynamips*:

git clone git://github.com/GNS3/dynamips.git

cd dynamips

mkdir build

cd build

cmake ..

make

sudo make install 

cd ../..

7、下载并安装iouyap:

git clone http://github.com/ndevilla/iniparser.git

cd iniparser

make

sudo cp libiniparser.* /usr/lib/

sudo cp src/iniparser.h /usr/local/include

sudo cp src/dictionary.h /usr/local/include

cd ..

git clone https://github.com/GNS3/iouyap.git

cd iouyap

make

sudo make install

输出如下信息:

cloning into 'iouyap'...

remote: Counting objects: 120, done.

remote: Total 120 (delta 0), reused 0 (delta 0), pack-reused 120

Receiving objects: 100% (120/120), 165.39 KiB | 65.00 KiB/s, done.

Resolving deltas: 100% (61/61), done.

Checking connectivity... done.

gcc -Wall -c -o iouyap.o iouyap.c

bison -y -d netmap_parse.y 

mv -f y.tab.c netmap_parse.c

gcc -Wall -c -o netmap_parse.o netmap_parse.c

flex -t netmap_scan.l > netmap_scan.c

gcc -Wall -c -o netmap_scan.o netmap_scan.c

gcc -Wall -c -o netmap.o netmap.c

gcc -Wall -c -o config.o config.c

gcc -Wall -c -o iniparser/iniparser.o iniparser/iniparser.c

gcc -Wall -c -o iniparser/dictionary.o iniparser/dictionary.c

gcc iouyap.o netmap_parse.o netmap_scan.o netmap.o config.o iniparser/iniparser.o iniparser/dictionary.o -lpthread -o iouyap

rm netmap_scan.c netmap_parse.c

chmod +x iouyap

cp iouyap /usr/local/bin

setcap cap_net_admin,cap_net_raw=ep /usr/local/bin/iouyap

8、安装initparser:

sudo pacman -S bison flex git

输出信息如下:

pacman -S bison flex git 

warning: bison-3.0.4-1 is up to date -- reinstalling

warning: flex-2.6.0-2 is up to date -- reinstalling

warning: git-2.8.0-1 is up to date -- reinstalling

resolving dependencies...

looking for conflicting ppackages... 

Packages (3) bison-3.0.4-1 flex-2.6.0-2 git-2.8.0-1 

Total Download Size: 1.34 MiB

Total Installed Size: 30.70 MiB

Net Upgrade Size: 0.00 MiB 

:: Proceed with installation? [Y/n] y

:: Retrieving packages...

bison-3.0.4-1-x86_64 557.8 KiB 289K/s 00:02 [############################] 100%

flex-2.6.0-2-x86_64 812.0 KiB 331K/s 00:02 [############################] 100%

(3/3) checking keys in keyring [############################] 100%

(3/3) checking package integrity [############################] 100%

(3/3) loading package files [############################] 100%

(3/3) checking for file conflicts [############################] 100%

:: Processing package changes...

(1/3) reinstalling bison [############################] 100%

(2/3) reinstalling flex [############################] 100%

(3/3) reinstalling git [############################] 100%

然后:

git clone http://github.com/ndevilla/iniparser.git

cd iniparser

make

sudo cp libiniparser.* /usr/lib/

sudo cp src/iniparser.h /usr/local/include

sudo cp src/dictionary.h /usr/local/include 

cd ..

输出如下:

git clone http://github.com/ndevilla/iniparser.git

cd iniparser

make

sudo cp libiniparser.* /usr/lib/

sudo cp src/iniparser.h /usr/local/include

sudo cp src/dictionary.h /usr/local/include

Cloning into 'iniparser'...

remote: Counting objects: 372, done.

remote: Total 372 (delta 0), reused 0 (delta 0), pack-reused 372

Receiving objects: 100% (372/372), 135.36 KiB | 122.00 KiB/s, done.

Resolving deltas: 100% (180/180), done.

Checking connectivity... done.

CC src/iniparser.o

CC src/dictionary.o

AR libiniparser.a

a - src/iniparser.o

a - src/dictionary.o

RANLIB libiniparser.a

LINK libiniparser.so.1

9、安装vpcs*:

git clone https://github.com/GNS3/vpcs.git

cd vpcs/src

sh mk.sh

cp vpcs /usr/local/bin/

chmod +x /usr/local/bin/vpcs

cd ../..

输出信息:

Cloning into 'vpcs'...

remote: Counting objects: 962, done.

remote: Total 962 (delta 0), reused 0 (delta 0), pack-reused 962

Receiving objects: 100% (962/962), 589.36 KiB | 190.00 KiB/s, done.

Resolving deltas: 100% (727/727), done.

Checking connectivity... done.

10、安装ubridge:

git clone https://github.com/GNS3/ubridge.git

cd ubridge

make

sudo make install

cd ..

11、创建启动器:

sudo pacman -S vim

sudo pacman -S nano

下载logo image以用作icon:

cd /usr/share/

wget https://www.gns3.com/assets/images/logo-colour.png

在Arch Linux和Manjaro系统上安装GNS3的方法

使用nano或vim创建gns3.desktop文件:

vim /usr/share/applications/gns3.desktop

或者:

nano /usr/share/applications/gns3.desktop

添加以下内容,保存然后退出:

[Desktop Entry]

Type=Application 

Version=1.4.4 

Name=GNS3 

GenericName=Graphical Network Simulator

Comment= Network simulator 

Path=/usr/bin/gns3 

TryExec=/usr/bin/gns3

Exec=/usr/bin/gns3 %f

Icon=/usr/share/logo-colour.png 

Terminal=false 

MimeType=application/vnd.tcpdump.pcap;application/x-pcapng;application/x-snoop;application/x-iptrace;application/x-lanalyzer;application/x-nettl;application/x-radcom;application/x-etherpeek;application/x-visualnetworks;application/x-netinstobserver;application/x-5view;

Categories=Application;Network;

至此,现在可以通过在应用程序搜索框中输入Gns3来启动Gns3,然后简单配置Gns3一下即可,请参考最开头的在Ubuntu 18.04系统上安装GNS3的文章:

在Arch Linux和Manjaro系统上安装GNS3的方法

 

相关主题

在Fedora 29系统上安装GNS3的方法

精选文章
热门文章