溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

linuxCentos_8 安裝cisco_yang-exp

發(fā)布時間:2020-03-03 10:34:29 來源:網絡 閱讀:538 作者:河南慕慕 欄目:網絡安全

linuxCentos_8 安裝cisco_yang-explorer 需要先安裝python2

安裝python2.7 所需的依賴包
yum install gcc openssl-devel bzip2-devel
安裝python2.7
yum install python2
進入linux的軟連接存放位置
cd /usr/bin
.查看現有python的軟連接指向的版本
ls -al *python*
刪除舊的軟連接
sudo rm python2
建立新的軟連接
sudo ln -s python2.7 python
安裝 PIP2
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

============================
安裝python2 虛擬環(huán)境

pip2 install virtualenv
安裝依賴組件
yum install libxml2-devel libxslt-devel python2-devel zlib-devel
graphviz(可視化圖形工具)
yum install graphviz
安裝pyang
pip2 install pyang
安裝Git
yum install git
安裝yang-explorer
[root@localhost ~]#git clone https://github.com/CiscoDevNet/yang-explorer.git
[root@localhost ~]# cd yang-explorer/
[root@localhost yang-explorer]# bash setup.sh
~忽略安裝內容~
#提示是否使用root初始化數據集
Do you want to continue as root ? (n/N) y
編輯YangExplorer.html //
[root@localhost static]# pwd
/root/yang-explorer/server/static
[root@localhost static]# vi YangExplorer.html
linuxCentos_8 安裝cisco_yang-exp
編輯后如下圖(編輯60,61行內容host=本linux,ip地址,port= 8088 #ip和端口要用《‘ ’》引起):
linuxCentos_8 安裝cisco_yang-exp
編輯start.sh【本linnx的ip,端口默認】
[root@localhost yang-explorer]# pwd
/root/yang-explorer
[root@localhost yang-explorer]# vim start.sh
linuxCentos_8 安裝cisco_yang-exp
啟動yang-explorer
[root@localhost yang-explorer]# bash ./start.sh

Activating virtualenv ..
Starting YangExplorer server ..
Use http://192.168.1.100:8088/static/YangExplorer.html

Performing system checks...

System check identified no issues (0 silenced).
June 27, 2018 - 02:23:34
Django version 1.8.3, using settings 'server.settings'
Starting development server at http://192.168.1.100:8088/
Quit the server with CONTROL-C
linuxCentos_8 安裝cisco_yang-exp

使用同一網段的主機瀏覽器打開(需要加載Flash)
訪問yang-explorer(http://192.168.1.100:8088/static/YangExplorer.html)
linuxCentos_8 安裝cisco_yang-exp
登錄yang-explorer(密碼:guest)
linuxCentos_8 安裝cisco_yang-exp

注意事項:如果安裝Django出故障的解決辦法
[root@localhost yang-explorer]# cd v
[root@localhost v]# source bin/activate
(v) [root@localhost v]# pip2 install Django-1.8.3-py2.py3-none-any.whl
Processing ./Django-1.8.3-py2.py3-none-any.whl
Installing collected packages: Django
Successfully installed Django-1.8.3

(v) [root@localhost v]# python
Python 2.7.5 (default, Apr 11 2018, 07:36:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
">>> import django
">>> exit()

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI