mysql5 编译安装

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 &

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值