码迷,mamicode.com
首页 > 数据库 > 详细

Mariadb

时间:2014-09-25 15:45:49      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   ar   文件   div   sp   art   

下载源码目录: /usr/local/src

安装依赖:

yum -y install gcc libxml2-dev curl screen libpng12-dev autoconf libpcre3-dev make bzip2 libevent-dev patch libjpeg62-dev libcurl4-openssl-dev libfreetype6-dev g++ libtool libncurses5-dev psmisc lrzsz
yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml* ncurses-devel*libgcrypt* libtool*

1. 下载:wget http://mirrors.hustunique.com/mariadb/mariadb-5.5.34/kvm-tarbake-jaunty-x86/mariadb-5.5.34.tar.gz
2. 解压:
tar zxf mariadb-5.5.34.tar.gz
cd mariadb-5.5.34
3. 配置:
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/var/mysqldata -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_SSL=system

SSL 报错尝试: -DWITH_SSL=bundled

报错重新编译需要删除记录文件:rm CMakeCache.txt

 

4. 安装:
make && make install

5. 添加服务:
groupadd mysql
useradd mysql -g mysql -M -s /sbin/nologin

cd /usr/local/mysql
cp support-files/my-large.cnf /etc/my.cnf
cp support-files/mysql.server /etc/rc.d/init.d/mariad
chmod +x /etc/rc.d/init.d/mariad
chkconfig --add mariad
chkconfig mariad on
chown -R mysql:mysql /var/mysqldata/
chown -R :mysql /usr/local/mysql/.
scripts/mysql_install_db --user=mysql --datadir=/var/mysqldata
service mariad start


end;

Mariadb

标签:style   blog   http   color   ar   文件   div   sp   art   

原文地址:http://www.cnblogs.com/doujinya/p/3992426.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!