文章插图
1、下载MariaDB(mariadb-5.5.31.tar.gz)
[root@zabbix_server opt]# wget http:http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz
2、安装MariaDB
【使用yum安装mariadb服务器安装命令 如何在linux上面安装mariadb总结】[root@zabbix_server opt]# tar xzvf mariadb-5.5.31.tar.gz
[root@zabbix_server cmake-2.8.5]# cd cmake-2.8.5
[root@zabbix_server cmake-2.8.5]# ./bootstrap
[root@zabbix_server cmake-2.8.5]# make
[root@zabbix_server cmake-2.8.5]# make install
3、安装MariaDB所需软件包
yum install libaio-devel -y
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mariamysql
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1
-DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=0
-DBUILD_CONFIG=mysql_release -DFEATURE_SET=community
-DWITH_EMBEDDED_SERVER=OFF
cp support-files/my-innodb-heavy-4G.cnf /etc/my.cnf
/usr/local/mariamysql/scripts/mysql_install_db
--basedir=/usr/local/mariamysql/ --datadir=/usr/local/mariamysql/data/
--user=mysql
/usr/local/mariamysql/bin/mysqld_safe --user=mysql &
4、查看mariadb是否安装成功
[root@zabbix_server mariadb-5.5.31]# ps -ef | grep mysql
root9010 178460 16:08 pts/000:00:00 /bin/sh /usr/local/mariamysql/bin/mysqld_safe --user=mysql
mysql 945990100 16:08 pts/000:00:01 /usr/local/mariamysql/bin/mysqld --basedir=/usr/local/mariamysql --datadir=/data/database --plugin-dir=/usr/local/mariamysql/lib/plugin --user=mysql --log-error=/data/database/zabbix_server.err --open-files-limit=40960 --pid-file=zabbix_server.pid --socket=/data/database/mysql.sock --port=3306
root 10391 178460 16:16 pts/000:00:00 grep mysql
[root@zabbix_server mariadb-5.5.31]# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 41
Server version: 5.5.31-MariaDB-log MariaDB Server
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
root@zabbix ((none)) > show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| zabbix |
+--------------------+
3 rows in set (0.00 sec)
root@zabbix ((none)) >
推荐阅读
- 梭子蟹怎么保存不会死啊
- 凤眼菩提的颜色有什么讲究吗?
- linux下如何拷贝部分文件到另一个文件夹
- 分手四个月了,原来分分合合感觉都没有分,最后一次真的分了,想求大家怎么走出来啊?
- Linux CentOS 5.5 服务器安装图文教程
- 如何查看linux哪个进程占用网络 如何查看linux哪个进程占用网络空间
- 搜狗拼音输入法如何在Linux的ubuntu下使用
- linux执行的10个最危险的命令是哪些操作 Linux执行的10个最危险的命令是哪些?
- 冬虫夏草一天吃几根最合适