Created
October 21, 2010 00:38
-
-
Save till/637669 to your computer and use it in GitHub Desktop.
Revisions
-
till revised this gist
Oct 21, 2010 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,8 @@ #!/bin/sh ############################ # Author: Till Klampaeckel # # License: New BSD License # ############################ version=$1 -
till created this gist
Oct 21, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ #!/bin/sh version=$1 if [ "x$version" = "x" ]; then echo "Usage: ./$0 5.0|5.1" exit 1 fi distro=$(lsb_release -s -c) apt_opt="-q" # --dry-run gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A if [ "$?" -gt 0 ]; then echo "Could not download key." exit 1 fi gpg -a --export CD2EFD2A | apt-key add - if [ "$?" -gt 0 ]; then echo "Could not import key." exit 1 fi percona_repo="/etc/apt/sources.list.d/percona.list" if [ ! -e $percona_repo ]; then repo="deb http://repo.percona.com/apt ${distro} main\n" repo="${repo}deb-src http://repo.percona.com/apt ${distro} main" echo -n "$repo" > $percona_repo fi apt-get -q update if [ "$version" = "5.0" ]; then apt-get install $apt_opt percona-sql-common percona-sql-client-5.0 apt-get install $apt_opt percona-sql-server-5.0 elif [ "$version" = "5.1" ]; then apt-get install $apt_opt percona-server-common percona-server-client-5.1 apt-get install $apt_opt percona-server-server-5.1 else echo "Version: ${version} - wat?" fi