显示标签为“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正確。
最大的問題是,我使用的是Linux操作系統(甲骨文的Linux VM),它實在是太舊了Oracle庫做一點幫助把它升級。 當我想開始的東西,每個人都可以很容易地使用,只是沒有它。

我下載的Fedora 20 你可以看到,他們已經在使用的GCC 4.8.2。
因此,問題是很簡單的,如果你要使用新技術,更新您的操作系統也是如此。

如果你真的想升級你的GCC和留在你當前的操作系統上這些超鏈接可能是有用的:
下面是我走上得到它安裝的步驟。 一旦依賴到位它是一個基本的源代碼安裝。

#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


現在好了,我們得到了它啟動和運行...我們可以探索它...

2014年3月28日星期五

WebScaleSQL安裝嘗試...第1部分

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

好吧,如果你還沒有看到這個消息還沒有,然後通過各種手段請點擊此鏈接,並閱讀有關WebScaleSQL 非常感謝工程師來自Facebook,Twitter和谷歌為他們在這個努力工作的團隊。 我很好奇,想看看這是如何發展多日後,一旦我得到它的工作。

以下是我遇到過這麼遠。 我想這是一個成功的博客文章,而是將第一部分,直到我得到它運行。

我想我會放了一點點如何安裝WebScaleSQL對你們這些新來的Github上的任何現象。 它需要來自社區的反饋畢竟,因此社會需要能夠安裝和嘗試。

在這個例子中我選擇了預建的Oracle Linux虛擬盒圖像。 我有一個了,但是它可以在這裡找到: 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.



行,所以無論你決定讓代碼...讓我們現在嘗試把它安裝。 需要明確的是,這是應該沒有什麼新的,這是一個基本的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'
行,所以下一階段(part 2)應該是下面的,一旦我得到了谷歌代碼工作...

順便說一句的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月6日星期一

從來源的MySQL :: MariaDB的:: Percona的建築

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

這是可能的,在同一服務器上運行一個以上的MySQL服務器。 有時人們可能會想安裝其他版本的數據庫在同一硬件上測試的目的,以及評估。

安裝源和自定義安裝為每個數據庫比聽起來更容易一些。 我會建議檢討MySQL的沙盒,雖然第一次,因為它允許做得非常快速,方便地評估和測試。 然而,從源代碼安裝工作更好地為我的時候,我做了一些比較。 下面是我使用的過程。 我會希望打造出了未來的博客文章,有一次我與這些數據庫調整,然後配置。



這是默認信息mysql.com 。 我已經安裝了MySQL,所以我沒有執行下面的,但我想在這裡僅供參考。 您可以比較這些步驟到MySQL,MariaDB的和Percona的源代碼安裝的,下面也看到我是如何更新的默認步驟,以獲得所有三個版本的同一台機器上運行的數據庫。 (這裡沒有生產價值做只是為了測試的過程。)

# 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 shell> cd ../; # rm -Rf -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/ .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 / CNF MariaDB的。

CNF殼> VI的/ etc / MariaDB的。

端口= 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 /本地/ Percona的 
殼>喬敦-R Percona的。
外殼> chgrp命令ŗ的Percona的。

外殼腳本/ mysql_install_db的 -默認文件為/ etc / percona.cnf - BASEDIR = / USR /本地/ Percona的-跳過名稱決心的- DATADIR =的/ var / lib中/ Percona的-用戶= Percona的
外殼>喬敦-R Percona的的/ var / lib / Percona的中/ *
外殼>#斌/ mysqld_safe的-默認文件為/ etc / percona.cnf -用戶= Percona的- DATADIR =的/ var / lib / Percona的中/ -端口= 3307  



外殼>#斌/ MySQL的-端口= 3307 -插座= / TMP / percona.sock中
歡迎到MySQL監視器。 命令結束或\ G。
你的MySQL連接ID為1
服務器版本:30年5月5日來源分佈

版權所有(c)2000年,2013年,甲骨文公司及/或其附屬公司。 保留所有權利。




現在我有機會向所有3種口味或MySQL。
為了方便客戶端訪問,我加入這個我bashrc文件:

  • 別名Percona的='/ USR /本地/ Percona的/ bin中/ MySQL的 - 端口= 3307 - 插座= / tmp / percona.sock中'
  • 別名oracle_mysql ='/ USR /當地/ oracle_mysql / BIN / MySQL的 - 端口= 3309 - 插座= / TMP / oracle_mysql.sock中'
  • 別名瑪麗亞='/ USR /本地/ 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 /本地/ demouser - DATADIR =的/ var / LIB / demodb的的-用戶= demouser“ - LDATA =的/ var / lib中/ demodb的

安裝MySQL系統表...

正在灌裝幫助表...



同樣,如果目前的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.