您好,登錄后才能下訂單哦!
安裝python2.7 所需的依賴包yum install gcc openssl-devel bzip2-devel
安裝python2.7yum install python2
進入linux的軟連接存放位置cd /usr/bin
.查看現有python的軟連接指向的版本ls -al *python*
刪除舊的軟連接sudo rm python2
建立新的軟連接sudo ln -s python2.7 python
安裝 PIP2curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
============================
安裝python2 虛擬環境
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
編輯后如下圖(編輯60,61行內容host=本linux,ip地址,port= 8088 #ip和端口要用《‘ ’》引起):
編輯start.sh【本linnx的ip,端口默認】
[root@localhost yang-explorer]# pwd
/root/yang-explorer
[root@localhost yang-explorer]# vim start.sh
啟動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...
注意事項:如果安裝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()
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。