用户可参考以下的步骤,在Linux环境下安装。
在CentOS中安裝Percona
1.将Percona的套件安装至主机的套件库中
#rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm |
---|
2.请搜寻Percona的套件,并安装下方框起来的二个套件
#yum search percona |
---|
3.安裝Percona
# yum install Percona-Server-client-55.x86_64 |
---|
# yum install Percona-Server-server-55.x86_64 |
---|
4.请至etc下建立一个档案,且命名为my.cnf,并加入下方列出的几个设定
#vi /etc/my.cnf |
---|
[mysqld] plugin-load=handlersocket.so loose_handlersocket_port = 9998 # the port number to bind to (for read requests) loose_handlersocket_port_wr = 9999 # the port number to bind to (for write requests) loose_handlersocket_threads = 16 # the number of worker threads (for read requests) loose_handlersocket_threads_wr = 1 # the number of worker threads (for write requests) open_files_limit = 65535 # to allow handlersocket accept many concurrent # connections, make open_files_limit as large as # possible. |
---|
5.启动服务
#service mysql start |
---|
6.设定root密码
# mysqladmin -u root password 1qaz |
---|
7.登入mysql
#mysql -uroot -p |
---|
在Ubuntu、Debian安裝Percona
1.下载Percona套件至套件套中并安装
#gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A #gpg -a --export CD2EFD2A | sudo apt-key add - |
---|
2.依照不同OS及OS版本,加入不同的设定至/etc/apt/sources.list中。
#vi /etc/apt/sources.list |
---|
2-1 Ubuntu
a. Ubuntu10
deb http://repo.percona.com/apt lucid main deb-src http://repo.percona.com/apt lucid main |
---|
b. Ubuntu12
deb http://repo.percona.com/apt precise main deb-src http://repo.percona.com/apt precise main |
---|
2-2 Debian
deb http://repo.percona.com/apt squeeze main deb-src http://repo.percona.com/apt squeeze main |
---|
3.更新套件库
#apt-get update |
---|
4.安裝Percona
#apt-get install percona-server-server-5.5 percona-server-client-5.5 |
---|
5.设定root密码
# mysqladmin -u root password 1qaz |
---|
6.登入mysql
#mysql -uroot -p |
---|