重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

linuxCentos_8安装cisco_yang-exp

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

创新互联公司长期为近千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为义马企业提供专业的网站设计、做网站,义马网站改版等技术服务。拥有十载丰富建站经验和众多成功案例,为您定制开发。

============================
安装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()


网站题目:linuxCentos_8安装cisco_yang-exp
标题路径:http://cqcxhl.com/article/gcshce.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP