电脑知识|欧美黑人一区二区三区|软件|欧美黑人一级爽快片淫片高清|系统|欧美黑人狂野猛交老妇|数据库|服务器|编程开发|网络运营|知识问答|技术教程文章 - 好吧啦网

您的位置:首頁技術文章
文章詳情頁

MySQL infobright的安裝步驟

瀏覽:9日期:2023-10-04 08:25:35

整個安裝過程過了一遍,感覺跟MySQL的安裝差不太多。步驟如下:

1、使用'rpm -ivh 安裝包'命令來安裝一下rpm的包,如下:

[root@tk01-dba-mysql dba_mysql]# rpm -ivh infobright-4.0.7-0-x86_64-ice.rpm --prefix=/usr/localPreparing... ################################# [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 cachedirCreating user mysql and group mysqlInstalling default databasesInstalling MySQL system tables...OKFilling help tables...OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE 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_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly 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.plcd /usr/local/infobright-4.0.7-x86_64/mysql-test ; perl mysql-test-run.plPlease 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/infobrightInstallation 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]# lltotal 54932drwxr-xr-x. 2 root root 20 Oct 11 11:45 bindrwxr-xr-x 8 root root 297 Sep 27 09:10 cma_tcollectordrwxr-xr-x. 2 root root 6 Apr 11 2018 etcdrwxr-xr-x. 2 root root 6 Apr 11 2018 gamesdrwxr-xr-x. 2 root root 6 Apr 11 2018 includelrwxrwxrwx 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.rpmdrwxr-xr-x 11 root root 252 Oct 15 21:42 infobright-4.0.7-x86_642、根據最后一行提示,激活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]: nRegister 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]:yGive 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]:yCopying /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]# lltotal 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_versiondrwxr-xr-x 2 mysql mysql 4096 Oct 15 21:42 mysqldrwxr-xr-x 2 mysql mysql 4096 Oct 15 21:42 sys_infobrightdrwxr-xr-x 2 mysql mysql 6 Oct 15 21:42 test4、啟動服務。安裝完軟件之后,使用自帶的工具/etc/init.d/mysqld-ib啟動服務,啟動完之后可以查看相關進程,啟動方法和進程查看方法如下:

[root@tk01-dba-mysql infobright_5029]# /etc/init.d/mysqld-ib startStarting MySQL. SUCCESS! [root@tk01-dba-mysql-7-195 infobright_5029]# ps -ef|grep 5029root 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.pidmysql 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.pidmysql 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=5029root 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 -p123456Welcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is 2Server 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 changedmysql> 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: 0mysql> system cat /tmp/a.txt1 aaa2 bbb3 ccc4 dddmysql> 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的安裝的資料請關注好吧啦網其它相關文章!

標簽: MySQL 數據庫
相關文章:
主站蜘蛛池模板: 仿古建筑设计-仿古建筑施工-仿古建筑公司-汉匠古建筑设计院 | 培训中心-海南香蕉蛋糕加盟店技术翰香原中心官网总部 | 塑胶跑道_学校塑胶跑道_塑胶球场_运动场材料厂家_中国塑胶跑道十大生产厂家_混合型塑胶跑道_透气型塑胶跑道-广东绿晨体育设施有限公司 | 船用泵,船用离心泵,船用喷射泵,泰州隆华船舶设备有限公司 | 厂厂乐-汇聚海量采购信息的B2B微营销平台-厂厂乐官网 | 心肺复苏模拟人|医学模型|急救护理模型|医学教学模型上海康人医学仪器设备有限公司 | 【孔氏陶粒】建筑回填陶粒-南京/合肥/武汉/郑州/重庆/成都/杭州陶粒厂家 | 淄博不锈钢无缝管,淄博不锈钢管-鑫门物资有限公司 | 能量回馈_制动单元_电梯节能_能耗制动_深圳市合兴加能科技有限公司 | 液压升降平台_剪叉式液压/导轨式升降机_传菜机定做「宁波日腾升降机厂家」 | 进口便携式天平,外校_十万分之一分析天平,奥豪斯工业台秤,V2000防水秤-重庆珂偌德科技有限公司(www.crdkj.com) | 双能x射线骨密度检测仪_dxa骨密度仪_双能x线骨密度仪_品牌厂家【品源医疗】 | 不锈钢复合板厂家_钛钢复合板批发_铜铝复合板供应-威海泓方金属复合材料股份有限公司 | 【化妆品备案】进口化妆品备案流程-深圳美尚美化妆品有限公司 | 东莞市海宝机械有限公司-不锈钢分选机-硅胶橡胶-生活垃圾-涡电流-静电-金属-矿石分选机 | 单级/双级旋片式真空泵厂家,2xz旋片真空泵-浙江台州求精真空泵有限公司 | 环境模拟实验室_液体-气体控温机_气体控温箱_无锡双润冷却科技有限公司 | 云南成考网_云南成人高考报名网 粤丰硕水性环氧地坪漆-防静电自流平厂家-环保地坪涂料代理 | 彭世修脚_修脚加盟_彭世修脚加盟_彭世足疗加盟_足疗加盟连锁_彭世修脚技术培训_彭世足疗 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | PSI渗透压仪,TPS酸度计,美国CHAI PCR仪,渗透压仪厂家_价格,微生物快速检测仪-华泰和合(北京)商贸有限公司 | 诸城网站建设-网络推广-网站优化-阿里巴巴托管-诸城恒泰互联 | 注塑机-压铸机-塑料注塑机-卧式注塑机-高速注塑机-单缸注塑机厂家-广东联升精密智能装备科技有限公司 | 成都亚克力制品,PVC板,双色板雕刻加工,亚克力门牌,亚克力标牌,水晶字雕刻制作-零贰捌广告 | 南京兰江泵业有限公司-水解酸化池潜水搅拌机-絮凝反应池搅拌机-好氧区潜水推进器 | 短信营销平台_短信群发平台_106短信发送平台-河南路尚 | 包头市鑫枫装饰有限公司| 施工围挡-施工PVC围挡-工程围挡-深圳市旭东钢构技术开发有限公司 | 香港新时代国际美容美发化妆美甲培训学校-26年培训经验,值得信赖! | 全自动在线分板机_铣刀式在线分板机_曲线分板机_PCB分板机-东莞市亿协自动化设备有限公司 | 美侍宠物-专注宠物狗及宠物猫训练|喂养|医疗|繁育|品种|价格 | 热缩管切管机-超声波切带机-织带切带机-无纺布切布机-深圳市宸兴业科技有限公司 | 防水套管厂家_刚性防水套管_柔性防水套管_不锈钢防水套管-郑州中泰管道 | 量子管通环-自清洗过滤器-全自动反冲洗过滤器-北京罗伦过滤技术集团有限公司 | 真空冷冻干燥机_国产冻干机_冷冻干燥机_北京四环冻干 | 翅片管散热器价格_钢制暖气片报价_钢制板式散热器厂家「河北冀春暖气片有限公司」 | 【德信自动化】点胶机_全自动点胶机_自动点胶机厂家_塑料热压机_自动螺丝机-深圳市德信自动化设备有限公司 | 定量包装秤,吨袋包装称,伸缩溜管,全自动包装秤,码垛机器人,无锡市邦尧机械工程有限公司 | 屏蔽服(500kv-超高压-特高压-电磁)-徐吉电气 | 雨燕360体育免费直播_雨燕360免费NBA直播_NBA篮球高清直播无插件-雨燕360体育直播 | 济南铝方通-济南铝方通价格-济南方通厂家-山东鲁方通建材有限公司 |