- 论坛徽章:
- 0
|
最简单的安装步骤:
oshell> groupadd mysqlshell> useradd -g mysql mysqlshell> gunzip shell> cd mysql-VERSIONshell> ./configure --prefix=/usr/local/mysqlshell> makeshell> make installshell> cp support-files/my-medium.cnf /etc/my.cnfshell> cd /usr/local/mysqlshell> bin/mysql_install_db --user=mysqlshell> chown -R root .shell> chown -R mysql varshell> chgrp -R mysql .shell> bin/mysqld_safe --user=mysql &
如果不用安装包带的my.cnf, 则可以从一个已经安装好的mysql机器上cp一份my.cnf到/etc, 作必需的修改.
比如数据目录如果是/usr/local/mysql/data,由需要修改datadir,另外还有bind-address及与innodb相关的项等等
o
如果编译器较新,下面据称是较优的编译选项, 具体参见manual
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro \ -fno-exceptions -fno-rtti" ./configure \ --prefix=/usr/local/mysql --enable-assembler \ --with-mysqld-ldflags=-all-static
http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/installing.html#installing-source
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/67276/showart_695960.html |
|