aboutsummaryrefslogtreecommitdiffstats
path: root/docs/gettingstarted/installing/centos.rst
blob: d4980070b4fbac33f7719f5da7ddfccb23f6a1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
.. _centos:

.. toctree::

Setup the FD.io Repository - Centos 7
=====================================

Update the OS
-------------

Before starting the repository setup, it is a good idea to first update and upgrade
the OS; run the following commands to update the OS and get some packages.

.. code-block:: console

    $ sudo yum update
    $ sudo yum install pygpgme yum-utils


Package Cloud Repository
^^^^^^^^^^^^^^^^^^^^^^^^

Build artifacts are also posted to a packagecloud.io Repository. This includes
official point releases. To use any of these build artifacts, create a file
*'/etc/yum.repos.d/fdio-release.repo'* with the content that points to the
version needed. Below are some common examples of the content needed:


VPP Latest Release
""""""""""""""""""

To allow *'yum'* access to the official VPP releases, create the file
*'/etc/yum.repos.d/fdio-release.repo'* with the following content.

.. code-block:: console

   $ cat /etc/yum.repos.d/fdio-release.repo
   [fdio_release]
   name=fdio_release
   baseurl=https://packagecloud.io/fdio/release/el/7/$basearch
   repo_gpgcheck=1
   gpgcheck=0
   enabled=1
   gpgkey=https://packagecloud.io/fdio/release/gpgkey
   sslverify=1
   sslcacert=/etc/pki/tls/certs/ca-bundle.crt
   metadata_expire=300

   [fdio_release-source]
   name=fdio_release-source
   baseurl=https://packagecloud.io/fdio/release/el/7/SRPMS
   repo_gpgcheck=1
   gpgcheck=0
   enabled=1
   gpgkey=https://packagecloud.io/fdio/release/gpgkey
   sslverify=1
   sslcacert=/etc/pki/tls/certs/ca-bundle.crt
   metadata_expire=300

Update your local yum cache.

.. code-block:: console

   $ sudo yum clean all
   $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_release'

The *'yum install vpp'* command will install the most recent release. To
install older releases, run the following command to get the list of releases
provided.

.. code-block:: console

   $ sudo yum --showduplicates list vpp* | expand

VPP Master Branch
"""""""""""""""""""

To allow *yum* access to the nightly builds from the VPP master branch, create
the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.

.. code-block:: console

   $ cat /etc/yum.repos.d/fdio-release.repo
   [fdio_master]
   name=fdio_master
   baseurl=https://packagecloud.io/fdio/master/el/7/$basearch
   repo_gpgcheck=1
   gpgcheck=0
   enabled=1
   gpgkey=https://packagecloud.io/fdio/master/gpgkey
   sslverify=1
   sslcacert=/etc/pki/tls/certs/ca-bundle.crt
   metadata_expire=300

   [fdio_master-source]
   name=fdio_master-source
   baseurl=https://packagecloud.io/fdio/master/el/7/SRPMS
   repo_gpgcheck=1
   gpgcheck=0
   enabled=1
   gpgkey=https://packagecloud.io/fdio/master/gpgkey
   sslverify=1
   sslcacert=/etc/pki/tls/certs/ca-bundle.crt
   metadata_expire=300

Update your local yum cache.

.. code-block:: console

   $ sudo yum clean all
   $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_master'

The *'yum install vpp'* command will install the most recent build on the
branch. Run the following command to get the list of images produce by the
branch.

.. code-block:: console

   $ sudo yum clean all
   $ sudo yum --showduplicates list vpp* | expand

Install VPP RPMs
================

To install the VPP packet engine, run the following command:

.. code-block:: console

   $ sudo yum install vpp

The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy*
RPMs, so they will be installed as well.

.. note::

    The *vpp-selinux-policy* will not enable SELinux on the system. It
    will install a Custom VPP SELinux policy that will be used if SELinux is
    enabled at any time.

There are additional packages that are optional. These packages can be
combined with the command above and installed all at once, or installed as
needed: 

.. code-block:: console

   $ sudo yum install vpp-plugins vpp-ext-deps vpp-devel vpp-api-python vpp-api-lua vpp-api-java vpp-debuginfo vpp-devel libvpp0

Starting VPP
============

Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
run the following command:

.. code-block:: console

   $ sudo systemctl start vpp

Then to enable VPP to start on system reboot, run the following command:

.. code-block:: console

   $ sudo systemctl enable vpp

Outside of running VPP as a systemd service, VPP can be started manually or
made to run within GDB for debugging. See :ref:`running` for more details and
ways to tailor VPP to a specific system.


Uninstall the VPP RPMs
======================

To uninstall a VPP RPM, run the following command:

.. code-block:: console

   $ sudo yum autoremove vpp*