在网上看到很多教程安装的时候都不成功,因此自己整理了下,做个备忘!
#安装cmake编译器
wget
解压cmake
#tar -zvxf cmake-2.8.3.tar.gz
配置编译
cd cmake-2.8.3
yum -y install gcc gcc-c++ ncurses-devel
./configure
make
make install
安装mysql 5.5
groupadd mysql
useradd -r -g mysql mysql
mkdir -p /data/dbdata
tar xzvf mysql-5.5.11.tar.gz
cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql \
-DMYSQL_DATADIR:PATH=/data/dbdata -DWITH_EXTRA_CHARSETS=complex -DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql \
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_DEBUG=0 -DWITH_PARTITION_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=1 -DMYSQL_UNIX_ADDR=/usr/local/mysql/tmp/mysql.sock \
-DWITH_MEMORY_STORAGE_ENGINE=1
make
make install
cd /usr/local/mysql
chown -R mysql.mysql .
chown -R mysql.mysql /data/dbdata
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/dbdata
cp support-files/my-huge.cnf /etc/my.cnf
bin/mysqld_safe --user=mysql &
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
阅读(2077) | 评论(0) | 转发(1) |