如何使用二進(jìn)制tar包方式安裝Perconaserver

這篇文章給大家分享的是有關(guān)如何使用二進(jìn)制tar包方式安裝Percona server的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),潮安企業(yè)網(wǎng)站建設(shè),潮安品牌網(wǎng)站建設(shè),網(wǎng)站定制,潮安網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,潮安網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

InstallingPercona Server from a Binary Tarball

1下載二進(jìn)制tar包

以5.6版本為例,去官網(wǎng)https://www.percona.com/downloads/Percona-Server-5.6/LATEST/也可以看到如下:

#在Version下拉框中選擇具體的percona server的版本

如何使用二進(jìn)制tar包方式安裝Percona server

#在Software下拉框中選擇對(duì)應(yīng)的OS版本或者二進(jìn)制tar包或者源碼下載

如何使用二進(jìn)制tar包方式安裝Percona server

#此處下載5.6最后一個(gè)版本,如下:

如何使用二進(jìn)制tar包方式安裝Percona server

由上圖發(fā)現(xiàn),當(dāng)選擇了版本和下載方式(二進(jìn)制tar包)后,下方顯示了不止一個(gè)對(duì)應(yīng)的tar包,而他們不同的地方是:ssl098、ssl100、ssl101.他們的區(qū)別如下:

  • ssl100 - for all Debian/Ubuntu versions except Debian Squeeze (libssl.so.1.0.0 =>/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f2e389a5000));

  • ssl098 - only for Debian Squeeze (libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8(0x00007f9b30db6000));

  • ssl101 - for CentOS 6 and CentOS 7 (libssl.so.10 => /usr/lib64/libssl.so.10(0x00007facbe8c4000));

  • ssl098e - to be used only for CentOS 5 (libssl.so.6 => /lib64/libssl.so.6(0x00002aed5b64d000)).

此處選擇安裝到RHEL6,下載ssl101對(duì)應(yīng)的tar包

2解壓tar包

#創(chuàng)建basedir

]# mkdir /data/percona

#解壓

]# tar -zxvf Percona-Server-5.6.29-rel76.2-Linux.x86_64.ssl101.tar.gz -C /data/percona/

]# cd /data/percona/

]# mv Percona-Server-5.6.29-rel76.2-Linux.x86_64.ssl101/ MySQL

#最終安裝到/data/percona/mysql/目錄

]# ls /data/percona/mysql/

]# chown mysql:mysql /data/percona/mysql/ -R

3編輯配置文件

#默認(rèn)讀取/etc/my.cnf,此處實(shí)驗(yàn)環(huán)境已經(jīng)存在其他mysql實(shí)例,初始化和啟動(dòng)的時(shí)候都使用 --defaults-file=/tmp/my.cnf參數(shù)來(lái)指定配置文件

]# cat /tmp/my.cnf

[mysqld]

basedir=/data/percona/mysql

datadir=/data/percona/mysql/data

socket=/data/percona/mysql/mysql.sock

log-error=/data/percona/mysql/mysqld.log

innodb_buffer_pool_size = 128M

port=6603

4初始化db

#由于本地存在別的mysql實(shí)例,此處認(rèn)為指定cnf路徑

]# ./scripts/mysql_install_db  --defaults-file=/tmp/my.cnf

5啟動(dòng)percona mysql

]# /data/percona/mysql/bin/mysqld_safe --defaults-file=/tmp/my.cnf  &

160504 10:37:02 mysqld_safe Adding '/data/percona/mysql/lib/mysql/libjemalloc.so.1' to LD_PRELOAD for mysqld

160504 10:37:02 mysqld_safe Logging to '/data/percona/mysql/mysqld.log'.

160504 10:37:02 mysqld_safe Starting mysqld daemon with databases from /data/percona/mysql/data

6查看進(jìn)程

]# netstat -antpl|grep mysqld

tcp        0      0 :::6603                     :::*                     LISTEN      17835/mysqld  #percona mysql    

tcp        0      0 :::3306                     :::*                     LISTEN      23233/mysqld  #默認(rèn)運(yùn)行的mysql

7查看log

]# tail -f  /data/percona/mysql/mysqld.log   

2016-05-04 10:37:03 17835 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.29-rel76.2 started; log sequence number 1625997

2016-05-04 10:37:03 17835 [Note] RSA private key file not found: /data/percona/mysql/data//private_key.pem. Some authentication plugins will not work.

2016-05-04 10:37:03 17835 [Note] RSA public key file not found: /data/percona/mysql/data//public_key.pem. Some authentication plugins will not work.

2016-05-04 10:37:03 17835 [Note] Server hostname (bind-address): '*'; port: 6603

2016-05-04 10:37:03 17835 [Note] IPv6 is available.

2016-05-04 10:37:03 17835 [Note]   - '::' resolves to '::';

2016-05-04 10:37:03 17835 [Note] Server socket created on IP: '::'.

2016-05-04 10:37:03 17835 [Note] Event Scheduler: Loaded 0 events

2016-05-04 10:37:03 17835 [Note] /data/percona/mysql/bin/mysqld: ready for connections.

Version: '5.6.29-76.2'  socket: '/data/percona/mysql/mysql.sock'  port: 6603  Percona Server (GPL), Release 76.2, Revision ddf26fe

至此,percona的二進(jìn)制tar包的安裝簡(jiǎn)單完成,發(fā)現(xiàn)跟mysql的安裝幾乎一樣,關(guān)于配置文件的更多選項(xiàng)配置、啟動(dòng)腳本配置以及一些后續(xù)的配置等都類似mysql的即可。

8卸載percona server

1.     Stop thePercona Server service

#此處由于有其他默認(rèn)的mysql實(shí)例在運(yùn)行的原因,需要指定當(dāng)前sock位置和端口

~]#/data/percona/mysql/bin/mysqladmin -S /data/percona/mysql/mysql.sock  -P 6603 shutdown

2.     Remove the data and configuration files

#直接刪除basedir和datadir即可

~]# rm -rf /data/percona/mysql/

感謝各位的閱讀!關(guān)于“如何使用二進(jìn)制tar包方式安裝Percona server”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

分享標(biāo)題:如何使用二進(jìn)制tar包方式安裝Perconaserver
網(wǎng)頁(yè)路徑:http://muchs.cn/article10/iehedo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)Google、網(wǎng)頁(yè)設(shè)計(jì)公司、定制開(kāi)發(fā)、服務(wù)器托管、品牌網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站