ラベル source の投稿を表示しています。 すべての投稿を表示
ラベル source の投稿を表示しています。 すべての投稿を表示

2014年4月7日月曜日

WebScaleSQLインストールで解決...パート2

Original post: http://anothermysqldba.blogspot.com/2014/04/webscalesql-installation-solved-part-2.html

:これはのフォローアップで試行さWebScaleSQLインストール...パート1

そう典型的なオタク、開発者、馬鹿または何..私はしなかったというRTFMか、この場合のよくある質問 。

私が注目し、ちょうどそれに突入していなかったので、一度、私がインストールされWebScaleSQLを正しく。
最大の問題は、私は古すぎるとOracleのリポジトリは、それがアップグレードされ得るのを助けるためにほとんど何もしなかったLinux OSを(OracleのLinux仮想マシン)を使用していたということでした。 私はちょうどそれがなかったことを、誰もが簡単に使用できるようなもので開始したいと思った一方で。

私がダウンロードしたFedoraの20 。 あなたは、彼らがすでに使用していることがわかります、GCC 4.8.2を。
だから、ポイントは、新しい技術を使用する場合は、同様にあなたのOSのアップデート、十分に簡単である。

あなたが本当にあなたのGCCをアップグレードして、現在のOSに滞在する場合は、これらのハイパーリンクは便利かもしれません:
以下は、私は、それがインストールさにかかった手順は次のとおりです。 依存関係が所定の位置に入ると、それは、インストールの基本的なソースです。

#cd /usr/local/
#yum -y install gcc git readline-devel gcc-c++ bison-devel bison cmake ncurses-devel
# gcc -v
gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC)

#git clone https://github.com/webscalesql/webscalesql-5.6.git
#ln -s webscalesql-5.6 mysql
#groupadd mysql
#useradd -r -g mysql mysql
#cd mysql/
#cmake . -DENABLE_DOWNLOADS=1
-- Successfully downloaded http://googlemock.googlecode.com/files/gmock-1.6.0.zip
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/webscalesql-5.6

