码迷,mamicode.com
首页 > 其他好文 > 详细

Percona-Server-5.5.15源码安装

时间:2016-06-17 23:56:57      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:

[root@localhost rpm]# ll

total 19148

-rw-r--r-- 1 root root   562628 Jan 18  2007 bison-2.3-2.1.x86_64.rpm

-rw-r--r-- 1 root root     7375 Jan 18  2007 bison-devel-2.3-2.1.x86_64.rpm

-rw-r--r-- 1 root root  3935585 Mar  4  2010 gcc-c++-4.1.2-48.el5.x86_64.rpm

-rw-r--r-- 1 root root    11716 Mar  4  2010 libaio-devel-0.3.106-5.x86_64.rpm

-rw-r--r-- 1 root root   481930 Apr  2  2008 make-3.81-3.el5.x86_64.rpm

-rw-r--r-- 1 root root  1790863 Jan 18  2007 ncurses-devel-5.5-24.20060715.x86_64.rpm

-rw-r--r-- 1 root root 12771327 Jul 13  2009 perl-5.8.8-27.el5.x86_64.rpm

[root@localhost rpm]# rpm -ivh bison-2.3-2.1.x86_64.rpm

warning: bison-2.3-2.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

       package bison-2.3-2.1.x86_64 is already installed

[root@localhost rpm]# rpm -ivh bison-devel-2.3-2.1.x86_64.rpm

warning: bison-devel-2.3-2.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

   1:bison-devel            ########################################### [100%]

 

 

[root@localhost rpm]# rpm -ivh gcc-c++-4.1.2-48.el5.x86_64.rpm

warning: gcc-c++-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

       package gcc-c++-4.1.2-48.el5.x86_64 is already installed

[root@localhost rpm]# rpm -ivh libaio-devel-0.3.106-5.x86_64.rpm

warning: libaio-devel-0.3.106-5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

   1:libaio-devel           ########################################### [100%]

[root@localhost rpm]# rpm -ivh make-3.81-3.el5.x86_64.rpm

warning: make-3.81-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

       package make-3.81-3.el5.x86_64 is already installed

[root@localhost rpm]# rpm -ivh ncurses-devel-5.5-24.20060715.x86_64.rpm

warning: ncurses-devel-5.5-24.20060715.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

       package ncurses-devel-5.5-24.20060715.x86_64 is already installed

[root@localhost rpm]# rpm -ivh perl-5.8.8-27.el5.x86_64.rpm

warning: perl-5.8.8-27.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing...                ########################################### [100%]

       package perl-5.8.8-27.el5.x86_64 is already installed

[root@localhost rpm]#

 

 

 

 

Mysql5.5后通过cmake来编译,cmake-2.8.12.2.tar.gz 所以需要下载安装

下载地址:http://www.cmake.org/cmake/resources/software.html

 

tar zxvf cmake-2.8.7.tar.gz

cd cmake-2.8.12.2

./configure --prefix=/usr/local/cmake

make && make install

 

[root@localhost rpm]# ll /usr/local/cmake/

total 16

drwxr-xr-x 2 root root 4096 Jun 30 12:37 bin

drwxr-xr-x 3 root root 4096 Jun 30 12:37 doc

drwxr-xr-x 3 root root 4096 Jun 30 12:37 man

drwxr-xr-x 4 root root 4096 Jun 30 12:37 share

 

[root@localhost bin]# pwd

/usr/local/cmake/bin

[root@localhost bin]# ll

total 40060

-rwxr-xr-x 1 root root  9732202 Jun 30 12:36 ccmake

-rwxr-xr-x 1 root root  9608089 Jun 30 12:36 cmake

-rwxr-xr-x 1 root root 10139179 Jun 30 12:36 cpack

-rwxr-xr-x 1 root root 11467963 Jun 30 12:36 ctest

 

 

root@localhost ~]# vi .bash_profile 

把/usr/local/cmake/bin 加入环境变量

[root@localhost ~]# source .bash_profile

 

 

 

 

[root@localhost ~]# groupadd mysql

[root@localhost ~]# useradd -g mysql -s /sbin/nologin -M mysql



 

 

 

[root@localhost Percona-Server-5.5.15-rel21.0]# tar zxf Percona-Server-5.5.15-rel21.0.tar.gz -C /usr/local/src/

[root@localhost Percona-Server-5.5.15-rel21.0]# pwd

/usr/local/src/Percona-Server-5.5.15-rel21.0

 

[root@localhost Percona-Server-5.5.15-rel21.0]#cmake \

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \

-DSYSCONFDIR=/etc \

-DMYSQL_DATADIR=/var/lib/mysql \

-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \

-DMYSQL_USER=mysql \

-DMYSQL_TCP_PORT=3306 \

-DWITH_MYISAM_STORAGE_ENGINE=1 \

-DWITH_INNOBASE_STORAGE_ENGINE=1 \

-DWITH_MEMORY_STORAGE_ENGINE=1 \

-DWITH_PARTITION_STORAGE_ENGINE=1 \

-DEXTRA_CHARSETS=all \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DENABLED_LOCAL_INFILE=1 \

-DWITH_READLINE=1

 

 

[root@localhost Percona-Server-5.5.15-rel21.0]# make && make install

 

 

[root@localhost mysql]# pwd

/usr/local/mysql

[root@localhost mysql]# ll

total 76

drwxr-xr-x  2 root root  4096 Jun 30 12:57 bin

-rw-r--r--  1 root root 17987 Jul 13  2011 COPYING

drwxr-xr-x  4 root root  4096 Jun 30 12:57 data

drwxr-xr-x  2 root root  4096 Jun 30 12:57 docs

drwxr-xr-x  3 root root  4096 Jun 30 12:57 include

-rw-r--r--  1 root root  7604 Jul 13  2011 INSTALL-BINARY

drwxr-xr-x  3 root root  4096 Jun 30 12:57 lib

drwxr-xr-x  4 root root  4096 Jun 30 12:57 man

drwxr-xr-x 10 root root  4096 Jun 30 12:57 mysql-test

-rw-r--r--  1 root root  2552 Jul 13  2011 README

drwxr-xr-x  2 root root  4096 Jun 30 12:57 scripts

drwxr-xr-x 27 root root  4096 Jun 30 12:57 share

drwxr-xr-x  4 root root  4096 Jun 30 12:57 sql-bench

drwxr-xr-x  2 root root  4096 Jun 30 12:57 support-files

[root@localhost mysql]#

 

 

 

# cd /usr/local/mysql/

# ./scripts/mysql_install_db --user=mysql --datadir=/var/lib/mysql

# cp support-files/mysql.server /etc/init.d/mysqld

# chkconfig --add mysqld

# service mysql start

Percona-Server-5.5.15源码安装

标签:

原文地址:http://www.cnblogs.com/songdeyouxiang/p/5595328.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!