Chinaunix首页 | 论坛 | 博客
  • 博客访问: 586017
  • 博文数量: 151
  • 博客积分: 3330
  • 博客等级: 中校
  • 技术积分: 1686
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-08 02:41
文章存档

2011年(151)

分类: LINUX

2011-05-22 02:06:35

mysql 5.5 出来后,安装方式也与之前的mysql5.0、5.1有所不同了。

安装工具采用cmake 了,要想安装mysql5.5,需要先安装cmake。


以下为官方的简单安装步骤:

  1. # Preconfiguration setup
  2. shell> groupadd mysql
  3. shell> useradd -r -g mysql mysql
  4. # Beginning of source-build specific instructions
  5. shell> tar zxvf mysql-VERSION.tar.gz
  6. shell> cd mysql-VERSION
  7. shell> cmake .
  8. shell> make
  9. shell> make install
  10. # End of source-build specific instructions
  11. # Postinstallation setup
  12. shell> cd /usr/local/mysql
  13. shell> chown -R mysql .
  14. shell> chgrp -R mysql .
  15. shell> scripts/mysql_install_db --user=mysql
  16. shell> chown -R root .
  17. shell> chown -R mysql data
  18. # Next command is optional
  19. shell> cp support-files/my-medium.cnf /etc/my.cnf
  20. shell> bin/mysqld_safe --user=mysql &
  21. # Next command is optional
  22. shell> cp support-files/mysql.server /etc/init.d/mysql.server

To list the configuration options, use one of the following commands:

  1. shell> cmake . -L     # overview
  2. shell> cmake . -LH    # overview with help text
  3. shell> cmake . -LAH   # all params with help text
  4. shell> cmake .        # interactive display

To prevent old object files or configuration information from being used, run these commands on Unix before re-running CMake:

  1. shell> make clean
  2. shell> rm CMakeCache.txt

  3. Or, on Windows:

  4. shell> devenv MySQL.sln /clean
  5. shell> del CMakeCache.txt

什么含义就不用解释了,应该都能看懂!!!


标准目录:





RHEL5.6+MYSQL5.5.12

cd mysql
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql55/ \
-DMYSQL_DATADIR=/usr/local/mysql55/data \
-DMYSQL_UNIX_ADDR=/usr/local/mysql55/tmp/mysqld.socket \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_TCP_PORT=3306 \
-DEXTRA_CHARSETS=all \
-DMYSQL_USER=mysql \
-DENABLED_PROFILING=on \
-DCURSES_LIBRARY=/usr/lib/libncurses.a \
-DWITH_ZLIB=system \
-DWITH_SSL=system \
-DWITH_LIBWRAP=on \
-DWITH_READLINE=ON \
-DINSTALL_PLUGINDIR=/usr/local/mysql55/plugins \
-DHAVE_LIBAIO_H=/usr/libaio/include/
-DWITH_DEBUG=0
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \

make && make install



* The MyISAM, MERGE, MEMORY, and CSV engines are mandatory (always compiled into the server) and need not be installed explicitly.
(以上四个存储引擎默认已经永久编译进mysql,不用显示指定了)

* To compile a storage engine statically into the server, use -DWITH_engine_STORAGE_ENGINE=1.
 (将一个存储引擎静态编译到mysql)

* To exclude a storage engine from the build, use -DWITHOUT_engine_STORAGE_ENGINE=1
.
 (除去不需要编译进mysql里面的某个存储引擎)


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

yifangyou2011-05-27 12:41:26

已经安过mysql5.5了,默认是innodb,挺好的,最快的还是rpm安装