From da406db2924d2e9760286da0642aab467f0b43ff Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 23 Mar 2015 20:12:56 +0200 Subject: [PATCH] Changed install path to /usr/local/mariadb-maxscale --- CMakeLists.txt | 2 +- Documentation/About/SETUP.md | 6 +++--- Documentation/Changelog.md | 2 +- .../Building-MaxScale-from-Source-Code.md | 2 +- Documentation/Getting-Started/Configuration-Guide.md | 2 +- .../Getting-Started/Getting-Started-With-MaxScale.md | 2 +- .../Release-Notes/MaxScale-1.1-Release-Notes.md | 2 +- Documentation/Tutorials/Administration-Tutorial.md | 10 +++++----- .../Galera-Cluster-Connection-Routing-Tutorial.md | 6 +++--- .../Galera-Cluster-Read-Write-Splitting-Tutorial.md | 6 +++--- Documentation/Tutorials/MySQL-Cluster-Setup.md | 2 +- .../MySQL-Replication-Connection-Routing-Tutorial.md | 4 ++-- .../MySQL-Replication-Read-Write-Splitting-Tutorial.md | 6 +++--- Documentation/Tutorials/Nagios-Plugins.md | 4 ++-- Documentation/Tutorials/Simple-Sharding-Tutorial.md | 2 +- Documentation/Upgrading-To-MaxScale-1.1.0.md | 6 +++--- plugins/nagios/check_maxscale_monitors.pl | 2 +- plugins/nagios/check_maxscale_resources.pl | 2 +- plugins/nagios/check_maxscale_threads.pl | 2 +- plugins/nagios/server1.cfg | 2 +- rabbitmq_consumer/CMakeLists.txt | 2 +- rabbitmq_consumer/rabbitmq-message-consumer.spec | 2 +- server/core/adminusers.c | 8 ++++---- server/core/load_utils.c | 4 ++-- server/core/secrets.c | 2 +- server/core/service.c | 4 ++-- server/core/test/testadminusers.c | 2 +- server/modules/routing/binlog/blr_file.c | 6 +++--- 28 files changed, 51 insertions(+), 51 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df96a23bc..0b0e32405 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ enable_testing() set_variables() set_maxscale_version() -set(CMAKE_INSTALL_PREFIX "/usr/local/mariadb/maxscale" CACHE PATH "Prefix prepended to install directories.") +set(CMAKE_INSTALL_PREFIX "/usr/local/mariadb-maxscale" CACHE PATH "Prefix prepended to install directories.") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") diff --git a/Documentation/About/SETUP.md b/Documentation/About/SETUP.md index b5c211f1f..d391b68fd 100644 --- a/Documentation/About/SETUP.md +++ b/Documentation/About/SETUP.md @@ -8,18 +8,18 @@ in the README file and execute make install. Simply set the environment variable MAXSCALE_HOME to point to the MaxScale directory, found inside the path into which the files have been copied, -e.g. MAXSCALE_HOME=/usr/local/mariadb/maxscale +e.g. MAXSCALE_HOME=/usr/local/mariadb-maxscale Also you will need to optionaly set LD_LIBRARY_PATH to include the 'lib' folder, found inside the path into which the files have been copied, -e.g. LD_LIBRARY_PATH=/usr/local/mariadb/maxscale/lib +e.g. LD_LIBRARY_PATH=/usr/local/mariadb-maxscale/lib Because we need the libmysqld library for parsing we must create a valid my.cnf file to enable the library to be used. Copy the my.cnf to $MAXSCALE_HOME/mysql/my.cnf. To start MaxScale execute the command 'maxscale' from the bin folder, -e.g. /usr/local/mariadb/maxscale/bin/maxscale +e.g. /usr/local/mariadb-maxscale/bin/maxscale Configuration diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index a4fd0d2f3..eb4f17395 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -2,7 +2,7 @@ These are the changes introduced in the next MaxScale version. This is not the official change log and the latest changelog can always be found in here: [MaxScale 1.1 Release Notes](Release-Notes/MaxScale-1.1-Release-Notes.md) -**NOTE:** MaxScale default installation directory has changed to `/usr/local/mariadb/maxscale` and the default password for MaxAdmin is now ´mariadb´. +**NOTE:** MaxScale default installation directory has changed to `/usr/local/mariadb-maxscale` and the default password for MaxAdmin is now ´mariadb´. * New modules added * Binlog router diff --git a/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md b/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md index 831e12a70..f95d2de9a 100644 --- a/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md +++ b/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md @@ -171,7 +171,7 @@ After the completion of the make process the installation can be achieved by run This will result in an installation being created which is identical to that which would be achieved by installing the binary package. The only difference is that init.d scripts aren't installed and the RabbitMQ components are not built. -By default, MaxScale installs to '/usr/local/mariadb/maxscale' and places init.d scripts and ldconfig files into their folders. Change the CMAKE_INSTALL_PREFIX variable to your desired installation directory and set INSTALL_SYSTEM_FILES=N to prevent the init.d script and ldconfig file installation. +By default, MaxScale installs to '/usr/local/mariadb-maxscale' and places init.d scripts and ldconfig files into their folders. Change the CMAKE_INSTALL_PREFIX variable to your desired installation directory and set INSTALL_SYSTEM_FILES=N to prevent the init.d script and ldconfig file installation. Other useful targets for Make are `documentation`, which generates the Doxygen documentation, and `uninstall` which uninstall MaxScale binaries after an install. diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index 84c48c46b..350b943a0 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -513,7 +513,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 `$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. ### MySQLClient diff --git a/Documentation/Getting-Started/Getting-Started-With-MaxScale.md b/Documentation/Getting-Started/Getting-Started-With-MaxScale.md index 789408987..9e1b3d5f8 100644 --- a/Documentation/Getting-Started/Getting-Started-With-MaxScale.md +++ b/Documentation/Getting-Started/Getting-Started-With-MaxScale.md @@ -65,7 +65,7 @@ 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/mariadb/maxscale/modules + 3. Look in /usr/local/mariadb-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. diff --git a/Documentation/Release-Notes/MaxScale-1.1-Release-Notes.md b/Documentation/Release-Notes/MaxScale-1.1-Release-Notes.md index 54b3a8cd1..fed31ead7 100644 --- a/Documentation/Release-Notes/MaxScale-1.1-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-1.1-Release-Notes.md @@ -80,7 +80,7 @@ A number of bug fixes have been applied between the 1.0.5 GA and this RC release 709 - "COPYRIGHT LICENSE README SETUP" files go to /usr/local/mariadb/maxscale/ after 'make package' + "COPYRIGHT LICENSE README SETUP" files go to /usr/local/mariadb-maxscale/ after 'make package' 704 diff --git a/Documentation/Tutorials/Administration-Tutorial.md b/Documentation/Tutorials/Administration-Tutorial.md index 39c3833da..d212b2e17 100644 --- a/Documentation/Tutorials/Administration-Tutorial.md +++ b/Documentation/Tutorials/Administration-Tutorial.md @@ -22,7 +22,7 @@ or $ /etc/init.d/maxscale start -It is also possible to start MaxScale by executing the maxscale command itself, in this case you must ensure that the environment is correctly setup or command line options are passed. The major elements to consider are the correct setting of the MAXSCALE\_HOME directory and to ensure that LD\_LIBRARY\_PATH. The LD\_LIBRARY\_PATH should include the lib directory that was installed as part of the MaxScale installation, the MAXSCALE\_HOME should point to /usr/local/mariadb/maxscale if a default installation has been created or to the directory this was relocated to. Running the executable $MAXSCALE\_HOME/bin/maxscale will result in MaxScale running as a daemon process, unattached to the terminal in which it was started and using configuration files that it finds in the $MAXSCALE\_HOME directory. +It is also possible to start MaxScale by executing the maxscale command itself, in this case you must ensure that the environment is correctly setup or command line options are passed. The major elements to consider are the correct setting of the MAXSCALE\_HOME directory and to ensure that LD\_LIBRARY\_PATH. The LD\_LIBRARY\_PATH should include the lib directory that was installed as part of the MaxScale installation, the MAXSCALE\_HOME should point to /usr/local/mariadb-maxscale if a default installation has been created or to the directory this was relocated to. Running the executable $MAXSCALE\_HOME/bin/maxscale will result in MaxScale running as a daemon process, unattached to the terminal in which it was started and using configuration files that it finds in the $MAXSCALE\_HOME directory. Options may be passed to the MaxScale binary that alter this default behaviour, this options are documented in the table below. @@ -154,7 +154,7 @@ This may be integrated into the Linux logrotate mechanism by adding a configurat - @@ -175,14 +175,14 @@ One disadvantage with this is that the password used for the maxadmin command ha
/usr/local/mariadb/maxscale/log/*.log { + /usr/local/mariadb-maxscale/log/*.log { monthly rotate 5 missingok @@ -163,7 +163,7 @@ sharedscripts postrotate \# run if maxscale is running if test -n "`ps acx|grep maxscale`"; then -/usr/local/mariadb/maxscale/bin/maxadmin -pmariadb flush logs +/usr/local/mariadb-maxscale/bin/maxadmin -pmariadb flush logs fi endscript }
- diff --git a/Documentation/Tutorials/Galera-Cluster-Connection-Routing-Tutorial.md b/Documentation/Tutorials/Galera-Cluster-Connection-Routing-Tutorial.md index 516862542..f26bf8bab 100644 --- a/Documentation/Tutorials/Galera-Cluster-Connection-Routing-Tutorial.md +++ b/Documentation/Tutorials/Galera-Cluster-Connection-Routing-Tutorial.md @@ -60,7 +60,7 @@ If you wish to use two different usernames for the two different roles of monito ### Creating Your MaxScale Configuration -MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. +MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb-maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. @@ -89,7 +89,7 @@ In order to instruct the router to which servers it should route we must add rou The final step in the service section is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. - % maxkeys /usr/local/mariadb/maxscale/etc/.secrets + % maxkeys /usr/local/mariadb-maxscale/etc/.secrets % Once the keys have been created the maxpasswd command can be used to generate the encrypted password. @@ -178,7 +178,7 @@ or % service maxscale start -Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. +Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. % maxadmin -pmariadb list services diff --git a/Documentation/Tutorials/Galera-Cluster-Read-Write-Splitting-Tutorial.md b/Documentation/Tutorials/Galera-Cluster-Read-Write-Splitting-Tutorial.md index 4f91dcda9..5245c65d8 100644 --- a/Documentation/Tutorials/Galera-Cluster-Read-Write-Splitting-Tutorial.md +++ b/Documentation/Tutorials/Galera-Cluster-Read-Write-Splitting-Tutorial.md @@ -62,7 +62,7 @@ If you wish to use two different usernames for the two different roles of monito ### Creating Your MaxScale Configuration -MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. +MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb-maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. @@ -83,7 +83,7 @@ The router for we need to use for this configuration is the readwritesplit modul The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. - % maxkeys /usr/local/mariadb/maxscale/etc/.secrets + % maxkeys /usr/local/mariadb-maxscale/etc/.secrets % Once the keys have been created the maxpasswd command can be used to generate the encrypted password. @@ -183,7 +183,7 @@ or % service maxscale start -Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. +Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. % maxadmin -pmariadb list services diff --git a/Documentation/Tutorials/MySQL-Cluster-Setup.md b/Documentation/Tutorials/MySQL-Cluster-Setup.md index 21c2ece29..0cf1209a3 100644 --- a/Documentation/Tutorials/MySQL-Cluster-Setup.md +++ b/Documentation/Tutorials/MySQL-Cluster-Setup.md @@ -249,7 +249,7 @@ Add these sections in MaxScale.cnf config file: Assuming MaxScale is installed in server1, start it - [root@server1 ~]# cd /usr/local/mariadb/maxscale/bin + [root@server1 ~]# cd /usr/local/mariadb-maxscale/bin [root@server1 bin]# ./maxscale -c ../ diff --git a/Documentation/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md b/Documentation/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md index 38c16a3aa..8fd8b496a 100644 --- a/Documentation/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md +++ b/Documentation/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md @@ -130,7 +130,7 @@ servers=dbserv1, dbserv2, dbserv3 The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. -% maxkeys /usr/local/mariadb/maxscale/etc/.secrets +% maxkeys /usr/local/mariadb-maxscale/etc/.secrets % @@ -292,7 +292,7 @@ or % service maxscale start -Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. +Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. % maxadmin -pmariadb list services diff --git a/Documentation/Tutorials/MySQL-Replication-Read-Write-Splitting-Tutorial.md b/Documentation/Tutorials/MySQL-Replication-Read-Write-Splitting-Tutorial.md index dbc2d4eab..49c151dc2 100644 --- a/Documentation/Tutorials/MySQL-Replication-Read-Write-Splitting-Tutorial.md +++ b/Documentation/Tutorials/MySQL-Replication-Read-Write-Splitting-Tutorial.md @@ -70,7 +70,7 @@ If you wish to use two different usernames for the two different roles of monito ## Creating Your MaxScale Configuration -MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb/maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. +MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory $MAXSCALE_HOME/etc, if you have installed in the default location then this file is available in /usr/local/mariadb-maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. @@ -96,7 +96,7 @@ servers=dbserv1, dbserv2, dbserv3 The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored. -% maxkeys /usr/local/mariadb/maxscale/etc/.secrets +% maxkeys /usr/local/mariadb-maxscale/etc/.secrets % @@ -226,7 +226,7 @@ or % service maxscale start -Check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. +Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. % maxadmin -pmariadb list services diff --git a/Documentation/Tutorials/Nagios-Plugins.md b/Documentation/Tutorials/Nagios-Plugins.md index fb10e7912..9ee3a87c7 100644 --- a/Documentation/Tutorials/Nagios-Plugins.md +++ b/Documentation/Tutorials/Nagios-Plugins.md @@ -73,9 +73,9 @@ and add (just after localhost.cfg or commnads.cfg) - modify server IP address in server1.cfg, pointing to MaxScale server - maxadmin executable must be in the nagios server - default MaxScale AdminInterface port is 6603 -- default maxadmin executable path is /usr/local/mariadb/maxscale/bin/maxadmin +- default maxadmin executable path is /usr/local/mariadb-maxscale/bin/maxadmin It can be changed by -m option -- maxadmin executable could be copied from an existing maxscale installation (default location is /usr/local/mariadb/maxscale/bin/maxadmin) +- maxadmin executable could be copied from an existing maxscale installation (default location is /usr/local/mariadb-maxscale/bin/maxadmin) This example shows configuration that needs to be done on Nagios server in order to communicate to MaxScale server that is running on host server1. In this example we are using the check_maxscale_resource as the check command diff --git a/Documentation/Tutorials/Simple-Sharding-Tutorial.md b/Documentation/Tutorials/Simple-Sharding-Tutorial.md index 04d78d2d7..6419386fb 100644 --- a/Documentation/Tutorials/Simple-Sharding-Tutorial.md +++ b/Documentation/Tutorials/Simple-Sharding-Tutorial.md @@ -92,7 +92,7 @@ After this we have a fully working configuration and we can move on to starting Upon completion of the configuration process MaxScale is ready to be started . This may either be done manually by running the maxscale command or via the service interface. The service scripts are located in the `/etc/init.d/` folder and are accessible through both the `service` and `systemctl` commands. -After starting MaxScale check the error log in /usr/local/mariadb/maxscale/log to see if any errors are detected in the configuration file. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. +After starting MaxScale check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. MaxScale is now ready to start accepting client connections and routing them. Queries are routed to the right servers based on the database they target and switching between the shards is semaless since MaxScale keeps the session state intact between servers. diff --git a/Documentation/Upgrading-To-MaxScale-1.1.0.md b/Documentation/Upgrading-To-MaxScale-1.1.0.md index ddd232613..343fc2fd7 100644 --- a/Documentation/Upgrading-To-MaxScale-1.1.0.md +++ b/Documentation/Upgrading-To-MaxScale-1.1.0.md @@ -4,15 +4,15 @@ This document describes upgrading MaxScale from version 1.0.5 to 1.1.0 and the m ## Installation -If you are installing MaxScale from a RPM package, we recommend you back up your configuration and log files and that you remove the old installation of MaxScale completely. If you choose to upgrade MaxScale instead of removing it and re-installing it afterwards, the init scripts in `/etc/init.d` folder will be missing. This is due to the RPM packaging system but the script can be re-installed by running the `postinst` script found in the `/usr/local/mariadb/maxscale` folder. +If you are installing MaxScale from a RPM package, we recommend you back up your configuration and log files and that you remove the old installation of MaxScale completely. If you choose to upgrade MaxScale instead of removing it and re-installing it afterwards, the init scripts in `/etc/init.d` folder will be missing. This is due to the RPM packaging system but the script can be re-installed by running the `postinst` script found in the `/usr/local/mariadb-maxscale` folder. ``` # Re-install init scripts -cd /usr/local/mariadb/maxscale +cd /usr/local/mariadb-maxscale ./postinst ``` -The 1.1.0 version of MaxScale installs into `/usr/local/mariadb/maxscale` instead of `/usr/local/skysql/maxscale`. This will cause external references to MaxScale's home directory to stop working so remember to update all paths with the new version. +The 1.1.0 version of MaxScale installs into `/usr/local/mariadb-maxscale` instead of `/usr/local/skysql/maxscale`. This will cause external references to MaxScale's home directory to stop working so remember to update all paths with the new version. ## MaxAdmin changes diff --git a/plugins/nagios/check_maxscale_monitors.pl b/plugins/nagios/check_maxscale_monitors.pl index 5836c3379..42db839ae 100755 --- a/plugins/nagios/check_maxscale_monitors.pl +++ b/plugins/nagios/check_maxscale_monitors.pl @@ -70,7 +70,7 @@ EOF 'u' => 'root', # username 'p' => '', # password 'P' => 6603, # port - 'm' => '/usr/local/mariadb/maxscale/bin/maxadmin', # maxadmin + 'm' => '/usr/local/mariadb-maxscale/bin/maxadmin', # maxadmin ); my $MAXADMIN_DEFAULT = $opts{'m'}; diff --git a/plugins/nagios/check_maxscale_resources.pl b/plugins/nagios/check_maxscale_resources.pl index cf446f3a1..7e121374a 100755 --- a/plugins/nagios/check_maxscale_resources.pl +++ b/plugins/nagios/check_maxscale_resources.pl @@ -70,7 +70,7 @@ EOF 'u' => 'root', # username 'p' => '', # password 'P' => 6603, # port - 'm' => '/usr/local/mariadb/maxscale/bin/maxadmin', # maxadmin + 'm' => '/usr/local/mariadb-maxscale/bin/maxadmin', # maxadmin ); my $MAXADMIN_DEFAULT = $opts{'m'}; diff --git a/plugins/nagios/check_maxscale_threads.pl b/plugins/nagios/check_maxscale_threads.pl index bd96f836e..faa06e4ba 100755 --- a/plugins/nagios/check_maxscale_threads.pl +++ b/plugins/nagios/check_maxscale_threads.pl @@ -70,7 +70,7 @@ EOF 'u' => 'root', # username 'p' => '', # password 'P' => 6603, # port - 'm' => '/usr/local/mariadb/maxscale/bin/maxadmin', # maxadmin + 'm' => '/usr/local/mariadb-maxscale/bin/maxadmin', # maxadmin ); my $MAXADMIN_DEFAULT = $opts{'m'}; diff --git a/plugins/nagios/server1.cfg b/plugins/nagios/server1.cfg index 6e0f12d5a..a223be4b9 100644 --- a/plugins/nagios/server1.cfg +++ b/plugins/nagios/server1.cfg @@ -106,6 +106,6 @@ define service{ use local-service ; Name of service template to use host_name server1 service_description MaxScale_threads - check_command check_maxscale_threads!6603!admin!mariadb!threads!/usr/local/mariadb/maxscale/bin/maxadmin + check_command check_maxscale_threads!6603!admin!mariadb!threads!/usr/local/mariadb-maxscale/bin/maxadmin notifications_enabled 0 } diff --git a/rabbitmq_consumer/CMakeLists.txt b/rabbitmq_consumer/CMakeLists.txt index 92e7440e2..2363b9e15 100644 --- a/rabbitmq_consumer/CMakeLists.txt +++ b/rabbitmq_consumer/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) include(../macros.cmake) enable_testing() set_variables() -set(CMAKE_INSTALL_PREFIX "/usr/local/mariadb/rabbitmq-consumer" CACHE PATH "Prefix prepended to install directories.") +set(CMAKE_INSTALL_PREFIX "/usr/local/rabbitmq-consumer" CACHE PATH "Prefix prepended to install directories.") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake") project("RabbitMQ Consumer") diff --git a/rabbitmq_consumer/rabbitmq-message-consumer.spec b/rabbitmq_consumer/rabbitmq-message-consumer.spec index c9a93bbb3..5e810c00f 100644 --- a/rabbitmq_consumer/rabbitmq-message-consumer.spec +++ b/rabbitmq_consumer/rabbitmq-message-consumer.spec @@ -2,7 +2,7 @@ %define name rabbitmq-message-consumer %define release beta %define version 1.0 -%define install_path /usr/local/mariadb/maxscale/extra/consumer/ +%define install_path /usr/local/mariadb/rabbitmq-consumer/ BuildRoot: %{buildroot} Summary: rabbitmq-message-consumer diff --git a/server/core/adminusers.c b/server/core/adminusers.c index b3d585179..64ea5f224 100644 --- a/server/core/adminusers.c +++ b/server/core/adminusers.c @@ -123,7 +123,7 @@ char uname[80], passwd[80]; sprintf(fname, "%s/etc/passwd", home); } else{ - sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd"); + sprintf(fname, "/usr/local/mariadb-maxscale/etc/passwd"); } if ((fp = fopen(fname, "r")) == NULL) return NULL; @@ -159,7 +159,7 @@ char fname[1024], *home, *cpasswd; sprintf(fname, "%s/etc/passwd", home); } else{ - sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd"); + sprintf(fname, "/usr/local/mariadb-maxscale/etc/passwd"); } if (users == NULL) @@ -259,8 +259,8 @@ char* admin_remove_user( sprintf(fname, "%s/etc/passwd", home); sprintf(fname_tmp, "%s/etc/passwd_tmp", home); } else { - sprintf(fname, "/usr/local/mariadb/maxscale/etc/passwd"); - sprintf(fname_tmp, "/usr/local/mariadb/maxscale/etc/passwd_tmp"); + sprintf(fname, "/usr/local/mariadb-maxscale/etc/passwd"); + sprintf(fname_tmp, "/usr/local/mariadb-maxscale/etc/passwd_tmp"); } /** * Rewrite passwd file from memory. diff --git a/server/core/load_utils.c b/server/core/load_utils.c index 82c24874e..172f24ad0 100644 --- a/server/core/load_utils.c +++ b/server/core/load_utils.c @@ -109,7 +109,7 @@ char* get_maxscale_home(void) char* home = getenv("MAXSCALE_HOME"); if (home == NULL) { - home = "/usr/local/mariadb/maxscale"; + home = "/usr/local/mariadb-maxscale"; } return home; } @@ -118,7 +118,7 @@ char* get_maxscale_home(void) /** * Load the dynamic library related to a gateway module. The routine * will look for library files in the current directory, - * $MAXSCALE_HOME/modules and /usr/local/mariadb/maxscale/modules. + * $MAXSCALE_HOME/modules and /usr/local/mariadb-maxscale/modules. * * @param module Name of the module to load * @param type Type of module, used purely for registration diff --git a/server/core/secrets.c b/server/core/secrets.c index 74c67c1b3..3eae2cc48 100644 --- a/server/core/secrets.c +++ b/server/core/secrets.c @@ -73,7 +73,7 @@ static int reported = 0; home = getenv("MAXSCALE_HOME"); if (home == NULL) { - home = "/usr/local/mariadb/maxscale"; + home = "/usr/local/mariadb-maxscale"; } snprintf(secret_file, 255, "%s/etc/.secrets", home); diff --git a/server/core/service.c b/server/core/service.c index 1dd5d57b5..ad1a266b6 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -229,7 +229,7 @@ GWPROTOCOL *funcs; { /* Try loading authentication data from file cache */ char *ptr, path[4097]; - strcpy(path, "/usr/local/mariadb/maxscale"); + strcpy(path, "/usr/local/mariadb-maxscale"); if ((ptr = getenv("MAXSCALE_HOME")) != NULL) { strncpy(path, ptr, 4096); @@ -259,7 +259,7 @@ GWPROTOCOL *funcs; /* Save authentication data to file cache */ char *ptr, path[4097]; int mkdir_rval = 0; - strcpy(path, "/usr/local/mariadb/maxscale"); + strcpy(path, "/usr/local/mariadb-maxscale"); if ((ptr = getenv("MAXSCALE_HOME")) != NULL) { strncpy(path, ptr, 4096); diff --git a/server/core/test/testadminusers.c b/server/core/test/testadminusers.c index cb8420067..ae52bd8b7 100644 --- a/server/core/test/testadminusers.c +++ b/server/core/test/testadminusers.c @@ -270,7 +270,7 @@ char *home, buf[1024]; /* Unlink any existing password file before running this test */ if ((home = getenv("MAXSCALE_HOME")) == NULL || strlen(home) >= 1024) - home = "/usr/local/mariadb"; + home = "/usr/local/mariadb-maxscale"; sprintf(buf, "%s/etc/passwd", home); if(!is_valid_posix_path(buf)) exit(1); diff --git a/server/modules/routing/binlog/blr_file.c b/server/modules/routing/binlog/blr_file.c index 9540ff972..482449fc1 100644 --- a/server/modules/routing/binlog/blr_file.c +++ b/server/modules/routing/binlog/blr_file.c @@ -79,7 +79,7 @@ struct dirent *dp; if (router->binlogdir == NULL) { - strcpy(path, "/usr/local/mariadb/maxscale"); + strcpy(path, "/usr/local/mariadb-maxscale"); if ((ptr = getenv("MAXSCALE_HOME")) != NULL) { strncpy(path, ptr,PATH_MAX); @@ -633,7 +633,7 @@ blr_cache_response(ROUTER_INSTANCE *router, char *response, GWBUF *buf) char path[4097], *ptr; int fd; - strcpy(path, "/usr/local/mariadb/maxscale"); + strcpy(path, "/usr/local/mariadb-maxscale"); if ((ptr = getenv("MAXSCALE_HOME")) != NULL) { strncpy(path, ptr, 4096); @@ -672,7 +672,7 @@ char path[4097], *ptr; int fd; GWBUF *buf; - strcpy(path, "/usr/local/mariadb/maxscale"); + strcpy(path, "/usr/local/mariadb-maxscale"); if ((ptr = getenv("MAXSCALE_HOME")) != NULL) { strncpy(path, ptr, 4096);
/usr/local/mariadb/maxscale/log/*.log { + /usr/local/mariadb-maxscale/log/*.log { monthly rotate 5 missingok nocompress sharedscripts postrotate -kill -USR1 `cat /usr/local/mariadb/maxscale/log/maxscale.pid` +kill -USR1 `cat /usr/local/mariadb-maxscale/log/maxscale.pid` endscript }