返回顶部
首页 > 资讯 > 数据库 >MariaDB 10.1源码安装流程(CentOS 6.5)
  • 614
分享到

MariaDB 10.1源码安装流程(CentOS 6.5)

2024-04-02 19:04:59 614人浏览 薄情痞子
摘要

--安装所需软件包 [root@localhost mariadb-10.1.14]# yum install bison bison-devel ncurses libxml2 libxml2-deve

--安装所需软件包
[root@localhost mariadb-10.1.14]# yum install bison bison-devel ncurses libxml2 libxml2-devel

下载新版本的cmake工具
[root@localhost install]# wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz --no-check-certificate
--2016-06-17 05:21:22--  Https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
Resolving cmake.org... 66.194.253.19
Connecting to cmake.org|66.194.253.19|:443... connected.
WARNING: certificate common name “*.kitware.com” doesn’t match requested host name “cmake.org”.
HTTP request sent, awaiting response... 200 OK
Length: 6863498 (6.5M) [application/x-gzip]
Saving to: “cmake-3.5.2.tar.gz”

100%[===================================================================================================================>] 6,863,498    137K/s   in 65s    
2016-06-17 05:22:35 (104 KB/s) - “cmake-3.5.2.tar.gz” saved [6863498/6863498]

[root@localhost install]# tar fxvz cmake-3.5.2.tar.gz
[root@localhost install]# cd cmake-3.5.2
[root@localhost cmake-3.5.2]# ./bootstrap

编译安装cmake3.5.2

[root@localhost cmake-3.5.2]# make
.....
[ 98%] Building C object Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeFiles/pseudonl_BC.dir/ret0.c.o
[ 99%] Linking C executable BC
[ 99%] Built target pseudonl_BC
Scanning dependencies of target pseudonl_purify
[ 99%] Building C object Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeFiles/pseudonl_purify.dir/ret0.c.o
[ 99%] Linking C executable purify
[ 99%] Built target pseudonl_purify
Scanning dependencies of target pseudonl_valgrind
[ 99%] Building C object Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeFiles/pseudonl_valgrind.dir/ret0.c.o
[ 99%] Linking C executable valgrind
[ 99%] Built target pseudonl_valgrind
Scanning dependencies of target pseudo_emulator
[ 99%] Building C object Tests/RunCMake/CMakeFiles/pseudo_emulator.dir/pseudo_emulator.c.o
[ 99%] Linking C executable pseudo_emulator
[ 99%] Built target pseudo_emulator
Scanning dependencies of target pseudo_iwyu
[100%] Building C object Tests/RunCMake/CMakeFiles/pseudo_iwyu.dir/pseudo_iwyu.c.o
[100%] Linking C executable pseudo_iwyu
[100%] Built target pseudo_iwyu
Scanning dependencies of target foo
[100%] Building CXX object Tests/FindPackageModeMakefileTest/CMakeFiles/foo.dir/foo.cpp.o
[100%] Linking CXX static library libfoo.a
[100%] Built target foo

[root@localhost cmake-3.5.2]# make install
.....
-- Installing: /usr/local/bin/ccmake
-- Installing: /usr/local/bin/cmake
-- Installing: /usr/local/bin/ctest
-- Installing: /usr/local/bin/cpack
-- Installing: /usr/local/share/cmake-3.5/include/cmCPluginapi.h
-- Installing: /usr/local/share/cmake-3.5/editors/vim/cmake-help.vim
-- Installing: /usr/local/share/cmake-3.5/editors/vim/cmake-indent.vim
-- Installing: /usr/local/share/cmake-3.5/editors/vim/cmake-syntax.vim
-- Installing: /usr/local/share/cmake-3.5/editors/eMacs/cmake-mode.el
-- Installing: /usr/local/share/aclocal/cmake.m4
-- Installing: /usr/local/share/cmake-3.5/completions/cmake
-- Installing: /usr/local/share/cmake-3.5/completions/cpack
-- Installing: /usr/local/share/cmake-3.5/completions/ctest

--查看cmake的版本
[root@localhost cmake-3.5.2]# cmake --version
cmake version 3.5.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

--下载MariaDB 10.1源码包
[root@localhost install]# wget http://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.1.14/source/mariadb-10.1.14.tar.gz
--2016-06-15 23:47:38--  http://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.1.14/source/mariadb-10.1.14.tar.gz
Resolving mirrors.tuna.tsinghua.edu.cn... 166.111.206.63, 2402:f000:1:416:166:111:206:63
Connecting to mirrors.tuna.tsinghua.edu.cn|166.111.206.63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 55341017 (53M) [application/octet-stream]
Saving to: “mariadb-10.1.14.tar.gz”

100%[===================================================================================================================>] 55,341,017   576K/s   in 64s     
2016-06-15 23:48:44 (843 KB/s) - “mariadb-10.1.14.tar.gz” saved [55341017/55341017]

