Merge branch 'install_dir_change' into develop

Conflicts:
	CMakeLists.txt
	Documentation/Tutorials/Administration-Tutorial.md
	log_manager/CMakeLists.txt
	server/core/CMakeLists.txt
	server/core/gateway.c
	server/core/maxkeys.c
	server/core/maxpasswd.c
	server/modules/filter/test/CMakeLists.txt
	server/modules/routing/CMakeLists.txt
This commit is contained in:
Markus Makela
2015-05-26 13:34:39 +03:00
64 changed files with 954 additions and 898 deletions

View File

@ -27,11 +27,9 @@ connection failover| When a connection currently being used between MaxScale and
The MaxScale configuration is read from a file which can be located in a number of placing, MaxScale will search for the configuration file in a number of locations.
1. If the environment variable `MAXSCALE_HOME` is set then MaxScale will look for a configuration file called `MaxScale.cnf` in the directory `$MAXSCALE_HOME/etc`.
1. Location given with the --configdir=<path> command line argument
2. If `MAXSCALE_HOME` is not set or the configuration file is not in the location above MaxScale will look for a file in `/etc/MaxScale.cnf`.
Alternatively MaxScale can be started with the `-c` flag and the path of the MaxScale home directory tree.
2. MaxScale will look for a configuration file called `MaxScale.cnf` in the directory `/etc/MaxScale.cnf`
An explicit path to a configuration file can be passed by using the `-f` option to MaxScale.
@ -101,6 +99,46 @@ log_debug=1
To disable the log use the value 0 and to enable it use the value 1.
#### `logdir`
Set the directory where the logfiles are stored. The folder needs to be both readable and writable by the user running MaxScale.
```
logdir=/tmp/
```
#### `datadir`
Set the directory where the data files used by MaxScale are stored. Modules can write to this directory and for example the binlogrouter uses this folder as the default location for storing binary logs.
```
datadir=/home/user/maxscale_data/
```
#### `libdir`
Set the directory where MaxScale looks for modules. The library director is the only directory that MaxScale uses when it searches for modules. If you have custom modules for MaxScale, make sure you have them in this folder.
```
libdir=/home/user/lib64/
```
#### `cachedir`
Configure the directory MaxScale uses to store cached data. An example of cached data is the authentication data fetched from the backend servers. MaxScale stores this in case a connection to the backend server is not possible.
```
cachedir=/tmp/maxscale_cache/
```
#### `language`
Set the folder where the errmsg.sys file is located in. MaxScale will look for the errmsg.sys file installed with MaxScale from this folder.
```
language=/home/user/lang/
```
### Service
A service represents the database service that MaxScale offers to the clients. In general a service consists of a set of backend database servers and a routing algorithm that determines how MaxScale decides to send statements or route connections to those backend servers.
@ -540,7 +578,7 @@ Default value is `2`. Write Timeout is the timeout in seconds for each attempt t
## Protocol Modules
The protocols supported by MaxScale are implemented as external modules that are loaded dynamically into the MaxScale core. These modules reside in the directory `$MAXSCALE_HOME/modules`, if the environment variable `$MAXSCALE_HOME` is not set it defaults to `/usr/local/mariadb-maxscale`. It may also be set by passing the `-c` option on the MaxScale command line.
The protocols supported by MaxScale are implemented as external modules that are loaded dynamically into the MaxScale core. These modules reside in the directory `/usr/lib64/maxscale`. The location can be overridden with the `libdir=PATH` parameter under the `[maxscale]` section. It may also be set by passing the `-B PATH` or `--libdir=PATH` option on the MaxScale command line.
### MySQLClient
@ -1274,7 +1312,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]
@ -1288,15 +1326,17 @@ 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.
### Creating Encrypted Passwords
Encrypted passwords are created by executing the maxpasswd command with the password you require to encrypt as an argument. The environment variable `MAXSCALE_HOME` must be set, or MaxScale must be installed in the default location before maxpasswd can be executed.
Encrypted passwords are created by executing the maxpasswd command with the password you require to encrypt as an argument.
maxpasswd MaxScalePw001
61DD955512C39A4A8BC4BB1E5F116705
@ -1382,7 +1422,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