CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/opt/app/mysql-5.0.75 --enable-assembler --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --enable-thread-safe-client --disable-shared --enable-local-infile --with-charset=utf8 --with-collation=utf8_general_ci --without-debug --without-bench --with-big-tables --enable-profiling --without-embedded-server --enable-community-features
debian5.0的参数:
'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CC=gcc'
'CXX=gcc' 'CFLAGS=-DDBUG_OFF -DBIG_JOINS=1 -O2 -fPIC'
'CXXFLAGS=-DDBUG_OFF -DBIG_JOINS=1 -felide-constructors -fno-rtti -O2 -fno-implicit-templates
-fno-exceptions -fno-rtti' ./configure '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu'
'--with-server-suffix=-b21.lenny.27'
'--with-comment=(Debian)' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static'
'--enable-thread-safe-client' '--enable-local-infile' '--with-big-tables'
'--with-mysqld-user=mysql' '--with-libwrap'
'--without-docs' '--with-bench' '--without-readline'
'--with-extra-charsets=utf8' '--with-collation=utf8_general_ci' '--without-debug' '--with-innodb'
'--with-archive-storage-engine' '--with-csv-storage-engine'
'--with-blackhole-storage-engine' '--with-sphinx-storage-engine'
'--without-embedded-server' '--enable-profiling' '--enable-community-features'
'--enable-assembler' '--with-mysqld-ldflags=-all-static' '--prefix=/opt/app/mysql-5.0.90'
5.1:
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/opt/app/mysql-5.1.45 --enable-assembler --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --enable-thread-safe-client --disable-shared --enable-local-infile --with-charset=utf8 --with-collation=utf8_general_ci --without-debug --enable-profiling --without-embedded-server --with-plugins=myisam,innodb_plugin
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> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> bin/mysqld_safe --user=mysql &