linuxCentos_8 安装cisco_yang-exp

发布时间:2020-03-03 10:34:29 作者:河南慕慕
来源:网络 阅读:524

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 虚拟环境

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()

推荐阅读:
  1. mui 打开新窗口的方式总结及注意事项
  2. 怎么在javascript中将字符串转为对象

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

安装cisco_yang-explore ce -exp

上一篇:告诉你C盘里的每个文件夹都是干什么用的.很实用!!!

下一篇:iphone越狱无法找到var/root/Media/Cydia/AutoInstall

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》