MySQL infobright的安装步骤

 更新时间:2021年4月7日 15:01  点击:1751

整个安装过程过了一遍,感觉跟MySQL的安装差不太多。步骤如下:

1、使用"rpm -ivh  安装包"命令来安装一下rpm的包,如下:

[root@tk01-dba-mysql dba_mysql]# rpm -ivh infobright-4.0.7-0-x86_64-ice.rpm --prefix=/usr/local
Preparing...             ################################# [100%]
Installing infobright 4.0.7-0 (x86_64)
The installer will generate /tmp/ib4.0.7-0-install.log install trace log.
Updating / installing...
  1:infobright-4.0.7-0        ################################# [100%]
Creating/Updating datadir and cachedir
Creating user mysql and group mysql
Installing default databases
Installing MySQL system tables...
OK
Filling help tables...
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 MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/infobright-4.0.7-x86_64/bin/mysqladmin -u root password 'new-password'
/usr/local/infobright-4.0.7-x86_64/bin/mysqladmin -u root -h tk01-dba-mysql-7-197 password 'new-password'

Alternatively you can run:
/usr/local/infobright-4.0.7-x86_64/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 manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/infobright-4.0.7-x86_64 ; /usr/local/infobright-4.0.7-x86_64/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/infobright-4.0.7-x86_64/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/infobright-4.0.7-x86_64/scripts/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

System Physical memory: 15866(MB)
Infobright optimal ServerMainHeapSize is set to 6000(MB)
Infobright optimal LoaderMainHeapSize is set to 800(MB)
Infobright server installed into folder /usr/local/infobright
Installation log file /tmp/ib4.0.7-0-install.log
--------------------------------------
To activate infobright server, please run ./postconfig.sh script from /usr/local/infobright-4.0.7-x86_64.
Example command: cd /usr/local/infobright-4.0.7-x86_64; ./postconfig.sh

我这里是将文件解压到了/usr/local/目录下面,如果有其他目录,则可以使用其他目录进行解压,解压后的文件如下:

[root@tk01-dba-mysql local]# ll
total 54932
drwxr-xr-x. 2 root   root    20 Oct 11 11:45 bin
drwxr-xr-x  8 root   root   297 Sep 27 09:10 cma_tcollector
drwxr-xr-x. 2 root   root    6 Apr 11 2018 etc
drwxr-xr-x. 2 root   root    6 Apr 11 2018 games
drwxr-xr-x. 2 root   root    6 Apr 11 2018 include
lrwxrwxrwx  1 root   root    34 Oct 15 21:42 infobright -> /usr/local/infobright-4.0.7-x86_64
-rw-r--r--  1 root   root 56249223 Oct 15 21:30 infobright-4.0.7-0-x86_64-ice.rpm
drwxr-xr-x 11 root   root   252 Oct 15 21:42 infobright-4.0.7-x86_64

2、根据最后一行提示,激活infobright server,运行脚本./postconfig.sh ,如下:

[root@tk01-dba-mysql infobright]# ./postconfig.sh 
Infobright post configuration
--------------------------------------
Infobright server activated.
--------------------------------------
Register your copy of ICE and receive a free copy of the User Manual (a $50 value) as well as a copy of the Bloor Research Spotlight Report "What's Cool About Columns" which explains the differences and benefits of a columnar versus row database.
Registration will require opening an HTTP connection to Infobright, do you wish to register now? [Y/N]: n
Register now http://www.infobright.org/Downloads/ICE/.

第一次运行的时候,会提醒是否注册,选择N,不注册,此时再次运行这个脚本:

[root@tk01-dba-mysql infobright]# ./postconfig.sh 
Infobright post configuration
--------------------------------------
Using postconfig you can: 
--------------------------------------
(1) Move existing data directory to other location,
(2) Move existing cache directory to other location,
(3) Configure server socket,
(4) Configure server port,
(5) Relocate datadir path to an existing data directory.

Please type 'y' for option that you want or press ctrl+c for exit.

Current configuration: 

--------------------------------------
Current config file: [/etc/my-ib.cnf]
Current brighthouse.ini file: [/usr/local/infobright-4.0.7-x86_64/data/brighthouse.ini]
Current datadir: [/usr/local/infobright-4.0.7-x86_64/data]
Current CacheFolder in brighthouse.ini file: [/usr/local/infobright-4.0.7-x86_64/cache]
Current socket: [/tmp/mysql-ib.sock] 
Current port: [5029]
--------------------------------------

