LinuxCentos_8 install cisco_yang-exp
LinuxCentos_8 installation of cisco_yang-explorer requires that python2 be installed first
Install the dependency packages required for python2.7
Yum install gcc openssl-devel bzip2-devel
Install python2.7
Yum install python2
Enter the soft connection storage location of linux
Cd / usr/bin
. View the version of the existing python that the soft connection points to
Ls-al * python*
Delete old soft connections
Sudo rm python2
Establish a new soft connection
Sudo ln-s python2.7 python
Install PIP2
Curl "https://bootstrap.pypa.io/get-pip.py"-o" get-pip.py
Python get-pip.py
= =
Install the python2 virtual environment
Pip2 install virtualenv
Install dependent components
Yum install libxml2-devel libxslt-devel python2-devel zlib-devel
Graphviz (Visual Graphics tool)
Yum install graphviz
Install pyang
Pip2 install pyang
Install Git
Yum install git
Install 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
~ ignore the installation ~
# prompt whether to initialize the dataset using root
Do you want to continue as root? (nbat N) y
Edit YangExplorer.html / /
[root@localhost static] # pwd
/ root/yang-explorer/server/static
[root@localhost static] # vi YangExplorer.html
After editing, it is shown in the following figure (the address of host= local linux,ip, port= 8088 # ip and the port should be caused by "'" when editing 60pc61 lines):
Edit start.sh [ip of this linnx, port default]
[root@localhost yang-explorer] # pwd
/ root/yang-explorer
[root@localhost yang-explorer] # vim start.sh
Start 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
Open using a host browser on the same network segment (Flash needs to be loaded)
Visit yang-explorer (http://192.168.1.100:8088/static/YangExplorer.html)
Log in to yang-explorer (password: guest)
Note: the solution if the installation of Django fails
[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 ()