mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 17:30:19 +00:00
Support Mariadb on ubuntu 16.04
This commit is contained in:
@ -29,7 +29,7 @@ Granting/Revoking access to the database for Service Node Clients
|
||||
|
||||
* Log into the MySQL interactive program. ::
|
||||
|
||||
/usr/bin/mysql -r root -p
|
||||
/usr/bin/mysql -u root -p
|
||||
|
||||
* Granting access to the xCAT database. Service Nodes are required for xCAT hierarchical support. Compute nodes may also need access that depends on which application is going to run. (xcat201 is xcatadmin's password for following examples) ::
|
||||
|
||||
|
@ -77,7 +77,7 @@ Debian/Ubuntu
|
||||
mysql-server-5*
|
||||
mysql-server-core-5*
|
||||
|
||||
* MariaDB - Using ``apt-get``, ensure that the following packages are installed on the management node: ::
|
||||
* MariaDB - Using ``apt-get``, ensure that the following packages are installed on the management node. ``apt-get install mariadb-server`` will pull in all required packages. For Ubuntu 16.04, it no longer required ``libmariadbclient18``. ::
|
||||
|
||||
libmariadbclient18
|
||||
mariadb-client
|
||||
|
@ -874,12 +874,20 @@ sub initmysqldb
|
||||
} # end AIX only
|
||||
|
||||
#on debian/ubuntu should comment the bind-adress line in my.cnf
|
||||
#on Ubuntu16.04, the bind-address line is in the mariadb.conf.d/50-server.cnf
|
||||
if ( $::debianflag ){
|
||||
$cmd = "sed 's/\\(^\\s*bind.*\\)/#\\1/' /etc/mysql/my.cnf > /tmp/my.cnf; mv -f /tmp/my.cnf /etc/mysql/my.cnf;chmod 644 /etc/mysql/my.cnf";
|
||||
my $bind_file;
|
||||
if (-e "/etc/mysql/mariadb.conf.d/50-server.cnf")
|
||||
{
|
||||
$bind_file = "/etc/mysql/mariadb.conf.d/50-server.cnf";
|
||||
} else {
|
||||
$bind_file = "/etc/mysql/my.cnf";
|
||||
}
|
||||
$cmd = "sed 's/\\(^\\s*bind.*\\)/#\\1/' $bind_file > /tmp/my.cnf; mv -f /tmp/my.cnf $bind_file;chmod 644 $bind_file";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message("E", " comment the bind-address line in /etc/mysql/my.cfg failed: $cmd.");
|
||||
xCAT::MsgUtils->message("E", " comment the bind-address line in $bind_file failed: $cmd.");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user