博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Percona-Server-5.5.15源码安装
阅读量:5101 次
发布时间:2019-06-13

本文共 5246 字,大约阅读时间需要 17 分钟。

[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

转载于:https://www.cnblogs.com/songdeyouxiang/p/5595328.html

你可能感兴趣的文章
小别离
查看>>
微信小程序-发起 HTTPS 请求
查看>>
WPF动画设置1(转)
查看>>
backgound-attachment属性学习
查看>>
个人作业——关于K米的产品案例分析
查看>>
基于node/mongo的App Docker化测试环境搭建
查看>>
java web 中base64传输的坑
查看>>
java 中的线程(一)
查看>>
秒杀9种排序算法(JavaScript版)
查看>>
素数判断BFS之“Prime Path”
查看>>
Activiti入门 -- 环境搭建和核心API简介
查看>>
struts.convention.classes.reload配置为true,tomcat启动报错
查看>>
MySQL的并行复制多线程复制MTS(Multi-Threaded Slaves)
查看>>
Django中间件
查看>>
xcode 5.1安装vvdocument
查看>>
好玩的-记最近玩的几个经典ipad ios游戏
查看>>
MySQL更改默认的数据文档存储目录
查看>>
替代微软IIS强大的HTTP网站服务器工具
查看>>
6.5 案例21:将本地数据库中数据提交到服务器端
查看>>
PyQt5--EventSender
查看>>