Chinaunix首页 | 论坛 | 博客
  • 博客访问: 322959
  • 博文数量: 103
  • 博客积分: 1590
  • 博客等级: 上尉
  • 技术积分: 1075
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-02 10:17
文章分类

全部博文(103)

文章存档

2013年(32)

2012年(7)

2010年(64)

我的朋友

分类: Mysql/postgreSQL

2010-11-14 23:47:29

作/译者:陶会祥 来源:http://blog.chinaunix.net/u3/107145/ 欢迎转载,请注明作者及出处~


安装MySQL源码步骤
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
如果从一个源码RPM开始,那么执行如下命令:
shell> rpmbuild --rebuild --clean MySQL-VERSION.src.rpm

安装mysql5.1及引擎

scp -r innodb_plugin-1.0.6* mysql-5.1.51.tar.gz my.cnf 10.xx.xx.xx:/root/mysql_soft
tar -zxvf mysql-5.1.51.tar.gz
cd mysql-5.1.51
--with-charset
./configure --prefix=/usr/local/mysql --with-extra-charsets=all --with-plugins=csv,innobase,innodb_plugin,myisam,heap

make; make install

mysql_install_db #初始化数据(权限表等)

#cp support-files/my-medium.cnf /etc/my.cnf
#cp -r /usr/local/mysql/var/mysql /data/var/
#chown -R mysql.mysql /data/mysql
# PATH=$PATH:/usr/local/mysql/bin
mysqld_safe --user=mysql &  

# mysqladmin shutdown

下面是安装innodb-plugin的选项:
#./configure --prefix=/usr/local/mysql --with-plugins=partition,daemon_example,ftexample,archive,blackhole,csv,example,federated,heap,ibmdb2i,innobase,innodb_plugin,myisam,myisammrg,ndbcluster

make; make install

mysql_install_db #初始化数据(权限表等)

#
mysqld_safe --user=mysql &  

vim /etc/my.cnf
# The MySQL server
[mysqld]

ignore_builtin_innodb    #
plugin-load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plugin.so;innodb_lock_waits=ha_innodb_plugin.so;innodb_cmp=ha_innodb_plugin.so;innodb_cmp_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha_innodb_plugin.so

innodb_file_format=Barracuda (要不然alter table user_xxx row_format=compressed key_block_size=4;会无效~)

innodb-plugin 安装测试:


引擎说明:
cd mysql-5.1.51

./configure --help
   === Partition Support ===
Plugin Name:      partition
Description:      MySQL Partitioning Support
Supports build:   static
Configurations:   max, max-no-ndb

   === Daemon Example Plugin ===
Plugin Name:      daemon_example
Description:      This is an example plugin daemon.
Supports build:   dynamic

   === Simple Parser ===
Plugin Name:      ftexample
Description:      Simple full-text parser plugin
Supports build:   dynamic

   === Archive Storage Engine ===
Plugin Name:      archive
Description:      Archive Storage Engine
Supports build:   static and dynamic
Configurations:   max, max-no-ndb

   === Blackhole Storage Engine ===
Plugin Name:      blackhole
Description:      Basic Write-only Read-never tables
Supports build:   static and dynamic
Configurations:   max, max-no-ndb

   === CSV Storage Engine ===
Plugin Name:      csv
Description:      Stores tables in text CSV format
Supports build:   static
Status:           mandatory

   === Example Storage Engine ===
Plugin Name:      example
Description:      Example for Storage Engines for developers
Supports build:   dynamic
Configurations:   max, max-no-ndb

   === Federated Storage Engine ===
Plugin Name:      federated
Description:      Connects to tables on remote MySQL servers
Supports build:   static and dynamic
Configurations:   max, max-no-ndb

   === Memory Storage Engine ===
Plugin Name:      heap
Description:      Volatile memory based tables
Supports build:   static
Status:           mandatory

   === IBM DB2 for i Storage Engine ===
Plugin Name:      ibmdb2i
Description:      IBM DB2 for i Storage Engine
Supports build:   dynamic
Configurations:   max, max-no-ndb

   === InnoDB Storage Engine ===
Plugin Name:      innobase
Description:      Transactional Tables using InnoDB
Supports build:   static and dynamic
Configurations:   max, max-no-ndb

   === InnoDB Storage Engine ===
Plugin Name:      innodb_plugin
Description:      Transactional Tables using InnoDB
Supports build:   dynamic
Configurations:   max, max-no-ndb

   === MyISAM Storage Engine ===
Plugin Name:      myisam
Description:      Traditional non-transactional MySQL tables
Supports build:   static
Status:           mandatory

   === MyISAM MERGE Engine ===
Plugin Name:      myisammrg
Description:      Merge multiple MySQL tables into one
Supports build:   static
Status:           mandatory

   === Cluster Storage Engine ===
Plugin Name:      ndbcluster
Description:      High Availability Clustered tables
Supports build:   static
Configurations:   max
  
安装最新测试源码:(未测试完)


wget
要想获得我们的最新开发源码树,应使用说明:

1.    从下载BitKeeper免费客户端。

2.    在Unix上安装免费客户端:

3.            shell> sh bk-client.shar
4.            shell> cd bk_client-1.1
5.            shell> make all
6.            shell> PATH=$PWD:$PATH

参考:http://dev.mysql.com/doc/refman/5.1/zh/installing.html#installing-source

参考: (innodb-plugin安装)

阅读(1232) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-11-15 15:29:32

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com