(1) Do you want to copy current datadir [/usr/local/infobright-4.0.7-x86_64/data] to a new location? [y/n]:y
Give new datadir path (e.g. /opt/datadirnewpath/data):/data/infobright_5029/data
(2) Option to change CacheFolder is disabled when option 1 is chosen!
(3) Do you want to change current socket [/tmp/mysql-ib.sock]? [y/n]:n
(4) Do you want to change current port [5029]? [y/n]:n
(5) Relocation is disabled when options 1-4 are chosen!

--------------------------------------
Datadir(/usr/local/infobright-4.0.7-x86_64/data) is going to be copied to /data/infobright_5029/data
--------------------------------------

Please confirm to proceed? [y/n]:y
Copying /usr/local/infobright-4.0.7-x86_64/data to /data/infobright_5029/data ...is done.
You can now remove/backup your old /usr/local/infobright-4.0.7-x86_64/data ...
Done!

此时安装包会提示是否修改相关的目录,按照自己的需求去修改,我这里只是简单的改了下data盘的目录,其他的选项都选择的是N,这样最终有一条提示:

Datadir(/usr/local/infobright-4.0.7-x86_64/data) is going to be copied to /data/infobright_5029/data

   一路yes,就安装完毕了。

3、查看data文件。此时进入刚才设定的data目录,/data/infobright_5029/data里面,查看初始化好的文件。

[root@tk01-dba-mysql data]# ll
total 16
-rw-rw---- 1 mysql mysql  0 Oct 15 21:42 bh.err
-rw-r--r-- 1 mysql mysql 1898 Oct 15 21:42 brighthouse.ini
-rw-r--r-- 1 mysql mysql  8 Oct 15 21:42 ib_data_version
drwxr-xr-x 2 mysql mysql 4096 Oct 15 21:42 mysql
drwxr-xr-x 2 mysql mysql 4096 Oct 15 21:42 sys_infobright
drwxr-xr-x 2 mysql mysql  6 Oct 15 21:42 test

4、启动服务。安装完软件之后,使用自带的工具/etc/init.d/mysqld-ib启动服务,启动完之后可以查看相关进程,启动方法和进程查看方法如下:

[root@tk01-dba-mysql infobright_5029]# /etc/init.d/mysqld-ib start
Starting MySQL. SUCCESS! 
[root@tk01-dba-mysql-7-195 infobright_5029]# ps -ef|grep 5029
root   78369   1 0 10:34 pts/1  00:00:00 sudo -u mysql /usr/local/infobright-4.0.7-x86_64/bin/mysqld_safe --defaults-file=/etc/my-ib.cnf --log-queries-not-using-indexes --user=mysql --pid-file=/data/infobright_5029/data/tk01-dba-mysql-7-195.pid
mysql   78372 78369 0 10:34 pts/1  00:00:00 /bin/sh /usr/local/infobright-4.0.7-x86_64/bin/mysqld_safe --defaults-file=/etc/my-ib.cnf --log-queries-not-using-indexes --user=mysql --pid-file=/data/infobright_5029/data/tk01-dba-mysql-7-195.pid
mysql   78507 78372 0 10:34 pts/1  00:00:00 /usr/local/infobright-4.0.7-x86_64/bin/mysqld --defaults-file=/etc/my-ib.cnf --basedir=/usr/local/infobright-4.0.7-x86_64 --datadir=/data/infobright_5029/data --log-queries-not-using-indexes --log-error=/data/infobright_5029/data/bh.err --pid-file=/data/infobright_5029/data/tk01-dba-mysql-7-195.pid --socket=/tmp/mysql-ib.sock --port=5029
root   78570 68493 0 10:35 pts/1  00:00:00 grep --color=auto 5029
[root@tk01-dba-mysql-7-195 infobright_5029]# 

5、创建root用户的密码,这一步和mysql很像,使用/usr/local/infobright/bin/mysqladmin创建密码,方法如下:

[root@tk01-dba-mysql bin]# ./mysqladmin -uroot password '123456'
Warning: ./mysqladmin: unknown variable 'loose-local-infile=1'

6、连接数据库,连接方法:

[root@tk01-dba-mysql bin]# mysql-ib -uroot -p123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.40 build number (revision)=IB_4.0.7_r16961_17249(ice) (static)

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