[root@localhost install]# tar -zxvf mariadb-10.1.14.tar.gz
[root@localhost install]# cd mariadb-10.1.14
[root@localhost mariadb-10.1.14]# ls
BUILD           config.h.cmake      CREDITS            extra               libMysql     mysys      README      storage        VERSION
BUILD-CMAKE     configure.cmake     dbug               include             libmysqld    mysys_ssl  scripts     strings        vio
client          COPYING             debian             INSTALL-SOURCE      libservices  pcre       sql         support-files  win
cmake           COPYING.LESSER      Docs               INSTALL-WIN-SOURCE  man          plugin     sql-bench   tests          wsrep
CMakeLists.txt  COPYING.thirdparty  EXCEPTIONS-CLIENT  KNOWN_BUGS.txt      mysql-test   randgen    sql-common  unittest       zlib

--创建MariaDB软件安装目录、数据文件和日志文件目录
[root@localhost storage]# mkdir /maria
[root@localhost storage]# mkdir -p /maria_data/cnf
[root@localhost maria_data]# mkdir -p /log/maria
[root@localhost maria_data]# chown -R mysql:mysql /log/maria/

--开始编译安装
[root@localhost mariadb-10.1.14]# cmake . -DCMAKE_INSTALL_PREFIX=/maria \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_XTRADB_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATEDX_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DCOMPILATION_COMMENT='MariaDB 10.1 production environment' \
-DWITH_READLINE=ON \
-DSYSCONFDIR=/maria_data/cnf \
-DMYSQL_UNIX_ADDR=/maria_data/maria.sock \
-DMYSQL_DATADIR=/maria_data

-- Running cmake version 3.5.2
-- MariaDB 10.1.14
-- Packaging as: mariadb-10.1.14-linux-x86_64
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARIES = /usr/lib64/libssl.so
-- CRYPTO_LIBRARY = /usr/lib64/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 1
-- SSL_LIBRARIES = /usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- Checking for one of the modules 'libsystemd;libsystemd-daemon'
-- Systemd features not enabled
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.7.6") 
-- Configuring done
-- Generating done
-- Build files have been written to: /install/mariadb-10.1.14

