Move most information from README into documentation; separate out document for building from sources.
This commit is contained in:
@ -30,142 +30,7 @@ Upon successful completion of the installation process you have a version of Max
|
||||
|
||||
## Building MaxScale From Source Code
|
||||
|
||||
Alternatively you may download the MaxScale source and build your own binaries. You will need a number of tools and libraries in order to achieve this.
|
||||
|
||||
* cmake version 2.8.12 or later
|
||||
|
||||
* gcc recommended version 4.4.7 or later
|
||||
|
||||
* libaio
|
||||
|
||||
* MariaDB Develop libraries version 5.5.38 or later
|
||||
|
||||
* libedit 2.11 or later (used by the MaxAdmin tool)
|
||||
|
||||
The full list of dependencies for the most common distros is provided in the next section.
|
||||
|
||||
### All RHEL, CentOS and Fedora versions:
|
||||
gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc perl make libtool
|
||||
openssl-devel libaio libaio-devel librabbitmq-devel
|
||||
In addition, if you wish to to build an RPM package include:
|
||||
rpm-build
|
||||
|
||||
#### RHEL 6, 7, CentOS 6, 7, Fedora:
|
||||
libedit-devel
|
||||
|
||||
#### RHEL 7, CentOS 7:
|
||||
mariadb-devel mariadb-embedded-devel
|
||||
|
||||
#### RHEL 5, 7, CentOS 5, 6, Fedora 19, 20
|
||||
MariaDB-devel MariaDB-server
|
||||
|
||||
#### Fedora 19, 20
|
||||
systemtap-sdt-devel
|
||||
|
||||
### All Ubuntu and Debian versions:
|
||||
build-essential libssl-dev libaio-dev ncurses-dev bison
|
||||
cmake perl libtool librabbitmq-dev
|
||||
If you want to build a DEB package, you will also need:
|
||||
dpkg-dev
|
||||
|
||||
#### Ubuntu 14.04 or later, Debian 8 (Jessie) or later
|
||||
libmariadbclient-dev libmariadbd-dev
|
||||
|
||||
#### Earlier versions of Ubuntu or Debian
|
||||
|
||||
For these, you will need to obtain the MariaDB embedded library. It has to be manually extracted from the tarball. But first ascertain what version of glibc is installed. Run the command:
|
||||
dpkg -l | grep libc6
|
||||
which will show the version number. If the version is less than 2.14 you should obtain the library from:
|
||||
[https://downloads.mariadb.org/interstitial/mariadb-5.5.41/bintar-linux-x86_64/mariadb-5.5.41-linux-x86_64.tar.gz](https://downloads.mariadb.org/interstitial/mariadb-5.5.41/bintar-linux-x86_64/mariadb-5.5.41-linux-x86_64.tar.gz).
|
||||
Otherwise, from:
|
||||
[https://downloads.mariadb.org/interstitial/mariadb-5.5.41/bintar-linux-glibc_214-x86_64/mariadb-5.5.41-linux-glibc_214-x86_64.tar.gz](https://downloads.mariadb.org/interstitial/mariadb-5.5.41/bintar-linux-glibc_214-x86_64/mariadb-5.5.41-linux-glibc_214-x86_64.tar.gz)
|
||||
|
||||
The suggested location for extracting the tarball is /usr so the operation can be done by the following commands:
|
||||
cd /usr
|
||||
tar -xzvf /path/to/mariadb.library.tar.gz
|
||||
where /path/to/mariadb.library.tar.gz is replaced by the actual path and name of the downloaded tarball.
|
||||
|
||||
##Obtaining the MaxScale Source Code
|
||||
Now clone the GitHub project to your machine either via the web interface, your favorite graphical interface or the git command line
|
||||
|
||||
$ git clone https://github.com/mariadb-corporation/MaxScale
|
||||
Cloning into 'MaxScale'...
|
||||
remote: Counting objects: 16228, done.
|
||||
...
|
||||
|
||||
Change directory to the MaxScale directory, create a build directory and change directory to that build directory
|
||||
|
||||
$ cd MaxScale
|
||||
|
||||
$ mkdir build
|
||||
|
||||
$ cd build
|
||||
|
||||
The next step is to run the cmake command to build the Makefile you need to compile Maxscale. There are a number of options you may give to configure cmake and point it to the various packages it requires. These are documented in the MaxScale README file, in this example we will assume the MariaDB developer packages have been installed in a non-standard location and set all the options required to locate these, along with options to build the unit tests and configure the installation target directory.
|
||||
|
||||
$ cmake -DMYSQL\_DIR=/usr/mariadb-5.5.41-linux-x86_64/include/mysql \
|
||||
-DEMBEDDED\_LIB=/usr/mariadb-5.5.41-linux-x86\_64/lib/libmysqld.a \
|
||||
-DMYSQLCLIENT\_LIBRARIES=/usr/mariadb-5.5.41-linux-x86_64/lib/libmysqlclient.so \
|
||||
-DERRMSG=/usr/mariadb-5.5.41-linux-x86\_64/share/english/errmsg.sys \
|
||||
-DINSTALL\_DIR=/home/maxscale/MaxScale -DBUILD_TESTS=Y \
|
||||
-DINSTALL\_SYSTEM\_FILES=N \
|
||||
-DBUILD_BINLOG=Y ../
|
||||
|
||||
-- CMake version: 2.8.12.2
|
||||
-- The C compiler identification is GNU 4.4.7
|
||||
-- The CXX compiler identification is GNU 4.4.7
|
||||
-- Check for working C compiler: /usr/bin/cc
|
||||
-- Check for working C compiler: /usr/bin/cc -- works
|
||||
-- Detecting C compiler ABI info
|
||||
-- Detecting C compiler ABI info - done
|
||||
-- Check for working CXX compiler: /usr/bin/c++
|
||||
-- Check for working CXX compiler: /usr/bin/c++ -- works
|
||||
-- Detecting CXX compiler ABI info
|
||||
-- Detecting CXX compiler ABI info - done
|
||||
-- Library was found at: /lib64/libaio.so
|
||||
-- Library was found at: /usr/lib64/libssl.so
|
||||
-- Library was found at: /usr/lib64/libcrypt.so
|
||||
-- Library was found at: /usr/lib64/libcrypto.so
|
||||
-- Library was found at: /usr/lib64/libz.so
|
||||
-- Library was found at: /usr/lib64/libm.so
|
||||
-- Library was found at: /usr/lib64/libdl.so
|
||||
-- Library was found at: /usr/lib64/librt.so
|
||||
-- Library was found at: /usr/lib64/libpthread.so
|
||||
-- Using errmsg.sys found at: /home/maxscale/usr/share/mysql/english/errmsg.sys
|
||||
-- Using embedded library: /home/mpinto/usr/lib64/libmysqld.a
|
||||
-- Valgrind found: /usr/bin/valgrind
|
||||
-- Found dynamic MySQL client library: /home/maxscale/usr/lib64/libmysqlclient.so
|
||||
-- Found static MySQL client library: /usr/lib/libmysqlclient.a
|
||||
-- C Compiler supports: -Werror=format-security
|
||||
-- Linking against: /home/mpinto/usr/lib64/libmysqlclient.so
|
||||
-- Installing MaxScale to: /usr/local/maxscale/
|
||||
-- Generating RPM packages
|
||||
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1")
|
||||
-- Configuring done
|
||||
-- Generating done
|
||||
-- Build files have been written to: /home/maxscale/develop/build
|
||||
|
||||
-bash-4.1$ make depend
|
||||
|
||||
-bash-4.1$ make
|
||||
|
||||
Once the cmake command is complete simply run make to build the MaxScale binaries.
|
||||
|
||||
$ make
|
||||
**Scanning dependencies of target utils**
|
||||
[ 1%] Building CXX object utils/CMakeFiles/utils.dir/skygw_utils.cc.o
|
||||
**Linking CXX static library libutils.a**
|
||||
[ 1%] Built target utils
|
||||
**Scanning dependencies of target log_manager**
|
||||
[ 2%] Building CXX object log_manager/CMakeFiles/log_manager.dir/log_manager.cc.o
|
||||
...
|
||||
|
||||
After the completion of the make process the installation can be achieved by running the make install target.
|
||||
|
||||
$ make install
|
||||
...
|
||||
|
||||
This will result in an installation being created which is identical to that which would be achieved by installing the binary package.
|
||||
Alternatively you may download the MaxScale source and build your own binaries. To do this, refer to the separate document [Building MaxScale from Source Code](/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md)
|
||||
|
||||
## Configuring MaxScale
|
||||
|
||||
@ -191,8 +56,21 @@ It is also possible to use the Read/Write Splitter with Galera. Although it is n
|
||||
|
||||
As well as the four major configuration choices outlined above there are also other configurations sub-options that may be mixed with those to provide a variety of different configuration and functionality. The MaxScale filter concept allows the basic configurations to be built upon in a large variety of ways. A separate filter tutorial is available that discusses the concept and gives some examples of ways to use filters.
|
||||
|
||||
## Running MaxScale
|
||||
|
||||
MaxScale consists of a core executable and a number of modules that implement
|
||||
the different protocols and routing algorithms. These modules are built as
|
||||
shared objects that are loaded on demand. In order for MaxScale to find these
|
||||
modules it will search using a predescribed search path. The rules are:
|
||||
|
||||
1. Look in the current directory for the module
|
||||
2. Look in $MAXSCALE_HOME/modules
|
||||
3. Look in /usr/local/skysql/maxscale/modules
|
||||
|
||||
Configuration is read by default from the file \$MAXSCALE_HOME/etc/MaxScale.cnf, /etc/MaxScale.cnf. An example file is included in in the installation and can be found in the etc/ folder within the MaxScale installation. The default value of MAXSCALE_HOME can be overriden by using the -c flag on the command line. This should be immediately followed by the path to the MaxScale home directory. The -f flag can be used on the command line to set the name and the location of the configuration file. Without path expression the file is read from \$MAXSCALE_HOME/etc directory.
|
||||
|
||||
|
||||
## Administration Of MaxScale
|
||||
|
||||
There are various administration tasks that may be done with MaxScale, a client command, maxadmin, is available that will interact with a running MaxScale and allow the status of MaxScale to be monitored and give some control of the MaxScale functionality. There is a separate reference guide for the maxadmin utility and also a short administration tutorial that covers the common administration tasks that need to be done with MaxScale.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user