mysql> show databases;
+--------------------+
| Database      |
+--------------------+
| information_schema |
| BH_RSI_Repository |
| mysql       |
| sys_infobright   |
| test        |
+--------------------+
5 rows in set (0.00 sec)

mysql> show engines;
+-------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine   | Support | Comment                          | Transactions | XA  | Savepoints |
+-------------+---------+-----------------------------------------------------------+--------------+------+------------+
| BRIGHTHOUSE | DEFAULT | Brighthouse storage engine                | YES     | NO  | NO     |
| MRG_MYISAM | YES   | Collection of identical MyISAM tables           | NO      | NO  | NO     |
| CSV     | YES   | CSV storage engine                    | NO      | NO  | NO     |
| MyISAM   | YES   | Default engine as of MySQL 3.23 with great performance  | NO      | NO  | NO     |
| MEMORY   | YES   | Hash based, stored in memory, useful for temporary tables | NO      | NO  | NO     |
+-------------+---------+-----------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)

   如果不设置进入infobright的用户名和密码,则可以直接使用命令mysql-ib进入上述界面。可以看到,默认的存储引擎是brighthouse。到这里,infobright的安装过程算是全部完成了。

7、导入数据。

    社区版的目前只能通过load data的方法进行数据导入,语法如下:

LOAD DATA [LOW_PRIORITY| CONCURRENT] [LOCAL] INFILE 'file_name.txt'  
[REPLACE | IGNORE]  
INTO TABLE tbl_name  
[FIELDS    
  [TERMINATED BY 'string']    
  [[OPTIONALLY] ENCLOSED BY 'char']    
  [ESCAPED BY 'char' ]  
] 
[LINES    
[STARTING BY 'string']    
[TERMINATED BY 'string']  
]  
[IGNORE number LINES]  [(col_name_or_user_var,...)]  [SET col_name = expr,...)]

其中有很多关键字信息,这里解释一些重要的:

  • LOW_PRIORITY关键字

   如果load data语句使用了LOW_PRIORITY关键字,则在碰到其他会话操作相同表时,则会延迟执行LOAD DATA语句,直到其他会话操作表结束为止。

  • replace和ignore关键字

 控制对现有的唯一键记录的重复的处理。如果你指定replace,新行将代替有相同的唯一键值的现有行。如果你指定ignore,跳过有唯一键的现有行的重复行的输入。

  • fields关键字

指定了文件字段的分割格式:

  • terminated by关键字

以什么字符作为分隔符;

  • enclosed by

字段括起字符;

  • lines

指定了每条记录的分隔符默认为'\n'即为换行符;

   更多信息,请参考官方文档。

   现在我们生成一个文本,然后写入数据:

mysql> use test;
Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| test      |
+----------------+
1 row in set (0.00 sec)

mysql> load data infile '/tmp/a.txt' ignore into table test character set utf8 fields terminated by ' ' lines terminated by '\n';       Query OK, 4 rows affected (0.04 sec)
Records: 4 Deleted: 0 Skipped: 0 Warnings: 0

mysql> system cat /tmp/a.txt
1  aaa
2  bbb
3  ccc
4  ddd

mysql> select * from test;
+------+-------+
| id  | name |
+------+-------+
|  1 |  aaa |
|  2 |  bbb |
|  3 |  ccc |
|  4 |  ddd |
+------+-------+
4 rows in set (0.00 sec)

   最终,所有的数据都导入了。大家可以尝试用这种方法导入大量的数据,然后对infobright的查询性能进行评估。

以上就是MySQL infobright的安装步骤的详细内容,更多关于MySQL infobright的安装的资料请关注猪先飞其它相关文章!

[!--infotagslink--]

