分类: Mysql/postgreSQL
2010-04-25 19:59:41
做一个备忘。
groupadd mysql
useradd -g mysql mysql
tar zxf mysql-5.1.44.tar.gz
cd mysql-5.1.44
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti"
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/var/lib/mysql \
--enable-assembler \
--enable-local-infile \
--enable-thread-safe-client \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--with-big-tables \
--with-mysqld-user=mysql \
--with-charset=utf8 \
--with-collation=utf8_general_ci \
--with-extra-charsets=all \
--with-plugins=innobase,partition,archive,myisammrg,csv \
--without-geometry \
&& make && make install-strip
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
/etc/init.d/mysqld start
bin/mysql_secure_installation
------------------------------------------