Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6334a169
Commit
6334a169
authored
Jun 02, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#248 install PS+TokuDB tarballs
parent
7ea92a65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
23 deletions
+56
-23
scripts/setup.mysql.bash
scripts/setup.mysql.bash
+56
-23
No files found.
scripts/setup.mysql.bash
View file @
6334a169
...
@@ -5,6 +5,39 @@ function usage() {
...
@@ -5,6 +5,39 @@ function usage() {
echo
"--mysqlbuild=
$mysqlbuild
--shutdown=
$shutdown
--install=
$install
--startup=
$startup
"
echo
"--mysqlbuild=
$mysqlbuild
--shutdown=
$shutdown
--install=
$install
--startup=
$startup
"
}
}
function
download_file
()
{
local
file
=
$1
s3get
$s3bucket
$file
$file
}
function
download_tarball
()
{
local
tarball
=
$1
if
[
!
-f
$tarball
]
;
then
download_file
$tarball
if
[
$?
-ne
0
]
;
then
test
0
=
1
;
return
;
fi
fi
if
[
!
-f
$tarball
.md5
]
;
then
download_file
$tarball
.md5
if
[
$?
-ne
0
]
;
then
test
0
=
1
;
return
;
fi
fi
}
function
install_tarball
()
{
local
basedir
=
$1
;
local
tarball
=
$2
tar
-x
-z
-f
$basedir
/
$tarball
if
[
$?
-ne
0
]
;
then
test
0
=
1
;
return
;
fi
}
function
check_md5
()
{
local
tarball
=
$1
md5sum
--check
$tarball
.md5
if
[
$?
-ne
0
]
;
then
# support jacksum md5 output which is almost the same as md5sum
diff
-b
<
(
cat
$tarball
.md5
)
<
(
md5sum
$tarball
)
if
[
$?
-ne
0
]
;
then
test
0
=
1
;
return
;
fi
fi
}
mysqlbuild
=
mysqlbuild
=
shutdown
=
1
shutdown
=
1
install
=
1
install
=
1
...
@@ -64,30 +97,24 @@ basedir=$PWD
...
@@ -64,30 +97,24 @@ basedir=$PWD
mysqltarball
=
$mysqlbuild
.tar.gz
mysqltarball
=
$mysqlbuild
.tar.gz
if
[
-f
$mysqlbuild
.tar.gz
]
;
then
# get the tarball
compression
=
-z
download_tarball
$mysqltarball
mysqltarball
=
$mysqlbuild
.tar.gz
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
elif
[
-f
$mysqlbuild
.tar.bz2
]
;
then
compression
=
-j
mysqltarball
=
$mysqlbuild
.tar.bz2
fi
# get the release
if
[
!
-f
$mysqltarball
]
;
then
s3get
$s3bucket
$mysqltarball
$mysqltarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
fi
if
[
!
-f
$mysqltarball
.md5
]
;
then
s3get
$s3bucket
$mysqltarball
.md5
$mysqltarball
.md5
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
fi
# check the md5 sum
# check the md5 sum
md5sum
--check
$mysqltarball
.md5
check_md5
$mysqltarball
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
# support jacksum md5 output which is almost the same as md5sum
diff
-b
<
(
cat
$mysqltarball
.md5
)
<
(
md5sum
$mysqltarball
)
tokudbtarball
=
""
if
[[
$mysqltarball
=
~ ^
(
Percona-Server.
*
)
\.
(
Linux
\.
x86_64.
*
)
$
]]
;
then
tar
tzf
$mysqltarball
| egrep ha_tokudb.so
>
/dev/null 2>&1
if
[
$?
-ne
0
]
;
then
tokudbtarball
=
${
BASH_REMATCH
[1]
}
.TokuDB.
${
BASH_REMATCH
[2]
}
download_tarball
$tokudbtarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
check_md5
$tokudbtarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
fi
fi
fi
# set ldpath
# set ldpath
...
@@ -126,8 +153,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
...
@@ -126,8 +153,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
rm
mysql
rm
mysql
if
[
-d
$mysqlbuild
]
;
then
$sudo
rm
-rf
$mysqlbuild
;
fi
if
[
-d
$mysqlbuild
]
;
then
$sudo
rm
-rf
$mysqlbuild
;
fi
tar
-x
$compression
-f
$basedir
/
$mysqltarball
install_tarball
$basedir
$mysqltarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$tokudbtarball
]
;
then
install_tarball
$basedir
$tokudbtarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
fi
ln
-s
$mysqldir
/usr/local/mysql
ln
-s
$mysqldir
/usr/local/mysql
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
ln
-s
$mysqldir
/usr/local/
$mysqlbuild
ln
-s
$mysqldir
/usr/local/
$mysqlbuild
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment