十二12 发表于 2018-10-21 12:14:24

Percona-Server-5.5.15源码安装

  # ll
  total 19148
  -rw-r--r-- 1 root root   562628 Jan 182007 bison-2.3-2.1.x86_64.rpm
  -rw-r--r-- 1 root root   7375 Jan 182007 bison-devel-2.3-2.1.x86_64.rpm
  -rw-r--r-- 1 root root3935585 Mar42010 gcc-c++-4.1.2-48.el5.x86_64.rpm
  -rw-r--r-- 1 root root    11716 Mar42010 libaio-devel-0.3.106-5.x86_64.rpm
  -rw-r--r-- 1 root root   481930 Apr22008 make-3.81-3.el5.x86_64.rpm
  -rw-r--r-- 1 root root1790863 Jan 182007 ncurses-devel-5.5-24.20060715.x86_64.rpm
  -rw-r--r-- 1 root root 12771327 Jul 132009 perl-5.8.8-27.el5.x86_64.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>  Preparing...                ###########################################
  package bison-2.3-2.1.x86_64 is already installed
  # 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>  Preparing...                ###########################################
  1:bison-devel            ###########################################
  # 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>  Preparing...                ###########################################
  package gcc-c++-4.1.2-48.el5.x86_64 is already installed
  # 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>  Preparing...                ###########################################
  1:libaio-devel         ###########################################
  # 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>  Preparing...                ###########################################
  package make-3.81-3.el5.x86_64 is already installed
  # 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>  Preparing...                ###########################################
  package ncurses-devel-5.5-24.20060715.x86_64 is already installed
  # 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>  Preparing...                ###########################################
  package perl-5.8.8-27.el5.x86_64 is already installed
  #
  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
  # 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
  # pwd
  /usr/local/cmake/bin
  # ll
  total 40060
  -rwxr-xr-x 1 root root9732202 Jun 30 12:36 ccmake
  -rwxr-xr-x 1 root root9608089 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 加入环境变量
  # source .bash_profile
  # groupadd mysql
  # useradd -g mysql -s /sbin/nologin -M mysql
  # tar zxf Percona-Server-5.5.15-rel21.0.tar.gz -C /usr/local/src/
  # pwd
  /usr/local/src/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
  # make && make install
  # pwd
  /usr/local/mysql
  # ll
  total 76
  drwxr-xr-x2 root root4096 Jun 30 12:57 bin
  -rw-r--r--1 root root 17987 Jul 132011 COPYING
  drwxr-xr-x4 root root4096 Jun 30 12:57 data
  drwxr-xr-x2 root root4096 Jun 30 12:57 docs
  drwxr-xr-x3 root root4096 Jun 30 12:57 include
  -rw-r--r--1 root root7604 Jul 132011 INSTALL-BINARY
  drwxr-xr-x3 root root4096 Jun 30 12:57 lib
  drwxr-xr-x4 root root4096 Jun 30 12:57 man
  drwxr-xr-x 10 root root4096 Jun 30 12:57 mysql-test
  -rw-r--r--1 root root2552 Jul 132011 README
  drwxr-xr-x2 root root4096 Jun 30 12:57 scripts
  drwxr-xr-x 27 root root4096 Jun 30 12:57 share
  drwxr-xr-x4 root root4096 Jun 30 12:57 sql-bench
  drwxr-xr-x2 root root4096 Jun 30 12:57 support-files
  #
  # 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

页: [1]
查看完整版本: Percona-Server-5.5.15源码安装