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