Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / rubbos / rubbos_scripts / 1-1-1 / scripts / MYSQL1_install.sh
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 cd /bottlenecks/rubbos/rubbos_scripts/1-1-1
12 source set_bottlenecks_rubbos_env.sh
13
14 echo "INSTALLING MYSQL on $HOSTNAME"
15
16 mkdir -p $BOTTLENECKS_TOP
17 chmod 755 $BOTTLENECKS_TOP
18 mkdir -p $RUBBOS_TOP
19 chmod 755 $RUBBOS_TOP
20 mkdir -p $RUBBOS_APP
21 chmod 755 $RUBBOS_APP
22
23 cd /root
24 groupadd mysql
25 useradd -r -g mysql $BOTTLENECKS_USER
26 tar xzf $SOFTWARE_HOME/$MYSQL_TARBALL --directory=$RUBBOS_APP
27 cd /usr/local
28 ln -s $MYSQL_HOME mysql
29 cd mysql
30 chown -R $BOTTLENECKS_USER .
31 chgrp -R mysql .
32 #scripts/mysql_install_db --verbose --user=$BOTTLENECKS_USER --basedir=$MYSQL_HOME --datadir=$MYSQL_DATA_DIR
33 scripts/mysql_install_db --user=$BOTTLENECKS_USER
34 chown -R root .
35 chown -R $BOTTLENECKS_USER data
36
37 #echo "begin install mysql"
38 #cd $MYSQL_HOME
39 #scripts/mysql_install_db --no-defaults --user=root --basedir=$MYSQL_HOME --port=$MYSQL_PORT --datadir=$MYSQL_DATA_DIR --log=$MYSQL_ERR_LOG --pid-file=$MYSQL_PID_FILE --socket=$MYSQL_SOCKET
40
41 echo "DONE INSTALLING MYSQL on $HOSTNAME"