OnApp Database Server Installation
- For database server, each table is stored per single file and the server is configured using predefined config (my.cnf) based on total available amount of RAM.
- MariaDB new version 10.4 has been using to serve OnApp’s database since version 6.3 Edge 1. An extra
--mariadb-custom
(on CentOS 7.x) and--mariadb
(on CentOS 6.x) options are required by database installer.
To install MySQL Server standalone (separately from Control Panel box) with the installer:
- OnApp < 6.3:
Install OnApp's YUM repository:
# rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo.noarch.rpm
Install the
onapp-mysql
package:# yum -y install onapp-mysql
Run the installer:
For CentOS 6:
# /onapp/onapp-mysql/onapp-mysql.sh
For CentOS 7:
# /onapp/onapp-mysql/onapp-mysql.sh --mariadb
- OnApp >= 6.3:
Install OnApp's YUM repository:
# rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-6.3.noarch.rpm
Install the
onapp-mysql
package:# yum -y install onapp-mysql
Run the installer:
For CentOS 6:
# /onapp/onapp-mysql/onapp-mysql.sh --mariadb
For CentOS 7:
# /onapp/onapp-mysql/onapp-mysql.sh --mariadb-custom
The following example will install MySQL Server, and set root's random password:
# /onapp/onapp-mysql/onapp-mysql.sh
root user's connection properties to the server are at
# cat /onapp/.my.cnf port=3306 user=root password=PASSWORD
Just run the OnApp Control Panel's installer with the following options (MYSQL_HOST - remote MySQL Server standalone IP address):
# /onapp/onapp-cp-install/onapp-cp-install.sh -m MYSQL_HOST -p PASSWORD --mysql-sock
It is also possible to use the remote MySQL Server for the Zabbix Server. To do so, run Zabbix's installer with the following options (MYSQL_HOST - remote MySQL Server standalone IP address):
# /onapp/onapp-zabbix/onapp-zabbix.sh --mysqlhost=MYSQL_HOST --mysqlpasswd='PASSWORD'
It is required to grant access to the MySQL Server from outside if it is going to be used remotely: for example by OnApp Control Panel, or Zabbix Server. To do so, the mysql installer should be called with --grantfrom
option:
# /onapp/onapp-mysql/onapp-mysql.sh --grantfrom='CP_HOST,ZABBIX_HOST'
where, the CP_HOST and ZABBIX_HOST are Control Panel and Zabbix Server IP addresses (separated with comma).
To install other MySQL compatible standalone databases:
MariaDB Server
for OnApp < 6.3:
# /onapp/onapp-mysql/onapp-mysql.sh --mariadb
ForOnApp >= 6.3:
CentOS 6.x:
# /onapp/onapp-mysql/onapp-mysql.sh --mariadb
CentOS 7.x:
# /onapp/onapp-mysql/onapp-mysql.sh --mariadb-custom
Percona Server
# /onapp/onapp-mysql/onapp-mysql.sh --percona
Percona Cluster
# /onapp/onapp-mysql/onapp-mysql.sh --percona-cluster --grantfrom='WSREP_NODE_INCOMING_IP' --bootstrap
where, the 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.