相关文章

  • PHP7快速编译安装的步骤

    编译安装非常的简单了我们现在的php版本已经到了php7了,下文小编来为各位介绍一篇关于PHP7快速编译安装的步骤,希望文章能够帮助到各位。 一、安装必要一些依赖 yum...2016-11-25
  • MySQL性能监控软件Nagios的安装及配置教程

    这篇文章主要介绍了MySQL性能监控软件Nagios的安装及配置教程,这里以CentOS操作系统为环境进行演示,需要的朋友可以参考下...2015-12-14
  • Rstudio中安装package出现的问题及解决

    这篇文章主要介绍了Rstudio中安装package出现的问题及解决方案,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-05-06
  • 详解Mysql中的JSON系列操作函数

    新版 Mysql 中加入了对 JSON Document 的支持,可以创建 JSON 类型的字段,并有一套函数支持对JSON的查询、修改等操作,下面就实际体验一下...2016-08-23
  • PHP编译安装后PHP-FPM使用笔记

    PHP-FPM我们相信各位用高版本的php经常使用到了,下面整理了一些关于PHP-FPM的笔记,有兴趣的可进来看看。 今天赶上了123System OPenVZ VPS全场半价的机会,购入了一...2016-11-25
  • 深入研究mysql中的varchar和limit(容易被忽略的知识)

    为什么标题要起这个名字呢?commen sence指的是那些大家都应该知道的事情,但往往大家又会会略这些东西,或者对这些东西一知半解,今天我总结下自己在mysql中遇到的一些commen sense类型的问题。 ...2015-03-15
  • MySQL 字符串拆分操作(含分隔符的字符串截取)

    这篇文章主要介绍了MySQL 字符串拆分操作(含分隔符的字符串截取),具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-02-22
  • node.js如何操作MySQL数据库

    这篇文章主要介绍了node.js如何操作MySQL数据库,帮助大家更好的进行web开发,感兴趣的朋友可以了解下...2020-10-29
  • Linux安装Pytorch1.8GPU(CUDA11.1)的实现

    这篇文章主要介绍了Linux安装Pytorch1.8GPU(CUDA11.1)的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-03-25
  • mysql的3种分表方案

    一、先说一下为什么要分表:当一张的数据达到几百万时,你查询一次所花的时间会变多,如果有联合查询的话,有可能会死在那儿了。分表的目的就在于此,减小数据库的负担,缩短查询时间。根据个人经验,mysql执行一个sql的过程如下:1...2014-05-31
  • vscode安装git及项目开发过程

    这篇文章主要介绍了vscode安装git及项目开发过程,本文通过图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下...2021-05-19
  • 安装和使用percona-toolkit来辅助操作MySQL的基本教程

    一、percona-toolkit简介 percona-toolkit是一组高级命令行工具的集合,用来执行各种通过手工执行非常复杂和麻烦的mysql和系统任务,这些任务包括: 检查master和slave数据的一致性 有效地对记录进行归档 查找重复的索...2015-11-24
  • Windows服务器MySQL中文乱码的解决方法

    我们自己鼓捣mysql时,总免不了会遇到这个问题:插入中文字符出现乱码,虽然这是运维先给配好的环境,但是在自己机子上玩的时候咧,总得知道个一二吧,不然以后如何优雅的吹牛B。...2015-03-15
  • Centos5.5中安装Mysql5.5过程分享

    这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅Mysql5.5.37安装需要cmake,5.6版本开始都需要cmake来编译,5.5以后的版本应该也要装这个。安装cmake复制代码 代码如下: [root@local ~]# wget http://www.cm...2015-03-15
  • Visual Studio 2015下载和安装图文教程

    这篇文章主要为大家详细介绍了Visual Studio 2015下载和安装图文教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2021-09-22
  • Node调试工具JSHint的安装及配置教程

    现在我们介绍一种在Node下检查简单错误的JS代码验证工具JSHint。  JSHint的具体介绍参考http://www.jshint.com/about/,说直白点儿,JSHint就是一个检查JS代码规范与否的工具,它可以用来检查任何(包括server端和client端...2014-05-31
  • Centos中彻底删除Mysql(rpm、yum安装的情况)

    我用的centos6,mysql让我整出了各种问题,我想重装一个全新的mysql,yum remove mysql-server mysql之后再install并不能得到一个干净的mysql,原来的/etc/my.cnf依然没变,datadir里面的数据已没有任何变化,手动删除/etc/my.cn...2015-03-15
  • linux服务器快速卸载安装node环境(简单上手)

    这篇文章主要介绍了linux服务器快速卸载安装node环境(简单上手),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-02-22
  • 用VirtualBox构建MySQL测试环境

    宿主机使用网线的时候,客户机在Bridged Adapter模式下,使用Atheros AR8131 PCI-E Gigabit Ethernet Controller上网没问题。 宿主机使用无线的时候,客户机在Bridged Adapter模式下,使用可选项里唯一一个WIFI选项,Microsoft Virtual Wifi Miniport Adapter也无法上网,故弃之。...2013-09-19
  • 在PyCharm中安装PaddlePaddle的方法

    这篇文章主要介绍了在PyCharm中安装PaddlePaddle的方法,本文给大家介绍的非常想详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下...2021-02-05