- Download NSO from Cisco Website
- Make sure java and python have been install in your server.
Java -version should indicate a java version of “1.7” or higher.Python2 needs to be version 2.7.5 or higher. For Python3, the version needs to be 3.4 or higher.
Install Java
1
[root@localhost ~]# tar -zxvf jdk-8u202-linux-x64.tar.gz
2
[root@localhost ~]# mkdir /usr/java
3
[root@localhost ~]# mv jdk1.8.0_202/ /usr/java
4
[root@localhost ~]# vi /etc/profile
5
6
export JAVA_HOME=/usr/java/jdk1.8.0_202
7
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
8
export PATH=$PATH:$JAVA_HOME/bin
Install NSO(local-install)
1
[root@localhost ~]# chmod 777 nso-5.2.1.linux.x86_64.signed.bin
2
[root@localhost ~]# ./nso-5.2.1.linux.x86_64.signed.bin
3
[root@localhost ~]# ./nso-5.2.1.linux.x86_64.installer.bin $HOME/nso-5.2.1
4
[root@localhost ~]# echo 'source $HOME/nso-5.2.1/ncsrc' >> ~/.bashrc
5
[root@localhost ~]# ncs-setup --dest ./ncs-run
Install Ned
1
[root@localhost ~]# chmod 777 ncs-5.2-cisco-iosxr-7.13.4.signed.bin
2
[root@localhost ~]# ./ncs-5.2-cisco-iosxr-7.13.4.signed.bin
3
[root@localhost ~]# tar -xvf ncs-5.2-cisco-iosxr-7.13.4.tar.gz
4
[root@localhost src]# pwd
5
/root/cisco-iosxr-cli-7.13/src
6
[root@localhost src]# make all
7
8
[root@localhost ~]# mv cisco-iosxr-cli-7.13/ nso-5.2.1/packages/neds/
9
[root@localhost ~]# ln -s $HOME/nso-5.2.1/packages/neds/cisco-iosxr-cli-7.13 ./ncs-run/packages/
10
[root@localhost ~]# cd ncs-run/
11
[root@localhost ncs-run]# ncs
12
[root@localhost ncs-run]# ncs_cli -u admin -C
13
admin@ncs#
14
admin@ncs# packages reload
15
admin@ncs# show packages package package-version
Add devices
1
admin@ncs(config)# devices authgroups group calo
2
admin@ncs(config-group-calo)# default-map remote-name cisco
3
admin@ncs(config-group-calo)# default-map remote-password cisco
4
admin@ncs(config-group-calo)# commit
5
admin@ncs(config)# devices device 5501
6
admin@ncs(config-device-5501)# address 10.75.49.137
7
admin@ncs(config-device-5501)# authgroup calo
8
admin@ncs(config-device-5501)# device-type cli ned-id cisco-iosxr-cli-7.13
9
admin@ncs(config-device-5501)# device-type cli protocol ssh
10
admin@ncs(config-device-5501)# state admin-state unlocked
11
admin@ncs(config-device-5501)# commit
1
admin@ncs(config)# devices device 5501 ssh fetch-host-keys
2
admin@ncs# devices device 5501 sync-from
3
4
NCS5501:
5
ssh server v2
6
ssh server netconf vrf default
7
RP/0/RP0/CPU0:R2-5501#show run netconf-yang agent
8
Thu Oct 31 04:24:33.798 UTC
9
netconf-yang agent
10
ssh
11
RP/0/RP0/CPU0:R2-5501#show run netconf
12
Thu Oct 31 04:24:22.880 UTC
13
netconf agent tty
Enable Web GUI
1
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=8080/tcp
2
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=8080/udp
3
[root@localhost ~]# firewall-cmd --reload
4
5
Web GUI password admin/admin
NSO-system install
1
[root@localhost ~]#sudo sh nso-5.2.1.linux.x86_64.installer.bin --system-install
2
[root@localhost ~]#groupadd ncsadmin
3
[root@localhost ~]#groupadd ncsoper
4
[root@localhost ~]#id root
5
[root@localhost ~]#usermod -a -G 'ncsadmin' 'root'
6
[root@localhost ~]#usermod -a -G 'ncsoper' 'root'
1
Intsall log:
2
[root@localhost ~]# sudo sh nso-5.2.1.linux.x86_64.installer.bin --system-install
3
INFO Using temporary directory /tmp/ncs_installer.91949 to stage NCS installation bundle
4
INFO Using /opt/ncs/ncs-5.2.1 for static files
5
INFO Using /etc/ncs for configuration files
6
INFO Using /var/opt/ncs for run-time state files
7
INFO Using /var/log/ncs for log files
8
INFO Unpacked ncs-5.2.1 in /opt/ncs/ncs-5.2.1
9
INFO Found and unpacked corresponding DOCUMENTATION_PACKAGE
10
INFO Found and unpacked corresponding EXAMPLE_PACKAGE
11
INFO Generating default SSH hostkey (this may take some time)
12
INFO SSH hostkey generated
13
INFO Environment set-up generated in /opt/ncs/ncs-5.2.1/ncsrc
14
INFO NSO installation script finished
15
INFO Found and unpacked corresponding NETSIM_PACKAGE
16
INFO Generating keys for encrypted-strings
17
INFO Configuring installation for PAM authentication
18
INFO Using PAM service system-auth for authentication
19
INFO Generating self-signed certificates for HTTPS
20
INFO Installed init script /etc/init.d/ncs
21
INFO Installed user profile script ncs.sh in /etc/profile.d
22
INFO Installed user profile script ncs.csh in /etc/profile.d
23
INFO Installed 'logrotate' configuration file ncs in /etc/logrotate.d
24
25
INFO The installation has been configured for PAM authentication,
26
INFO with group assignment based on the OS group database
27
INFO (e.g. /etc/group file). Users that need access to NCS must
28
INFO belong to either the 'ncsadmin' group (for unlimited access
29
INFO rights) or the 'ncsoper' group (for minimal access rights).
30
INFO To create the 'ncsadmin' group, use OS shell command:
31
32
groupadd ncsadmin
33
34
INFO To create the 'ncsoper' group, use OS shell command:
35
36
groupadd ncsoper
37
38
INFO To add an existing user to one of these groups, use OS shell command:
39
40
usermod -a -G <groupname> <username>
41
42
INFO NCS installation complete
43
44
[root@localhost ~]#
This Blog from Xuxing's Blog;
Link: http://imxing.cn/?p=308
No comments:
Post a Comment