[root@localhost mariadb-10.1.14]# make
.....
Scanning dependencies of target bug25714
[100%] Building C object tests/CMakeFiles/bug25714.dir/bug25714.c.o
[100%] Linking CXX executable bug25714
[100%] Built target bug25714
Scanning dependencies of target mysql_client_test
[100%] Building C object tests/CMakeFiles/mysql_client_test.dir/mysql_client_test.c.o
[100%] Linking CXX executable mysql_client_test
[100%] Built target mysql_client_test
Scanning dependencies of target mysqld
[100%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o
[100%] Linking CXX executable mysqld
[100%] Built target mysqld
Scanning dependencies of target udf_example
[100%] Building C object sql/CMakeFiles/udf_example.dir/udf_example.c.o
[100%] Linking C shared module udf_example.so
[100%] Built target udf_example
Scanning dependencies of target mysql_tzinfo_to_sql
[100%] Building CXX object sql/CMakeFiles/mysql_tzinfo_to_sql.dir/tztime.cc.o
[100%] Linking CXX executable mysql_tzinfo_to_sql
[100%] Built target mysql_tzinfo_to_sql
Scanning dependencies of target my_safe_process
[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
[100%] Linking CXX executable my_safe_process
[100%] Built target my_safe_process

[root@localhost mariadb-10.1.14]# make install
.....
-- Installing: /maria/bin/mytop
-- Installing: /maria/bin/mysqlhotcopy
-- Installing: /maria/bin/mysqldumpslow
-- Installing: /maria/bin/mysqld_multi
-- Installing: /maria/bin/mysqld_safe
-- Installing: /maria/bin/wsrep_sst_common
-- Installing: /maria/bin/wsrep_sst_mysqldump
-- Installing: /maria/bin/wsrep_sst_rsync
-- Installing: /maria/bin/wsrep_sst_xtrabackup
-- Installing: /maria/bin/wsrep_sst_xtrabackup-v2
-- Installing: /maria/share/maria_add_GIS_sp.sql
-- Installing: /maria/share/maria_add_gis_sp_bootstrap.sql
-- Installing: /maria/support-files/my-huge.cnf
-- Installing: /maria/support-files/my-innodb-heavy-4G.cnf
-- Installing: /maria/support-files/my-large.cnf
-- Installing: /maria/support-files/my-medium.cnf
-- Installing: /maria/support-files/my-small.cnf
-- Installing: /maria/support-files/wsrep.cnf
-- Installing: /maria/support-files/mysqld_multi.server
-- Installing: /maria/support-files/mysql-log-rotate
-- Installing: /maria/support-files/binary-configure
-- Installing: /maria/support-files/wsrep_notify
-- Installing: /maria/support-files/magic
-- Installing: /maria/support-files/policy
-- Installing: /maria/support-files/policy/apparmor
-- Installing: /maria/support-files/policy/apparmor/usr.sbin.mysqld
-- Installing: /maria/support-files/policy/apparmor/README
-- Installing: /maria/support-files/policy/apparmor/usr.sbin.mysqld.local
-- Installing: /maria/support-files/policy/selinux
-- Installing: /maria/support-files/policy/selinux/mariadb-server.te
-- Installing: /maria/support-files/policy/selinux/README
-- Installing: /maria/support-files/policy/selinux/mariadb-server.fc
-- Installing: /maria/share/pkGConfig/mariadb.pc
-- Installing: /maria/share/aclocal/mysql.m4
-- Installing: /maria/support-files/mysql.server

--更改MariaDB数据文件的权限为mysql
[root@localhost cnf]# chown -R mysql:mysql /maria_data/

--创建MySQL数据库的系统表
[root@localhost maria]# /maria/scripts/mysql_install_db --user=mysql  --datadir=/maria_data/
.....
2016-06-17 17:37:16 139707541080032 [Note] InnoDB: Highest supported file fORMat is Barracuda.
2016-06-17 17:37:16 139707541080032 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-17 17:37:16 139707541080032 [Note] InnoDB: Waiting for purge to start
2016-06-17 17:37:16 139707541080032 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.29-76.2 started; log sequence number 1616819
2016-06-17 17:37:16 139706685712128 [Note] InnoDB: Dumping buffer pool(s) not yet started
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWord FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'./bin/mysqladmin' -u root password 'new-password'
'./bin/mysqladmin' -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:
'./bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '.' ; ./bin/mysqld_safe --datadir='/maria_data/'

You can test the MariaDB daemon with mysql-test-run.pl
cd './mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at sales@mariadb.com.
Alternatively consider joining our commUnity based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/

--拷贝配置文件模板到配置文件目录
[root@localhost maria]# cp ./support-files/my-medium.cnf /maria_data/cnf/my.cnf

--启动数据库
[root@localhost maria]# ./bin/mysqld_safe --defaults-file=/maria_data/cnf/my.cnf &
[1] 14633
[root@localhost maria]# 160617 18:55:09 mysqld_safe Logging to '/log/maria/err.log'.
160617 18:55:09 mysqld_safe Starting mysqld daemon with databases from /maria_data

--修改root用户密码
[root@localhost maria]# ./bin/mysqladmin -uroot password 'root'

--连接数据库
[root@localhost maria]# ./bin/mysql -uroot -p'root'
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.1.14-MariaDB MariaDB 10.1 production environment

Copyright (c) 2000, 2016, oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| cnf                |
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.00 sec)

MariaDB [(none)]> use test
Database changed
MariaDB [test]> show tables;
Empty set (0.00 sec)

MariaDB [test]> create table test(a int);
Query OK, 0 rows affected (0.08 sec)

MariaDB [test]> show create table test;
+-------+---------------------------------------------------------------------------------------+
| Table | Create Table                                                                          |
+-------+---------------------------------------------------------------------------------------+
| test  | CREATE TABLE `test` (
  `a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+-------+---------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [test]> insert into test values(100);
Query OK, 1 row affected (0.00 sec)

MariaDB [test]> select * from test;
+------+
| a    |
+------+
|  100 |
+------+
1 row in set (0.00 sec)

MariaDB [test]> show engines;
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                                                          | Transactions | XA   | Savepoints |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| MRG_MyISAM         | YES     | Collection of identical MyISAM tables                                                            | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                                                            | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                                                               | NO           | NO   | NO         |
| FEDERATED          | YES     | FederatedX pluggable storage engine                                                              | YES          | NO   | YES        |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                                        | NO           | NO   | NO         |
| Aria               | YES     | Crash-safe tables with MyISAM heritage                                                           | NO           | NO   | NO         |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                                                               | NO           | NO   | NO         |
| InnoDB             | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, foreign keys and encryption for tables | YES          | YES  | YES        |
| SEQUENCE           | YES     | Generated tables filled with sequential values                                                   | YES          | NO   | YES        |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
9 rows in set (0.00 sec)
您可能感兴趣的文档:

--结束END--

本文标题: MariaDB 10.1源码安装流程(CentOS 6.5)

本文链接: https://lsjlt.com/news/47865.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
  • MariaDB 10.1源码安装流程(CentOS 6.5)
    --安装所需软件包 [root@localhost mariadb-10.1.14]# yum install bison bison-devel ncurses libxml2 libxml2-deve...
    99+
    2024-04-02
  • mariaDB 10.1源码如何安装
    这篇文章主要为大家展示了“mariaDB 10.1源码如何安装”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“mariaDB 10.1源码如何安装”这篇文章吧。 ...
    99+
    2024-04-02
  • MariaDB 10.1源码安装执行mysql_install_db报错"system tables failed"
    --初始化MySQL数据库的数据文件失败 [root@localhost maria]# ./scripts/mysql_install_db --user=mysql  --datadir=/m...
    99+
    2024-04-02
  • Centos 6.5 下面 源码编译 安装 Mysql 5.7.13
    安装软件依赖包 yum -y install gcc gcc-c++ ncurses ncurses-devel cmake下载软件包 cd  /usr/local/src wget h...
    99+
    2024-04-02
  • Discuz 安装全流程 CentOS + Docker + PHP + Nginx + Mariadb
    仅供技术研究,并非最简单的Discuz安装方法 文章目录 1 Docker 安装2 MariaDB 安装3 PHP 安装4 Nginx 安装5 Discuz 安装5.1 安装文件部署5.2 安...
    99+
    2023-09-01
    docker
  • MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办
    这篇文章给大家分享的是有关MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办...
    99+
    2024-04-02
  • Centos 6.5如何使用二进制格式包安装MariaDB
    这篇文章主要讲解了“Centos 6.5如何使用二进制格式包安装MariaDB”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Centos 6.5如何使用二进...
    99+
    2024-04-02
  • Centos源码安装Python3
    CentOS7默认安装了python2.7.5,当需要使用python3的时候,可以手动下载Python源码后编译安装。下载python(https://www.python.org/ftp/python/3.4.3/Python-3.4....
    99+
    2023-01-31
    源码 Centos
  • MySQL5.5源码安装的流程
    这篇文章主要讲解了“MySQL5.5源码安装的流程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“MySQL5.5源码安装的流程”吧! ...
    99+
    2024-04-02
  • CentOS 6.5上安装MySQL-Cluster 7.3.4的过程
    本篇内容主要讲解“CentOS 6.5上安装MySQL-Cluster 7.3.4的过程”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学...
    99+
    2024-04-02
  • MariaDB源码安装和YUM安装的方法
    这篇文章主要讲解了“MariaDB源码安装和YUM安装的方法”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“MariaDB源码安装和YUM安装的方法”吧!一、...
    99+
    2024-04-02
  • CentOS 7下源码安装MySQL5.6的过程
    本篇内容介绍了“CentOS 7下源码安装MySQL5.6的过程”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所...
    99+
    2024-04-02
  • MySQL5.6源码编译安装的流程
    本篇内容主要讲解“MySQL5.6源码编译安装的流程”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“MySQL5.6源码编译安装的流程”吧! ...
    99+
    2024-04-02
  • centos编译安装mariadb的详细过程
    目录Centos编译安装mariadb1:安装cmake环境(1):进入/usr/local/download/目录(2):解压源码包(3):解压CMake源码包(4):进入cmark的源码目录(5):运行当前目录下的一...
    99+
    2024-04-02
  • centos中如何源码安装mysql5.6
    小编给大家分享一下centos中如何源码安装mysql5.6,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧! ...
    99+
    2024-04-02
  • 【Linux】Centos安装 mariadb 并授权远程登陆
    👨‍🎓博主简介   🏅云计算领域优质创作者   🏅华为云开发者社区专家博主   🏅阿里云开发者社区专家博主 💊交流社区:运维交流社区 欢迎...
    99+
    2023-08-23
    linux centos mariadb mysql 数据库
  • Centos 7 安装 Oracle 12cR2 流程
    Centos 7 安装 Oracle 12cR2 流程 一个欠登儿程序员 2019-01-28 16:40:30 788 收藏 2 分类专栏: Centos 7 软件安装系列 版权 前言 在公司之前一直用的是Oracle 11g的数据库版...
    99+
    2014-11-23
    Centos 7 安装 Oracle 12cR2 流程
  • 用yum源配合源码包安装openresty、mariadb、php7服务
    在开始部署之前,有必要先简单介绍一下!    OpenResty 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库、第三...
    99+
    2022-11-30
    update screen openresty
  • centos 7 源码安装openssh的方法
    环境:centos 7.1.1503 最小化安装 依赖包下载: yum -y install lrzsz zlib-devel perl gcc pam-devel 1、安装openssl ,选用最新发布的版本:open...
    99+
    2022-06-04
    centos 7 源码安装openssh centos 7 源码安装
  • CentOS上PHP源码安装和配置
    CentOS上PHP源码安装和配置 此文是在CentOS 7上已经部署了Nginx的基础上进行的 关于CentOS7上安装Nginx,可参考我之前的文章: CentOS上Nginx安装记录 我们现在在...
    99+
    2023-09-03
    linux centos php nginx
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作