mysql安裝-cluster

rainbowbridg發表於2007-06-04

rpm -ef mysql-4.1.12-3.RHEL4.1 freeradius-mysql-1.0.1-3.RHEL4.i386 mysql-devel-4.1.12-3.RHEL4.1.i386 mysql-server-4.1.12-3.RHEL4.1.i386 mysql-bench-4.1.12-3.RHEL4.1.i386 mysql-server-4.1.12-3.RHEL4.1.i386 freeradius-mysql-1.0.1-3.RHEL4.i386 mysql-server-4.1.12-3.RHEL4.1.i386 perl-DBD-MySQL-2.9004-3.1.i386 dovecot-0.99.11-2.EL4.1.i386 cyrus-sasl-sql-2.1.19-5.EL4.i386 php-mysql-4.3.9-3.8.i386 mod_auth_mysql-2.6.1-2.2.i386 mysqlclient10-3.23.58-4.RHEL4.1 mysqlclient10-devel-3.23.58-4.RHEL4.1.i386 MySQL-python-1.0.0-1.RHEL4.1.i386 qt-MySQL-3.3.3-9.3.i386 MyODBC-2.50.39-21.RHEL4.1.i386 MySQL-python-1.0.0-1.RHEL4.1.i386 libdbi-dbd-mysql-0.6.5-10.RHEL4.1.i386

groupadd mysql
useradd -g mysql mysql

CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti"
./configure --prefix=/usr/local/mysql --sysconfdir=/etc
--localstatedir=/srv/mysql --with-unix-socket-path=/var/run/mysql/mysql.sock
--enable-thread-safe-client
--with-named-thread-libs=-lpthread
--enable-local-infile --with-charset=utf8
--with-extra-charsets=utf8 --enable-assembler
--with-plugin-ndbcluster --with-plugin-partition
--without-ndb-debug
--without-debug --without-bench --without-readline
--libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include

make
make install

cp support-files/my-medium.cnf /etc/my.cnf

cp support-files/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
chkconfig --add mysql
chkconfig --level 2345 mysql on
PATH=/usr/local/mysql/bin:$PATH
echo "PATH=/usr/local/mysql/bin:$PATH" >> /etc/profile
PATH=/usr/local/mysql/bin:$PATH
export PATH


bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7916042/viewspace-917388/,如需轉載,請註明出處,否則將追究法律責任。

相關文章