Mariadb
下载源码目录: /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;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。