OnApp Database Server Installation
- The document is not step by step instruction. It only describes available options, for Standalone Database Server installation (separately from Control Panel box). The server can later be used to store data by OnApp components (such as Control Panel or Zabbix Server) version >= 6.3.
- The database server is configured using predefined config (
my.cnf
) relatively to total available amount of RAM on box. - MariaDB new version 10.4 has been using to serve OnApp’s database since version 6.3 Edge 1.
- Specific installer (
onapp-mysql.sh
) is used to install the database server. To get the installer you need to:Install YUM repository of the corresponding OnApp version (change x.x into your version):
db# rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-x.x.noarch.rpm
Install the
onapp-mysql
package which contains the installer:db# yum -y install onapp-mysql
The installer script full path and options list:
db# /onapp/onapp-mysql/onapp-mysql.sh -h
The installer will install a MySQL-like database server. Connection credentials for the database will be available at:
db# cat /onapp/.my.cnf port=3306 user=root password=PASSWORD
- Mandatory options of the installer:
On CentOS 6.x box
--mariadb
- On CentOS 7.x box
--mariadb-custom
Useful options of the installer:
To grant connections from outside and
IP_ADDRESS1,IP_ADDRESS2, ...
(IP addresses are separated with commas)--grantfrom='IP_ADDRESS1,IP_ADDRESS2'
- Example of standalone database server installation, which can later be used by OnApp Control Panel
On CentOS 6.x box
db# /onapp/onapp-mysql/onapp-mysql.sh --mariadb --grantfrom='CP_IP_ADDRESS' --mysqlhost=localhost
On CentOS 7.x box
db# /onapp/onapp-mysql/onapp-mysql.sh --mariadb-custom --grantfrom='CP_IP_ADDRESS' --mysqlhost=localhost
Then, while doing Install Control Panel Server on "Run the Control Panel Installer" step, just pass extra options:
cp# /onapp/onapp-cp-install/onapp-cp-install.sh ... -m MYSQL_HOST -p PASSWORD --mysql-sock
Where:
MYSQL_HOST
- standalone database server IP addressPASSWORD
- standalone database MySQLroot
user password
7. Example of the standalone database server installation, which can later be used by OnApp Zabbix Server
On CentOS 6.x box:
db# /onapp/onapp-mysql/onapp-mysql.sh --mariadb --grantfrom='ZABBIX_HOST' --mysqlhost=localhost
On CentOS 7.x box:
db# /onapp/onapp-mysql/onapp-mysql.sh --mariadb-custom --grantfrom='ZABBIX_HOST' --mysqlhost=localhost
Then, install the Zabbix server as:
zabbix# /onapp/onapp-zabbix/onapp-zabbix.sh --mysqlhost=MYSQL_HOST --mysqlpasswd='PASSWORD'
8. To install other MySQL compatible standalone databases, use the following options for the database installer:
MariaDB Server
On CentOS 6.x box
--mariadb
On CentOS 7.x box
--mariadb-custom
Percona Server
--percona
Percona Cluster
--percona-cluster --grantfrom='WSREP_NODE_INCOMING_IP' --bootstrap
Where:
WSREP_NODE_INCOMING_IP - IP address at which the node accepts client connections.
--bootstrap is useful when installing the first node of the Percona Cluster.