1.. _installation: 2 3=============================== 4Installing |Percona Server| 5.6 5=============================== 6 7This page provides the information on how to you can install |Percona Server|. Following options are available: 8 9* :ref:`installing_from_binaries` (recommended) 10* Installing |Percona Server| from Downloaded :ref:`rpm <standalone_rpm>` or :ref:`apt <standalone_deb>` Packages 11* :ref:`installing_from_binary_tarball` 12* :ref:`installing_from_source_tarball` 13* :ref:`source_from_git` 14* :ref:`compile_from_source` 15* :ref:`docker` 16 17Before installing, you might want to read the :doc:`release-notes/release-notes_index`. 18 19.. _installing_from_binaries: 20 21Installing |Percona Server| from Repositories 22============================================= 23 24|Percona| provides repositories for :program:`yum` (``RPM`` packages for *Red Hat*, *CentOS* and *Amazon Linux AMI*) and :program:`apt` (:file:`.deb` packages for *Ubuntu* and *Debian*) for software such as |Percona Server|, |Percona XtraBackup|, and *Percona Toolkit*. This makes it easy to install and update your software and its dependencies through your operating system's package manager. This is the recommended way of installing where possible. 25 26Following guides describe the installation process for using the official Percona repositories for :file:`.deb` and :file:`.rpm` packages. 27 28.. toctree:: 29 :maxdepth: 1 30 :titlesonly: 31 32 installation/apt_repo 33 installation/yum_repo 34 35.. _installing_from_binary_tarball: 36 37Installing |Percona Server| from a Binary Tarball 38=================================================== 39 40In |Percona Server| :rn:`5.6.24-72.2` and newer, the single binary tarball was replaced with multiple tarballs depending on the *OpenSSL* library available in the distribution: 41 42.. tabularcolumns:: |p{0.10\linewidth}|p{0.90\linewidth}| 43 44.. list-table:: 45 :header-rows: 1 46 47 * - OpenSSL version 48 - Linux Distributions 49 * - ssl101 50 - For *CentOS* 6 and *CentOS* 7 (``libssl.so.10 => /usr/lib64/libssl.so.10 ``); 51 * - ssl102 52 - For *Debian* 9 and *Ubuntu* versions starting from 14.04 (``libssl.so.1.1 => /usr/lib/libssl.so.1.1``); 53 * - ssl1:111 54 - For *CentOS* 8 and *RedHat* 8 (``libssl.so.1.1 => /usr/lib64/libssl.so.1.1.1b``); 55 56.. note:: 57 58 The list is a guide. To find which libssl.so files are available on your 59 system you should run the following in Ubuntu or Debian: 60 61 .. code-block:: bash 62 63 $ locate libssl | grep "^/usr/lib/" 64 65 In CentOS, run the following command: 66 67 .. code-block:: bash 68 69 $ ldconfig -p | grep ssl 70 71 72Download the appropriate binary tarball from the ``Linux - Generic`` `section <https://www.percona.com/downloads/Percona-Server-5.6/LATEST/binary/tarball/>`_ on the download page. 73 74Fetch and extract the correct binary 75tarball. For example for *Debian Stretch*: 76 77.. code-block:: bash 78 79 $ wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.45-86.1/binary/tarball/Percona-Server-5.6.45-rel86.1-Linux.x86_64.ssl102.tar.gz 80 81.. _installing_from_source_tarball: 82 83Installing |Percona Server| from a Source Tarball 84================================================= 85 86Fetch and extract the source tarball. For example: :: 87 88 $ wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.49-89.0/binary/tarball/Percona-Server-5.6.49-rel89.0-Linux.x86_64.ssl102.tar.gz 89 $ tar xfz Percona-Server-5.6.49-rel89.0-Linux.x86_64.ssl102.tar.gz 90 91Next, follow the instructions in :ref:`compile_from_source` below. 92 93.. _source_from_git: 94 95Installing |Percona Server| from the Git Source Tree 96==================================================== 97 98Percona uses the `Github <http://github.com/>`_ revision 99control system for development. To build the latest |Percona Server| 100from the source tree you will need ``git`` installed on your system. 101 102You can now fetch the latest |Percona Server| 5.6 sources. 103 104.. code-block:: bash 105 106 $ git clone https://github.com/percona/percona-server.git 107 $ cd percona-server 108 $ git checkout 5.6 109 $ git submodule init 110 $ git submodule update 111 112If you are going to be making changes to |Percona Server| 5.6 and wanting 113to distribute the resulting work, you can generate a new source tarball 114(exactly the same way as we do for release): :: 115 116 $ cmake . 117 $ make dist 118 119Next, follow the instructions in :ref:`compile_from_source` below. 120 121.. _compile_from_source: 122 123Compiling |Percona Server| from Source 124====================================== 125 126After either fetching the source repository or extracting a source tarball 127(from Percona or one you generated yourself), you will now need to 128configure and build Percona Server. 129 130First, run cmake to configure the build. Here you can specify all the normal 131build options as you do for a normal |MySQL| build. Depending on what 132options you wish to compile Percona Server with, you may need other 133libraries installed on your system. Here is an example using a 134configure line similar to the options that Percona uses to produce 135binaries: :: 136 137 $ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF 138 139Now, compile using make :: 140 141 $ make 142 143Install: :: 144 145 $ make install 146 147Percona Server 5.6 will now be installed on your system. 148 149Building |Percona Server| Debian/Ubuntu packages 150================================================ 151 152If you wish to build your own Percona Server Debian/Ubuntu (dpkg) packages, 153you first need to start with a source tarball, either from the Percona 154website or by generating your own by following the instructions above( 155:ref:`source_from_git`). 156 157Extract the source tarball: :: 158 159 $ tar xfz percona-server-5.6.15-62.0.tar.gz 160 $ cd percona-server-5.6.15-62.0 161 162Put the debian packaging in the directory that Debian expects it to be in: :: 163 164 $ cp -ap build-ps/debian debian 165 166Update the changelog for your distribution (here we update for the unstable 167distribution - sid), setting the version number appropriately. The trailing one 168in the version number is the revision of the Debian packaging. :: 169 170 $ dch -D unstable --force-distribution -v "5.6.15-62.0-1" "Update to 5.6.15-62.0" 171 172Build the Debian source package: :: 173 174 $ dpkg-buildpackage -S 175 176Use sbuild to build the binary package in a chroot: :: 177 178 $ sbuild -d sid percona-server-5.6_5.6.15_62.0-1.dsc 179 180You can give different distribution options to dch and sbuild to build binary 181packages for all Debian and Ubuntu releases. 182 183 184.. note:: 185 186 :ref:`pam_plugin` is not built with the server by default. In order to build the Percona Server with PAM plugin, additional option :option:`-DWITH_PAM=ON` should be used. 187 188.. toctree:: 189 :hidden: 190 191 installation/docker 192 193