到http://dev.mysql.com/downloads/mysql/5.1.html下載
Source downloads -- Compressed GNU TAR archive (tar.gz)
shell> yum -y install gcc-c++
shell> yum -y install ncurses-devel
shell> tar -zxvf mysql-5.1.41.tar.gz
shell> cd mysql-5.1.41
shell> CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
-fno-exceptions -fno-rtti" ./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all
shell> make
shell> make install
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 &
shell> cp support-files/mysql.server /etc/init.d
shell> /etc/init.d
shell> chmod +x mysql.server
shell> /etc/init.d/mysql.server start|stop|restart
沒有留言:
張貼留言