[[email protected] 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
[[email protected] 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
[[email protected] 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%]
[[email protected] 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
[[email protected] 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%]
[[email protected] 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
[[email protected] 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
[[email protected] 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
[[email protected] 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
[[email protected] 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
[[email protected] bin]# pwd
/usr/local/cmake/bin
[[email protected] 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
[email protected] ~]# vi .bash_profile
把/usr/local/cmake/bin 加入环境变量
[[email protected] ~]# source .bash_profile
[[email protected] ~]# groupadd mysql
[[email protected] ~]# useradd -g mysql -s /sbin/nologin -M mysql
[[email protected] Percona-Server-5.5.15-rel21.0]# tar zxf Percona-Server-5.5.15-rel21.0.tar.gz -C /usr/local/src/
[[email protected] Percona-Server-5.5.15-rel21.0]# pwd
/usr/local/src/Percona-Server-5.5.15-rel21.0
[[email protected] 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
[[email protected] Percona-Server-5.5.15-rel21.0]# make && make install
[[email protected] mysql]# pwd
/usr/local/mysql
[[email protected] 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
[[email protected] 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