CentOS 6.4 x64 Percona-Server-5.6.15 源码安装

首先下载 Percona-Server-5.6

 

http://www.percona.com/downloads/Percona-Server-5.6/LATEST/source/

 

然后必须先安装cmake

 

/usr/sbin/groupadd mysql

/usr/sbin/useradd -g mysql mysql

 

mkdir -p /opt/local/mysql-5.6.15/data

mkdir -p /opt/local/mysql-5.6.15/binlog

mkdir -p /opt/local/mysql-5.6.15/logs

mkdir -p /opt/local/mysql-5.6.15/relaylog

 

/usr/local/bin/cmake -DCMAKE_INSTALL_PREFIX="/opt/local/mysql-5.6.15" -DDEFAULT_CHARSET=utf8 -DMYSQL_DATADIR="/opt/local/mysql-5.6.15/data/" -DCMAKE_INSTALL_PREFIX="/opt/local/mysql-5.6.15" -DINSTALL_PLUGINDIR=plugin -DSYSCONFDIR="/opt/local/mysql-5.6.15" -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_COLLATION=utf8_general_ci -DENABLE_DEBUG_SYNC=0 -DENABLED_LOCAL_INFILE=1 -DENABLED_PROFILING=1 -DWITH_ZLIB=system -DWITH_EXTRA_CHARSETS=none -DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF -DEXTRA_CHARSETS=all -DWITH_FAST_MUTEXES=ON -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1

 

make && make install

 

chmod +w /opt/local/mysql-5.6.15

 

chown -R mysql:mysql /opt/local/mysql-5.6.15

 

ln -s /opt/local/mysql-5.6.15/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18

 

ln -s /opt/local/mysql-5.6.15/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18

 

/sbin/ldconfig

 

scripts/mysql_install_db --defaults-file=/opt/local/mysql-5.6.15/my.cnf --basedir=/opt/local/mysql-5.6.15 --datadir=/opt/local/mysql-5.6.15/data --user=mysql --force

 

cp ./support-files/mysql.server /etc/init.d/mysqld

 

chmod 755 /etc/init.d/mysqld

 

chkconfig mysqld on

 

echo 'basedir=/opt/local/mysql-5.6.15/' >> /etc/init.d/mysqld

 

echo 'datadir=/opt/local/mysql-5.6.15/data' >>/etc/init.d/mysqld

 

service mysqld start

 

/opt/local/mysql-5.6.15/bin/mysqladmin -u root password 'rldb123'

posted @ 2016-05-31 18:32  丶小炒肉  阅读(176)  评论(0编辑  收藏  举报