blob: d4980070b4fbac33f7719f5da7ddfccb23f6a1eb [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _centos:
2
3.. toctree::
4
jdenisco569a2782018-11-09 15:20:26 -05005Setup the FD.io Repository - Centos 7
John DeNisco06dcd452018-07-26 12:45:10 -04006=====================================
7
8Update the OS
9-------------
10
John DeNiscoce96dda2018-08-14 16:04:09 -040011Before starting the repository setup, it is a good idea to first update and upgrade
jdenisco569a2782018-11-09 15:20:26 -050012the OS; run the following commands to update the OS and get some packages.
John DeNisco06dcd452018-07-26 12:45:10 -040013
14.. code-block:: console
15
16 $ sudo yum update
jdenisco569a2782018-11-09 15:20:26 -050017 $ sudo yum install pygpgme yum-utils
John DeNisco06dcd452018-07-26 12:45:10 -040018
19
jdenisco569a2782018-11-09 15:20:26 -050020Package Cloud Repository
21^^^^^^^^^^^^^^^^^^^^^^^^
John DeNisco06dcd452018-07-26 12:45:10 -040022
jdenisco569a2782018-11-09 15:20:26 -050023Build artifacts are also posted to a packagecloud.io Repository. This includes
24official point releases. To use any of these build artifacts, create a file
25*'/etc/yum.repos.d/fdio-release.repo'* with the content that points to the
26version needed. Below are some common examples of the content needed:
John DeNisco06dcd452018-07-26 12:45:10 -040027
28
29VPP Latest Release
30""""""""""""""""""
31
32To allow *'yum'* access to the official VPP releases, create the file
John DeNiscoce96dda2018-08-14 16:04:09 -040033*'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -040034
35.. code-block:: console
36
37 $ cat /etc/yum.repos.d/fdio-release.repo
jdenisco569a2782018-11-09 15:20:26 -050038 [fdio_release]
39 name=fdio_release
40 baseurl=https://packagecloud.io/fdio/release/el/7/$basearch
41 repo_gpgcheck=1
John DeNisco06dcd452018-07-26 12:45:10 -040042 gpgcheck=0
jdenisco569a2782018-11-09 15:20:26 -050043 enabled=1
44 gpgkey=https://packagecloud.io/fdio/release/gpgkey
45 sslverify=1
46 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
47 metadata_expire=300
48
49 [fdio_release-source]
50 name=fdio_release-source
51 baseurl=https://packagecloud.io/fdio/release/el/7/SRPMS
52 repo_gpgcheck=1
53 gpgcheck=0
54 enabled=1
55 gpgkey=https://packagecloud.io/fdio/release/gpgkey
56 sslverify=1
57 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
58 metadata_expire=300
59
60Update your local yum cache.
61
62.. code-block:: console
63
jdenisco24010fb2018-11-13 12:40:12 -050064 $ sudo yum clean all
jdenisco569a2782018-11-09 15:20:26 -050065 $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_release'
John DeNisco06dcd452018-07-26 12:45:10 -040066
67The *'yum install vpp'* command will install the most recent release. To
68install older releases, run the following command to get the list of releases
John DeNiscoce96dda2018-08-14 16:04:09 -040069provided.
John DeNisco06dcd452018-07-26 12:45:10 -040070
71.. code-block:: console
72
73 $ sudo yum --showduplicates list vpp* | expand
74
John DeNisco06dcd452018-07-26 12:45:10 -040075VPP Master Branch
John DeNiscoce96dda2018-08-14 16:04:09 -040076"""""""""""""""""""
John DeNisco06dcd452018-07-26 12:45:10 -040077
78To allow *yum* access to the nightly builds from the VPP master branch, create
John DeNiscoce96dda2018-08-14 16:04:09 -040079the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -040080
81.. code-block:: console
82
83 $ cat /etc/yum.repos.d/fdio-release.repo
jdenisco569a2782018-11-09 15:20:26 -050084 [fdio_master]
85 name=fdio_master
86 baseurl=https://packagecloud.io/fdio/master/el/7/$basearch
87 repo_gpgcheck=1
John DeNisco06dcd452018-07-26 12:45:10 -040088 gpgcheck=0
jdenisco569a2782018-11-09 15:20:26 -050089 enabled=1
90 gpgkey=https://packagecloud.io/fdio/master/gpgkey
91 sslverify=1
92 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
93 metadata_expire=300
94
95 [fdio_master-source]
96 name=fdio_master-source
97 baseurl=https://packagecloud.io/fdio/master/el/7/SRPMS
98 repo_gpgcheck=1
99 gpgcheck=0
100 enabled=1
101 gpgkey=https://packagecloud.io/fdio/master/gpgkey
102 sslverify=1
103 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
104 metadata_expire=300
105
106Update your local yum cache.
107
108.. code-block:: console
109
jdenisco24010fb2018-11-13 12:40:12 -0500110 $ sudo yum clean all
jdenisco569a2782018-11-09 15:20:26 -0500111 $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_master'
John DeNisco06dcd452018-07-26 12:45:10 -0400112
113The *'yum install vpp'* command will install the most recent build on the
114branch. Run the following command to get the list of images produce by the
John DeNiscoce96dda2018-08-14 16:04:09 -0400115branch.
John DeNisco06dcd452018-07-26 12:45:10 -0400116
117.. code-block:: console
118
jdenisco24010fb2018-11-13 12:40:12 -0500119 $ sudo yum clean all
John DeNisco06dcd452018-07-26 12:45:10 -0400120 $ sudo yum --showduplicates list vpp* | expand
121
John DeNisco06dcd452018-07-26 12:45:10 -0400122Install VPP RPMs
123================
124
John DeNiscoce96dda2018-08-14 16:04:09 -0400125To install the VPP packet engine, run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400126
127.. code-block:: console
128
129 $ sudo yum install vpp
130
John DeNiscoce96dda2018-08-14 16:04:09 -0400131The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy*
John DeNisco06dcd452018-07-26 12:45:10 -0400132RPMs, so they will be installed as well.
133
134.. note::
135
John DeNiscoce96dda2018-08-14 16:04:09 -0400136 The *vpp-selinux-policy* will not enable SELinux on the system. It
John DeNisco06dcd452018-07-26 12:45:10 -0400137 will install a Custom VPP SELinux policy that will be used if SELinux is
138 enabled at any time.
139
140There are additional packages that are optional. These packages can be
141combined with the command above and installed all at once, or installed as
142needed:
143
144.. code-block:: console
145
jdenisco2cefb062019-02-19 16:25:05 -0500146 $ sudo yum install vpp-plugins vpp-ext-deps vpp-devel vpp-api-python vpp-api-lua vpp-api-java vpp-debuginfo vpp-devel libvpp0
John DeNisco06dcd452018-07-26 12:45:10 -0400147
148Starting VPP
149============
150
151Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
John DeNiscoce96dda2018-08-14 16:04:09 -0400152run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400153
154.. code-block:: console
155
156 $ sudo systemctl start vpp
157
John DeNiscoce96dda2018-08-14 16:04:09 -0400158Then to enable VPP to start on system reboot, run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400159
160.. code-block:: console
161
162 $ sudo systemctl enable vpp
163
John DeNisco06dcd452018-07-26 12:45:10 -0400164Outside of running VPP as a systemd service, VPP can be started manually or
165made to run within GDB for debugging. See :ref:`running` for more details and
166ways to tailor VPP to a specific system.
167
168
169Uninstall the VPP RPMs
170======================
171
John DeNiscoce96dda2018-08-14 16:04:09 -0400172To uninstall a VPP RPM, run the following command:
173
John DeNisco06dcd452018-07-26 12:45:10 -0400174.. code-block:: console
175
176 $ sudo yum autoremove vpp*