Updated package installation and started documentation update.

This commit is contained in:
Markus Makela 2015-04-28 11:09:49 +03:00
parent e681d18fdd
commit 71531cde3e
5 changed files with 21 additions and 70 deletions

View File

@ -170,6 +170,7 @@ install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${MAXSCALE_SHAREDIR})
# Install startup scripts and ldconfig files
if(WITH_SCRIPTS)
configure_file(${CMAKE_SOURCE_DIR}/maxscale.conf.in ${CMAKE_BINARY_DIR}/maxscale.conf @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/etc/maxscale.service.in ${CMAKE_BINARY_DIR}/maxscale.service @ONLY)
if(DEB_BASED)
configure_file(${CMAKE_SOURCE_DIR}/etc/ubuntu/init.d/maxscale.in ${CMAKE_BINARY_DIR}/maxscale @ONLY)
else()

View File

@ -1244,7 +1244,7 @@ In addition parameters may be added to define patterns to match against to eithe
The top filter is a filter module for MaxScale that monitors every SQL statement that passes through the filter. It measures the duration of that statement, the time between the statement being sent and the first result being returned. The top N times are kept, along with the SQL text itself and a list sorted on the execution times of the query is written to a file upon closure of the client session.
The configuration block for the **top** filter requires the minimal filter options in its section within the `MaxScale.cnf` file, stored in `$MAXSCALE_HOME/etc/MaxScale.cnf`.
The configuration block for the **top** filter requires the minimal filter options in its section within the `MaxScale.cnf` file, stored in `/etc/MaxScale.cnf`.
```
[MyLogFilter]
@ -1258,9 +1258,11 @@ In addition parameters may be added to define patterns to match against to eithe
## Encrypting Passwords
Passwords stored in the MaxScale.cnf file may optionally be encrypted for added security. This is done by creation of an encryption key on installation of MaxScale. Encryption keys may be created manually by executing the maxkeys utility with the argument of the filename to store the key.
Passwords stored in the MaxScale.cnf file may optionally be encrypted for added security. This is done by creation of an encryption key on installation of MaxScale. Encryption keys may be created manually by executing the maxkeys utility with the argument of the filename to store the key. The default location MaxScale stores the keys is `/var/cache/maxscale`.
maxkeys $MAXSCALE_HOME/etc/.secrets
```
maxkeys /var/cache/maxscale/.secrets
```
Changing the encryption key for MaxScale will invalidate any currently encrypted keys stored in the MaxScale.cnf file.
@ -1352,7 +1354,7 @@ and short notations
## Error Reporting
MaxScale is designed to be executed as a service, therefore all error reports, including configuration errors, are written to the MaxScale error log file. MaxScale will log to a set of files in the directory `$MAXSCALE_HOME/log`, the only exception to this is if the log directory is not writable, in which case a message is sent to the standard error descriptor.
MaxScale is designed to be executed as a service, therefore all error reports, including configuration errors, are written to the MaxScale error log file. By default, MaxScale will log to a set of files in the directory `/var/log/maxscale`, the only exception to this is if the log directory is not writable, in which case a message is sent to the standard error descriptor.
### Troubleshooting
@ -1367,11 +1369,11 @@ Example:
```
[Galera Listener]
type=listener
address=192.1681.3.33
address=192.168.3.33
port=4408
socket=/servers/maxscale/galera.sock
```
TCP/IP Traffic must be permitted to 192.1681.3.33 port 4408
TCP/IP Traffic must be permitted to 192.168.3.33 port 4408
For Unix socket, the socket file path (example: `/servers/maxscale/galera.sock`) must be writable by the Unix user MaxScale runs as.

View File

@ -1,8 +1,7 @@
# Set the install layout
# Possible values:
# STANDALONE - Installs to /usr/local/mariadb-maxscale
# RPM - Installs to /usr
# DEB - Installs to /usr
# PACKAGE - Installs to /usr
include(GNUInstallDirs)
set(MAXSCALE_LIBDIR ${CMAKE_INSTALL_LIBDIR}/maxscale CACHE PATH "Library installation path")

View File

@ -196,68 +196,6 @@ debugmsg("Search returned: ${MYSQL_DIR_LOC}")
set(ERRMSG ${ERRMSG_FILE} CACHE FILEPATH "Path to the errmsg.sys file." FORCE)
unset(ERRMSG_FILE)
# Find the embedded mysql library
# if (DEFINED EMBEDDED_LIB)
# if( NOT (IS_DIRECTORY ${EMBEDDED_LIB}) )
# debugmsg("EMBEDDED_LIB is not a directory: ${EMBEDDED_LIB}")
# if(${CMAKE_VERSION} VERSION_LESS 2.8.12 )
# set(COMP_VAR PATH)
# else()
# set(COMP_VAR DIRECTORY)
# endif()
# get_filename_component(EMBEDDED_LIB ${EMBEDDED_LIB} ${COMP_VAR})
# debugmsg("EMBEDDED_LIB directory component: ${EMBEDDED_LIB}")
# endif()
# debugmsg("Searching for the embedded library at: ${EMBEDDED_LIB}")
# endif()
# if(STATIC_EMBEDDED)
# debugmsg("Using the static embedded library...")
# set(OLD_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
# set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
# if (DEFINED EMBEDDED_LIB)
# debugmsg("Searching for libmysqld.a at: ${EMBEDDED_LIB}")
# find_library(EMBEDDED_LIB_STATIC libmysqld.a PATHS ${EMBEDDED_LIB} PATH_SUFFIXES mysql mariadb NO_DEFAULT_PATH)
# else()
# find_library(EMBEDDED_LIB_STATIC libmysqld.a PATH_SUFFIXES mysql mariadb)
# endif()
# debugmsg("Search returned: ${EMBEDDED_LIB_STATIC}")
# set(EMBEDDED_LIB ${EMBEDDED_LIB_STATIC} CACHE FILEPATH "Path to libmysqld" FORCE)
# set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_SUFFIXES})
# else()
# debugmsg("Using the dynamic embedded library...")
# set(OLD_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
# set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
# if (DEFINED EMBEDDED_LIB)
# debugmsg("Searching for libmysqld.so at: ${EMBEDDED_LIB}")
# find_library(EMBEDDED_LIB_DYNAMIC mysqld PATHS ${EMBEDDED_LIB} PATH_SUFFIXES mysql mariadb NO_DEFAULT_PATH)
# else()
# find_library(EMBEDDED_LIB_DYNAMIC mysqld PATH_SUFFIXES mysql mariadb)
# endif()
# debugmsg("Search returned: ${EMBEDDED_LIB_DYNAMIC}")
# set(EMBEDDED_LIB ${EMBEDDED_LIB_DYNAMIC} CACHE FILEPATH "Path to libmysqld" FORCE)
# set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_SUFFIXES})
# endif()
# unset(EMBEDDED_LIB_DYNAMIC)
# unset(EMBEDDED_LIB_STATIC)
# unset(OLD_SUFFIXES)
# # Inform the user about the embedded library
# if( (${EMBEDDED_LIB} MATCHES "NOTFOUND") OR (${EMBEDDED_LIB} MATCHES "NOTFOUND"))
# set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.")
# message(FATAL_ERROR "Library not found: libmysqld. If your install of MySQL is in a non-default location, please provide the location with -DEMBEDDED_LIB=<path to library>")
# else()
# get_filename_component(EMBEDDED_LIB ${EMBEDDED_LIB} REALPATH)
# message(STATUS "Using embedded library: ${EMBEDDED_LIB}")
# endif()
# Check which init.d script to install
find_file(RPM_FNC functions PATHS /etc/rc.d/init.d)
if(${RPM_FNC} MATCHES "RPM_FNC-NOTFOUND")

11
etc/maxscale.service.in Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=MariaDB MaxScale Database Proxy
After=network.target
[Service]
Type=forking
PIDFile=/var/run/maxscale/maxscale.pid
ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale
[Install]
WantedBy=multi-user.target