John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 1 | .. _centos: |
| 2 | |
| 3 | .. toctree:: |
| 4 | |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 5 | Setup the FD.io Repository - Centos 7 |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 6 | ===================================== |
| 7 | |
| 8 | Update the OS |
| 9 | ------------- |
| 10 | |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 11 | Before starting the repository setup, it is a good idea to first update and upgrade |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 12 | the OS; run the following commands to update the OS and get some packages. |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 13 | |
| 14 | .. code-block:: console |
| 15 | |
| 16 | $ sudo yum update |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 17 | $ sudo yum install pygpgme yum-utils |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 18 | |
| 19 | |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 20 | Package Cloud Repository |
| 21 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 22 | |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 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: |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 27 | |
| 28 | |
| 29 | VPP Latest Release |
| 30 | """""""""""""""""" |
| 31 | |
| 32 | To allow *'yum'* access to the official VPP releases, create the file |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 33 | *'/etc/yum.repos.d/fdio-release.repo'* with the following content. |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 34 | |
| 35 | .. code-block:: console |
| 36 | |
| 37 | $ cat /etc/yum.repos.d/fdio-release.repo |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 38 | [fdio_release] |
| 39 | name=fdio_release |
| 40 | baseurl=https://packagecloud.io/fdio/release/el/7/$basearch |
| 41 | repo_gpgcheck=1 |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 42 | gpgcheck=0 |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 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 -q makecache -y --disablerepo='*' --enablerepo='fdio_release' |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 65 | |
| 66 | The *'yum install vpp'* command will install the most recent release. To |
| 67 | install older releases, run the following command to get the list of releases |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 68 | provided. |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 69 | |
| 70 | .. code-block:: console |
| 71 | |
| 72 | $ sudo yum --showduplicates list vpp* | expand |
| 73 | |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 74 | VPP Stable Branch |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 75 | """"""""""""""""""" |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 76 | |
| 77 | To allow *yum* access to the build artifacts for a VPP stable branch, create |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 78 | the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content. |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 79 | |
| 80 | .. code-block:: console |
| 81 | |
| 82 | $ cat /etc/yum.repos.d/fdio-release.repo |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 83 | [fdio_1810] |
| 84 | name=fdio_1810 |
| 85 | baseurl=https://packagecloud.io/fdio/1810/el/7/$basearch |
| 86 | repo_gpgcheck=1 |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 87 | gpgcheck=0 |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 88 | enabled=1 |
| 89 | gpgkey=https://packagecloud.io/fdio/1810/gpgkey |
| 90 | sslverify=1 |
| 91 | sslcacert=/etc/pki/tls/certs/ca-bundle.crt |
| 92 | metadata_expire=300 |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 93 | |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 94 | [fdio_1810-source] |
| 95 | name=fdio_1810-source |
| 96 | baseurl=https://packagecloud.io/fdio/1810/el/7/SRPMS |
| 97 | repo_gpgcheck=1 |
| 98 | gpgcheck=0 |
| 99 | enabled=1 |
| 100 | gpgkey=https://packagecloud.io/fdio/1810/gpgkey |
| 101 | sslverify=1 |
| 102 | sslcacert=/etc/pki/tls/certs/ca-bundle.crt |
| 103 | metadata_expire=300 |
| 104 | |
| 105 | For other stable branches, replace the *'1810'* from the above content with the |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 106 | desired release. Examples: 1606, 1609, 1701, 1704, 1707, 1710, 1804, 1807 |
| 107 | |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 108 | Update your local yum cache. |
| 109 | |
| 110 | .. code-block:: console |
| 111 | |
| 112 | $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_1810' |
| 113 | |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 114 | The *'yum install vpp'* command will install the most recent build on the |
| 115 | branch, not the latest offical release. Run the following command to get the |
| 116 | list of images produce by the branch: |
| 117 | |
| 118 | .. code-block:: console |
| 119 | |
| 120 | $ sudo yum --showduplicates list vpp* | expand |
| 121 | |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 122 | |
| 123 | VPP Master Branch |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 124 | """"""""""""""""""" |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 125 | |
| 126 | To allow *yum* access to the nightly builds from the VPP master branch, create |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 127 | the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content. |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 128 | |
| 129 | .. code-block:: console |
| 130 | |
| 131 | $ cat /etc/yum.repos.d/fdio-release.repo |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 132 | [fdio_master] |
| 133 | name=fdio_master |
| 134 | baseurl=https://packagecloud.io/fdio/master/el/7/$basearch |
| 135 | repo_gpgcheck=1 |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 136 | gpgcheck=0 |
jdenisco | 569a278 | 2018-11-09 15:20:26 -0500 | [diff] [blame] | 137 | enabled=1 |
| 138 | gpgkey=https://packagecloud.io/fdio/master/gpgkey |
| 139 | sslverify=1 |
| 140 | sslcacert=/etc/pki/tls/certs/ca-bundle.crt |
| 141 | metadata_expire=300 |
| 142 | |
| 143 | [fdio_master-source] |
| 144 | name=fdio_master-source |
| 145 | baseurl=https://packagecloud.io/fdio/master/el/7/SRPMS |
| 146 | repo_gpgcheck=1 |
| 147 | gpgcheck=0 |
| 148 | enabled=1 |
| 149 | gpgkey=https://packagecloud.io/fdio/master/gpgkey |
| 150 | sslverify=1 |
| 151 | sslcacert=/etc/pki/tls/certs/ca-bundle.crt |
| 152 | metadata_expire=300 |
| 153 | |
| 154 | Update your local yum cache. |
| 155 | |
| 156 | .. code-block:: console |
| 157 | |
| 158 | $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_master' |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 159 | |
| 160 | The *'yum install vpp'* command will install the most recent build on the |
| 161 | branch. Run the following command to get the list of images produce by the |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 162 | branch. |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 163 | |
| 164 | .. code-block:: console |
| 165 | |
| 166 | $ sudo yum --showduplicates list vpp* | expand |
| 167 | |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 168 | Install VPP RPMs |
| 169 | ================ |
| 170 | |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 171 | To install the VPP packet engine, run the following command: |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 172 | |
| 173 | .. code-block:: console |
| 174 | |
| 175 | $ sudo yum install vpp |
| 176 | |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 177 | The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy* |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 178 | RPMs, so they will be installed as well. |
| 179 | |
| 180 | .. note:: |
| 181 | |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 182 | The *vpp-selinux-policy* will not enable SELinux on the system. It |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 183 | will install a Custom VPP SELinux policy that will be used if SELinux is |
| 184 | enabled at any time. |
| 185 | |
| 186 | There are additional packages that are optional. These packages can be |
| 187 | combined with the command above and installed all at once, or installed as |
| 188 | needed: |
| 189 | |
| 190 | .. code-block:: console |
| 191 | |
| 192 | $ sudo yum install vpp-plugins vpp-devel vpp-api-python vpp-api-lua vpp-api-java |
| 193 | |
| 194 | Starting VPP |
| 195 | ============ |
| 196 | |
| 197 | Once VPP is installed on the system, to run VPP as a systemd service on CentOS, |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 198 | run the following command: |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 199 | |
| 200 | .. code-block:: console |
| 201 | |
| 202 | $ sudo systemctl start vpp |
| 203 | |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 204 | Then to enable VPP to start on system reboot, run the following command: |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 205 | |
| 206 | .. code-block:: console |
| 207 | |
| 208 | $ sudo systemctl enable vpp |
| 209 | |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 210 | Outside of running VPP as a systemd service, VPP can be started manually or |
| 211 | made to run within GDB for debugging. See :ref:`running` for more details and |
| 212 | ways to tailor VPP to a specific system. |
| 213 | |
| 214 | |
| 215 | Uninstall the VPP RPMs |
| 216 | ====================== |
| 217 | |
John DeNisco | ce96dda | 2018-08-14 16:04:09 -0400 | [diff] [blame] | 218 | To uninstall a VPP RPM, run the following command: |
| 219 | |
John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame] | 220 | .. code-block:: console |
| 221 | |
| 222 | $ sudo yum autoremove vpp* |