#make
Scanning dependencies of target INFO_BIN
[ 0%] Built target INFO_BIN
Scanning dependencies of target INFO_SRC
[ 0%] Built target INFO_SRC
Scanning dependencies of target abi_check
[ 0%] Built target abi_check
Scanning dependencies of target zlib
[ 1%] Building C object zlib/CMakeFiles/zlib.dir/adler32.co
.....
[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
Linking CXX executable my_safe_process
[100%] Built target my_safe_process
#make install
#chmod +x scripts/mysql_install_db
#yum -y install perl-Data-Dumper-Names
#./scripts/mysql_install_db --user=mysql
#chown -R mysql data
#./bin/mysqld_safe &
# ./bin/mysql

mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 5.6.17 |
+-----------+

mysql> show variables like '%read_only%';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| innodb_read_only | OFF |
| read_only | OFF |
| super_read_only | OFF |
| tx_read_only | OFF |
+------------------+-------+

cd mysql-test ; perl mysql-test-run.pl


[OK]を、今我々はそれを持って、実行していることを···我々はそれを探索することができます...

2014年3月28日金曜日

WebScaleSQLのインストールが試み...パート1

Original post: http://anothermysqldba.blogspot.com/2014/03/webscalesql-installation-attempted-part.html

まだニュースを参照していない場合だけでなく、すべての手段によって、このリンクをたどるとについて読んWebScaleSQL 。 これについての彼らのハードワークのためのFacebook、Twitterと​​Googleのエンジニアのチームに感謝します。 私はそれを動作させるかつて私は、これは将来的にはより多くの開発をどのように見て好奇心旺盛です。

ここで私はこれまでに遭遇したものです。 私は、これが成功したブログの記事になりたかった、私はそれが動作して得るまで代わりに、一部1になります。

私は、新しいあなたのそれらのためにWebScaleSQLをインストールする方法を少し我慢すると考えましたGitHubの本のいずれか。 それは結局、コミュニティからのフィードバックがかかるので、コミュニティはインストールし、それを試してみることができる必要がある。

この例では、私は事前に構築されたOracleのLinux仮想ボックス画像を取った。 私はすでに1を持っていたが、それはここから入手可能です: http://www.oracle.com/technetwork/server-storage/linux/downloads/vm-for-hol-1896500.html。

それがあることは明らかであるべきWebScaleSQLが上で使用するためのものではありませんVirtualBoxの製造においては、これは単なるデモです。 私はそれが人々は誰もがダウンロードしてこれを使用することができますので、それを試してみるための言い訳がないことを意味しているとVirtualBoxを 。 私はあなたが十分なスペースを持っているようにイメージが付属して追加のディスクを有効にする必要がありました。 、パーティションをフォーマットし、すべてのディスクユーティリティを介して行うことができるディスクをマウントするには。 私の例のための完成品は以下の通りです。

[root@oraclelinux6 oracle]# ls -al /media/
drwx------ 3 oracle oracle 4096 Mar 27 16:19 webscaledisk
drwx------ 3 oracle oracle 4096 Mar 27 16:21 workspace
[root@oraclelinux6 oracle]# chmod 777 /media/workspace/
[root@oraclelinux6 oracle]# chmod 777 /media/webscaledisk/

のコードWebScaleSQLが提供されていますGitHubの 。 zipファイルをダウンロードすることができ、ここで 。 私はGitHubのコードリポジトリのメソッドを経由してコードをチェックアウトすることを選択した。 他の人がSSHキーのヘルプが必要な場合はGitbhubのリファレンスを参照してくださいページを 。

gitのパッケージには、OracleのLinux上では使用できませんが、あなたはGitHubのバージョンを使用する場合は、その素早く解決される。

[oracle@oraclelinux6 ~]$ sudo bash
[root@oraclelinux6 oracle]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
[root@oraclelinux6 oracle]# wget http://git-core.googlecode.com/files/git-1.7.10.1.tar.gz
[root@oraclelinux6 oracle]# tar -xvzf git-1.7.10.1.tar.gz
[root@oraclelinux6 oracle]# cd git-1.7.10.1
[root@oraclelinux6 git-1.7.10.1]# make prefix=/usr/local all
[root@oraclelinux6 git-1.7.10.1]# make prefix=/usr/local install
[root@oraclelinux6 git-1.7.10.1]# exit
$ git --version
git version 1.7.10.1

Gitとしたら、SSH鍵が準備ができているあなたがダウンロードすることができます。

[oracle@oraclelinux6 ~]$ cd /media/workspace/
[oracle@oraclelinux6 workspace]$ git clone https://github.com/webscalesql/webscalesql-5.6.git
Cloning into 'webscalesql-5.6'...
remote: Counting objects: 28637, done.
remote: Compressing objects: 100% (10926/10926), done.
remote: Total 28637 (delta 17074), reused 28419 (delta 16936)
Receiving objects: 100% (28637/28637), 48.01 MiB | 796 KiB/s, done.
Resolving deltas: 100% (17074/17074), done.



[OK]しかし、コードを取得することを決めた...私たちは、今ではインストールされて取得してみてましょう。 明確にするために、これは、これは基本的なMySQLのソースをインストール新しいものではないはずされているが、それだけでWebScaleSQLパッケージを使用しています。 私が行ったようにそれは基本的に同じ手順に従いますここの前に。

私が最初にこのクリーンなシステムには、いくつかの依存関係を必要としていました。 あなたはあなたにもいくつかを必要とするかもしれません、それはすべてあなたのシステムと、以下のCMakeのコマンドの結果に依存している。


[root@oraclelinux6 workspace]# yum -y install ncurses-devel readline-devel cmake gcc gcc-c++ bison-devel bison
[root@oraclelinux6 workspace]# wget http://googlemock.googlecode.com/files/gmock-1.6.0.zip
[root@oraclelinux6 workspace]# unzip gmock-1.6.0.zip
[root@oraclelinux6 workspace]# cd gmock-1.6.0
[root@oraclelinux6 gmock-1.6.0]# ./configure
[root@oraclelinux6 gmock-1.6.0]# make
[root@oraclelinux6 gmock-1.6.0]# make check
....
=====================================================
1 of 4 tests failed
Please report to googletestframework@googlegroups.com
=====================================================
make[2]: Leaving directory `/media/workspace/gmock-1.6.0/gtest'
make[1]: Leaving directory `/media/workspace/gmock-1.6.0/gtest'
[OK]をので、次の段階(part 2) 、私はGoogleのコードを動作させるため、一度、次のあるべき...

ところでdenable_downloadsはダウンロードしてインストールgmockをだけでなく、それはまた失敗する必要があります。

[root@oraclelinux6 workspace]# groupadd mysql
[root@oraclelinux6 workspace]# useradd -r -g mysql mysql
[root@oraclelinux6 workspace]# ln -s /media/workspace/webscalesql-5.6/ /usr/local/mysql
[root@oraclelinux6 workspace]# chown -R mysql:mysql webscalesql-5.6/
[root@oraclelinux6 workspace]# cd webscalesql-5.6/
[root@oraclelinux6 webscalesql-5.6]# cmake -DENABLE_DOWNLOADS=1 .
make
make install
./scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data

そうではない準備だけでまだ..しかし、私はそれを動作かつて私はあなたのすべてに戻ってきます。 私は意志の信仰を持っている。

WebScaleSQLインストールで解決...パート2

2013年5月7日火曜日

MySQLのソースからのビルド:: MariaDB :: Percona

Original Post: http://anothermysqldba.blogspot.com/2013/05/building-from-source-mysql-mariadb.html

同じサーバー上に複数のMySQLサーバを実行することが可能です。 時には人々は、テストの目的だけでなく、評価のために同じハードウェア上でデータベースの別のバージョンをインストールしたいかもしれません。

それぞれのソースとカスタムインストールからデータベースをインストールすると、それはいくつに聞こえるかもしれませんがより簡単です。 私が確認することをお勧めでしょうMySQLのサンドボックスを 、それが評価を可能にし、非常に迅速かつ簡単に行うことがためにテストするため、最初にかかわらず。 私はいくつかの比較をしたときただし、ソースからインストールすることは私のために良い働いた。 以下は私が使用したプロセスである。 私はその後、コンフィギュレーションを調整後に、これらのデータベースとの将来のブログの記事を構築することになるだろう。



これはからのデフォルト情報ですmysql.com 。 私はすでに、私は、次のコマンドを実行しませんでしたが、私は参考のためにここにこれが欲しかったので、MySQLがインストールされていた。 あなたも、私は同じボックス上で実行されているデータベースのすべての3つのバージョンを取得するために、デフォルトの手順を更新した方法を見て以下のMySQL、MariaDBとPerconaソースインストールにこれらの手順を比較することができます。 (ここではNO産生の値は単にプロセスをテストするために行われませんでした。)

# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql

# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions

# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data

# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &

# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server


If you prefer to use the 起動して確認し、それに応じて編集してください停止のためにmysql.serverのスクリプトを。
# Preconfiguration setup
shell> groupadd oracle_mysql
shell> useradd -r -g
 # Preconfiguration setup
shell> groupadd oracle_mysql
shell> useradd -r -g
 oracle_mysql oracle_mysql 
oracle_mysql 
# Beginning of source-build specific instructions
shell> tar zxvf MariaDB -VERSION .tar.gz
shell> cd MySQL-VERSION
shell> cmake .
shell> make
shell> make install DESTDIR=" /usr/local/
 # Beginning of source-build specific instructions
shell> tar zxvf MariaDB -VERSION .tar.gz
shell> cd MySQL-VERSION
shell> cmake .
shell> make
shell> make install DESTDIR=" /usr/local/
 oracle_mysql-TMP "
# End of source-build specific instructions

I do not like the results
-- Installing: /usr/local/ oracle_mysql-tmpには/ usr / local / mysqlの/
If DESTDIR is should install into that location not start with user under that location. This is a MySQL original issue as it does this with all versions of MySQL.

# Fix the odd/bug setup
shell> cd /usr/local/
 If DESTDIR is should install into that location not start with user under that location. This is a MySQL original issue as it does this with all versions of MySQL.

# Fix the odd/bug setup
shell> cd /usr/local/
 oracle_mysql-TMP
shell> mv usr/local/mysql/ ../ oracle_mysql ;
shell> cd ../; # rm -Rf oracle_mysql-TMP

# Postinstallation setup
shell> cd /usr/local/ oracle_mysql 
shell> chown -R
 
shell> chown -R
 oracle_mysql .
shell> chgrp -R oracle_mysql .

# Next command is optional
shell> cp support-files/my-small.cnf /etc/
 # Next command is optional
shell> cp support-files/my-small.cnf /etc/
 oracle_mysql .cnf
shell> vi /etc/ oracle_mysql .cnf

port = 3309

socket = /tmp/ oracle_mysql .sock

shell> scripts/mysql_install_db --defaults-file=/etc/oracle_mysql.cnf --basedir=/usr/local/oracle_mysql --skip-name-resolve --datadir=/var/lib/oracle_mysql --user=oracle_mysql
shell> chown -R oracle_mysql /var/lib/oracle_mysql /*

shell> # bin/mysqld_safe --defaults-file=/etc/ oracle_mysql .cnf --user= oracle_mysql --datadir=/var/lib/ oracle_mysql / --port=3309 &


shell> # bin/ mysql --port=3309 --socket=/tmp/ oracle_mysql .sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.31 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.








# Preconfiguration setup
shell> groupadd mariadb
shell> useradd -r -g mariadb mariadb

# Beginning of source-build specific instructions
shell> tar zxvf MariaDB -VERSION .tar.gz
shell> cd MariaDB-VERSION
shell> cmake .
shell> make
shell> make install DESTDIR=" /usr/local/ mariadb -tmp "
# End of source-build specific instructions

I do not like the results
-- Installing: /usr/local/ mariadb-tmp /usr/local/mysql/
If DESTDIR is should install into that location not start with user under that location. This is a MySQL original issue as it does this with all versions of MySQL.

# Fix the odd/bug setup
shell> cd /usr/local/ mariadb -tmp
shell> mv usr/local/mysql/ ../ mariadb ;
shell> cd ../; # rm -Rf mariadb -tmp

# Postinstallation setup
shell> cd /usr/local/mariadb
shell> chown -R mariadb .
shell> chgrp -R mariadb .


#次のコマンドはオプションです 
シェル> ​​CP support-files/my-small.cnfの/ etc / mariadb。CNF

シェル> ​​のviの/ etc / mariadb。CNF

ポート= 3308

ソケット=を/ tmp / mariadb。靴下

shell> scripts/mysql_install_db --defaults-file=/etc/mariadb.cnf --basedir=/usr/local/ mariadb --skip-name-resolve --datadir=/var/lib/mariadb --user= mariadb
shell> chown -R mariadb /var/lib/ mariadb /*

shell> # bin/mysqld_safe --defaults-file=/etc/ mariadb .cnf --user= mariadb --datadir=/var/lib/mariadb / --port=3308 &


shell> # bin/ mysql --port=3308 --socket=/tmp/ mariadb .sock
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1
Server version: 5.5.30-MariaDB Source distribution

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.






# Preconfiguration setup
shell> groupadd percona
shell> useradd -r -g percona percona

# Beginning of source-build specific instructions
shell> tar zxvf Percona-Server -VERSION .tar.gz
shell> cd Percona-Server-VERSION
shell> cmake .
shell> make
shell> make install DESTDIR=" /usr/local/percona-tmp "
# End of source-build specific instructions

I do not like the results

-- Installing: /usr/local/percona-tmp/usr/local/mysql/

If DESTDIR is should install into that location not start with user under that location. This is a MySQL original issue as it does this with all versions of MySQL.

# Fix the odd/bug setup
shell> cd /usr/local/percona-tmp

shell> mv usr/local/mysql/ ../percona ;

shell> cd ../; # rm -Rf percona-tmp



# Next command is optional
shell> cp support-files/my-small.cnf /etc/ percona .cnf

shell> vi /etc/ percona .cnf

port = 3307

socket = /tmp/percona.sock




#インストール後のセットアップ
シェル> ​​CDは/ usr / local / percona 
シェル> ​​ます。chown-R percona。
シェル> ​​chgrpコマンド-R percona。

シェル> ​​スクリプト/ mysql_install_dbを -デフォルトファイル=の/ etc / percona.cnf - BASEDIR =は/ usr / local / percona -スキップ-名前解決- DATADIR =の/ var / libに/ percona -ユーザ= percona
シェル> ​​ます。chown-R percona の/ var / libに/ percona / *
シェル>#binに/ mysqld_safeを-デフォルトファイル=の/ etc / percona.cnf -ユーザ= percona - DATADIR =の/ var / libに/ percona / -ポート= 3307  



シェル>#binに/ mysqlの-ポート= 3307 -ソケット=を/ tmp / percona.sock
MySQLのモニタへようこそ。 コマンドは、最後に、または\ G。
あなたのMySQL接続IDは1です
サーバのバージョン:5.5.30ソースディストリビューション

著作権(C)2000、2013、Oracleおよび/またはその関連会社。 無断複写·転載を禁じます。




今、私はすべての3味やMySQLにアクセスすることができます。
。容易なクライアントアクセスのために私は私のbashrcにファイルにこれを追加しました:

  • エイリアスpercona = 'は/ usr / local / percona / binに/ mysqlの - ポート= 3307 - ソケット=を/ tmp / percona.sock'
  • エイリアスoracle_mysql = 'は/ usr / local / oracle_mysql / binに/ mysqlの - ポート= 3309 - ソケット=を/ tmp / oracle_mysql.sock'
  • 別名マリア= 'は/ usr / local / mariadb / binに/ mysqlの - ポート= 3308 - ソケット=を/ tmp / mariadb.sock'



ユーザーが以前のコマンドライン上で 'のmysql'に設定されていました....​​.ので、[警告]

Original Post: http://anothermysqldba.blogspot.com/2013/05/warning-because-user-was-set-to-mysql.html



shell> scripts/mysql_install_db --basedir=/usr/local/demouser --datadir=/var/lib/demodb --user=demouser --ldata=/var/lib/demodb

Installing MySQL system tables...


[Warning] Ignoring user change to 'demouser' because the user was set to 'mysql' earlier on the command line


Installation of system tables failed !
 

これは、あなたが入力したコマンドに振り返って、自分自身に疑問を開始すると、エラーになります。 それが表示されたエラーではありません。 すでにインストールされているか、一度やったサーバーに、MySQLをインストールしている場合には、my.cnfファイルが所定の位置に現在ある可能性があります。 このファイルには、アクティブ·サーバーに対して非常に有効である可能性があり、それは、これらのケースでは放置されても大丈夫です。 このエラーの修正は、デフォルトをオーバーライドして、MySQLサーバがお好みのユーザ名を含む別のファイルからプルできるようにすることです。 あなたは、ファイル内のユーザー名を変更することができますが、それはあなたが上記のエラーを取得して、再度実行する方法の例ですので、以下、他のものをテストしてやって探している可能性があります。




shell> cp support-files/my-small.cnf /etc/demodb.cnf
shell> vi /etc/demodb.cnf
ポート= 3307
ソケット=を/ tmp / demodb.sock

ユーザ= demouser
PID_FILE =の/ var / libに/ DEMODB / demodb.pid

シェル> ​​スクリプト/ mysql_install_dbを-デフォルトファイル=の/ etc / demodb.cnf   - BASEDIR =は/ usr / local / demouser - datadirの=の/ var / libに/ DEMODB -ユーザ= demouser - LDATA =の/ var / libに/ DEMODB


MySQLのシステムテーブルをインストールしています...
OK
ヘルプテーブルを充填...
OK



再び、my.cnfファイルは、現在mysql_install_dbを存在する場合、そのファイルを使用しようとします。 多くの場合、そのファイルにユーザ名が" ユーザーがコマンドラインで、以前の'のmysql'に設定されていました "というエラーにつながった設定されています


shell> chown -R demouser /var/lib/demodb/*
shell> # bin/mysqld_safe --defaults-file=/etc/demouser.cnf --user= demouser --datadir=/var/lib/demodb/ --port=3307

# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/demodb.server

shell> # bin/ mysql --port=3307 --socket=/tmp/ demodb .sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.30 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.