yum install ncurses-devel # 装mysql需要这个库文件...
tar zxvf mysql-5.0.51a.tar.gz
tar zxvf sphinx-0.9.8.1.tar.gz
cd mysql-5.0.51a
cp /root/sphinx-0.9.8.1/mysqlse/sphinx.5.0.37.diff /root/mysql-5.0.51a/
patch -p1 < sphinx.5.0.37.diff
sh BUILD/autorun.sh
cp -R /root/sphinx-0.9.8.1/mysqlse /root/mysql-5.0.51a/sql/sphinx
./configure --prefix=/usr/local/mysql --localstatedir=/var/mysql --with-sphinx-storage-engine --with-comment=Source --with-server-suffix=-Community-Server --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-innodb --without-ndb-debug --without-isam
make
make install
groupadd mysql
useradd -g mysql -s /sbin/nologin mysql
chown -R root /usr/local/mysql
chgrp -R mysql /usr/local/mysql
./scripts/mysql_install_db --user=mysql --datadir=/var/mysql
chgrp -R mysql /usr/local/mysql
chown -R mysql /var/mysql
chgrp -R mysql /var/mysql/
cp /root/my.txt /etc/my.cnf
/usr/local/mysql/share/mysql/mysql.server start
cd /usr/local/mysql/bin
./mysql -uroot -p
show engines;
exit
exit