88691a238ff7b5849be7988bdb66404b053d58a4
[vpp.git] / docs / gettingstarted / installing / centos.rst
1 .. _centos:
2
3 .. toctree::
4
5 Setup the FD.io Repository - Centos 7
6 =====================================
7
8 Update the OS
9 -------------
10
11 Before starting the repository setup, it is a good idea to first update and upgrade
12 the OS; run the following commands to update the OS and get some packages.
13
14 .. code-block:: console
15
16     $ sudo yum update
17     $ sudo yum install pygpgme yum-utils
18
19
20 Package Cloud Repository
21 ^^^^^^^^^^^^^^^^^^^^^^^^
22
23 Build artifacts are also posted to a packagecloud.io Repository. This includes
24 official 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
26 version needed. Below are some common examples of the content needed:
27
28
29 VPP Latest Release
30 """"""""""""""""""
31
32 To allow *'yum'* access to the official VPP releases, create the file
33 *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
34
35 .. code-block:: console
36
37    $ cat /etc/yum.repos.d/fdio-release.repo
38    [fdio_release]
39    name=fdio_release
40    baseurl=https://packagecloud.io/fdio/release/el/7/$basearch
41    repo_gpgcheck=1
42    gpgcheck=0
43    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
60 Update your local yum cache.
61
62 .. code-block:: console
63
64    $ sudo yum clean all
65    $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_release'
66
67 The *'yum install vpp'* command will install the most recent release. To
68 install older releases, run the following command to get the list of releases
69 provided.
70
71 .. code-block:: console
72
73    $ sudo yum --showduplicates list vpp* | expand
74
75 VPP Master Branch
76 """""""""""""""""""
77
78 To allow *yum* access to the nightly builds from the VPP master branch, create
79 the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
80
81 .. code-block:: console
82
83    $ cat /etc/yum.repos.d/fdio-release.repo
84    [fdio_master]
85    name=fdio_master
86    baseurl=https://packagecloud.io/fdio/master/el/7/$basearch
87    repo_gpgcheck=1
88    gpgcheck=0
89    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
106 Update your local yum cache.
107
108 .. code-block:: console
109
110    $ sudo yum clean all
111    $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_master'
112
113 The *'yum install vpp'* command will install the most recent build on the
114 branch. Run the following command to get the list of images produce by the
115 branch.
116
117 .. code-block:: console
118
119    $ sudo yum clean all
120    $ sudo yum --showduplicates list vpp* | expand
121
122 Install VPP RPMs
123 ================
124
125 To install the VPP packet engine, run the following command:
126
127 .. code-block:: console
128
129    $ sudo yum install vpp
130
131 The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy*
132 RPMs, so they will be installed as well.
133
134 .. note::
135
136     The *vpp-selinux-policy* will not enable SELinux on the system. It
137     will install a Custom VPP SELinux policy that will be used if SELinux is
138     enabled at any time.
139
140 There are additional packages that are optional. These packages can be
141 combined with the command above and installed all at once, or installed as
142 needed: 
143
144 .. code-block:: console
145
146    $ sudo yum install vpp-plugins vpp-devel vpp-api-python vpp-api-lua vpp-api-java vpp-debuginfo vpp-devel libvpp0
147
148 Starting VPP
149 ============
150
151 Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
152 run the following command:
153
154 .. code-block:: console
155
156    $ sudo systemctl start vpp
157
158 Then to enable VPP to start on system reboot, run the following command:
159
160 .. code-block:: console
161
162    $ sudo systemctl enable vpp
163
164 Outside of running VPP as a systemd service, VPP can be started manually or
165 made to run within GDB for debugging. See :ref:`running` for more details and
166 ways to tailor VPP to a specific system.
167
168
169 Uninstall the VPP RPMs
170 ======================
171
172 To uninstall a VPP RPM, run the following command:
173
174 .. code-block:: console
175
176    $ sudo yum autoremove vpp*