3.运行/usr/local/Calpont/bin/postConfigure,执行安装后配置,这一步是必须的。主要用于初始化InfiniDB数据库,以及将后台服务进程加入/etc/init.d/,令数据库随系统重启自动启动。
[root@redflag11012601 app]# /usr/local/Calpont/bin/postConfigure
This is the Calpont InfiniDB System Configuration and Installation tool.
It will Configure the Calpont InfiniDB System based on user inputs and
will perform a Package Installation of all of the Servers within the
System that is being configured.
IMPORTANT: This tool should only be run on the Parent OAM Module
which is either a Management Module #1 or a Performance Module.
Instructions:
Press 'enter' to accept a value in (), if available or
Enter one of the options within [], if available, or
Enter a new value
Select the type of server install [1=single, 2=multi] (2) > 1
Performing a Single Server Install.
A copy of the InfiniDB Configuration file has been saved during Package install.
You have an option of utilizing the configuration data from that file or starting
with the InfiniDB Configuration File that comes with the InfiniDB Package.
Do you want to utilize the configuration data from the saved copy? [y,n] > y
===== Setup Data Storage Mount Configuration =====
Enter InfiniDB Data Storage Mount Type [storage,local] (local) >
Enter the Number of InfiniDB Data Storage (DBRoots) areas (1) >
Setting Max Memory Settings to 25% of total memory. Value set to 16G
Running the Infinidb MySQL setup scripts
Starting MySQL.[确定]
Shutting down MySQL.[确定]
Starting MySQL.[确定]
Shutting down MySQL.[确定]
Starting Calpont InfiniDB Database Platform
Starting MySQL.[确定]
Please wait......... DONE
Creating System Catalog.. DONE
InfiniDB Install Successfully Completed
Enter the following command to define InfiniDB Alias Commands
. /usr/local/Calpont/bin/calpontAlias
Enter 'idbmysql' to access the mysqld console
Enter 'cc' to access the InfiniDB OAM console
This is the Calpont InfiniDB System Configuration and Installation tool.
It will Configure the Calpont InfiniDB System based on user inputs and
will perform a Package Installation of all of the Servers within the
System that is being configured.
IMPORTANT: This tool should only be run on the Parent OAM Module
which is either a Management Module #1 or a Performance Module.
Instructions:
Press 'enter' to accept a value in (), if available or
Enter one of the options within [], if available, or
Enter a new value
Select the type of server install [1=single, 2=multi] (2) > 1
Performing a Single Server Install.
A copy of the InfiniDB Configuration file has been saved during Package install.
You have an option of utilizing the configuration data from that file or starting
with the InfiniDB Configuration File that comes with the InfiniDB Package.
Do you want to utilize the configuration data from the saved copy? [y,n] > y
===== Setup Data Storage Mount Configuration =====
Enter InfiniDB Data Storage Mount Type [storage,local] (local) >
Enter the Number of InfiniDB Data Storage (DBRoots) areas (1) >
Setting Max Memory Settings to 25% of total memory. Value set to 16G
Running the Infinidb MySQL setup scripts
Starting MySQL.[确定]
Shutting down MySQL.[确定]
Starting MySQL.[确定]
Shutting down MySQL.[确定]
Starting Calpont InfiniDB Database Platform
Starting MySQL.[确定]
Please wait......... DONE
Creating System Catalog.. DONE
InfiniDB Install Successfully Completed
Enter the following command to define InfiniDB Alias Commands
. /usr/local/Calpont/bin/calpontAlias
Enter 'idbmysql' to access the mysqld console
Enter 'cc' to access the InfiniDB OAM console
如果执行脚本出现错误,需要解决错误后,关闭数据库后台服务进程再执行上述脚本。
[root@redflag11012601 app]# /etc/init.d/infinidb stop
Shutting down Calpont InfiniDB Database Platform
Shutting down Calpont InfiniDB Database Platform
如果执行配置脚本无误,运行产生别名的脚本,便于用户执行各种管理命令。
[root@redflag11012601 app]# . /usr/local/Calpont/bin/calpontAlias
[root@redflag11012601 app]# idbmysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.39 MySQL Embedded / Calpont InfiniDB Enterprise 2.0.3-4 GA (Commercial)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
[root@redflag11012601 app]# idbmysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.39 MySQL Embedded / Calpont InfiniDB Enterprise 2.0.3-4 GA (Commercial)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
InfiniDB无法直接改变数据的存储位置,但安装文档指出在Linux系统中可以将/usr/local/Calpont/下的data1目录挂载(mount)到外部存储,实际上也可以用软连接(ln -s)指向一个空闲空间较多的分区。利用软连接的操作步骤如下:
1)在安装完InfiniDB数据库软件,尚未配置之前将安装目录下的data1目录的内容移动到另一个空闲目录下。
[root@redflag11012601 app]# cd /usr/local/Calpont
[root@redflag11012601 Calpont]# mv data1/* /user1/caldata/
[root@redflag11012601 Calpont]# ll data1
总计 0
[root@redflag11012601 Calpont]# ll /user1/caldata/
总计 4
drwxrwxrwt 4 root root 4096 02-12 18:45 systemFiles
[root@redflag11012601 Calpont]# mv data1/* /user1/caldata/
[root@redflag11012601 Calpont]# ll data1
总计 0
[root@redflag11012601 Calpont]# ll /user1/caldata/
总计 4
drwxrwxrwt 4 root root 4096 02-12 18:45 systemFiles
2)删除这个data1目录,并创建一个同名的软连接
[root@redflag11012601 Calpont]# rmdir data1
[root@redflag11012601 Calpont]# ln -s /user1/caldata /usr/local/Calpont/data1
[root@redflag11012601 Calpont]# ll
总计 44
drwxr-xr-x 2 root root 4096 02-12 18:45 bin
drwxr-xr-x 3 root root 4096 02-12 18:45 data
lrwxrwxrwx 1 root root 14 02-12 18:51 data1 -> /user1/caldata
drwxrwxrwt 2 root root 4096 02-12 18:45 etc
drwxr-xr-x 2 root root 4096 02-12 18:45 lib
drwxr-xr-x 2 root root 4096 02-12 18:45 local
drwxr-xr-x 6 root root 4096 02-12 18:45 mysql
drwxr-xr-x 2 root root 4096 02-12 18:45 post
-rw-r--r-- 1 root root 78 02-03 09:19 releasenum
drwxr-xr-x 2 root root 4096 02-12 18:45 sbin
drwxr-xr-x 3 root root 4096 02-12 18:45 share
drwxr-xr-x 3 root root 4096 02-12 18:45 tools
[root@redflag11012601 Calpont]# ln -s /user1/caldata /usr/local/Calpont/data1
[root@redflag11012601 Calpont]# ll
总计 44
drwxr-xr-x 2 root root 4096 02-12 18:45 bin
drwxr-xr-x 3 root root 4096 02-12 18:45 data
lrwxrwxrwx 1 root root 14 02-12 18:51 data1 -> /user1/caldata
drwxrwxrwt 2 root root 4096 02-12 18:45 etc
drwxr-xr-x 2 root root 4096 02-12 18:45 lib
drwxr-xr-x 2 root root 4096 02-12 18:45 local
drwxr-xr-x 6 root root 4096 02-12 18:45 mysql
drwxr-xr-x 2 root root 4096 02-12 18:45 post
-rw-r--r-- 1 root root 78 02-03 09:19 releasenum
drwxr-xr-x 2 root root 4096 02-12 18:45 sbin
drwxr-xr-x 3 root root 4096 02-12 18:45 share
drwxr-xr-x 3 root root 4096 02-12 18:45 tools
3)执行安装后配置
[root@redflag11012601 Calpont]# cd bin
[root@redflag11012601 bin]# ./postConfigure
[root@redflag11012601 bin]# ./postConfigure
注意:如果数据库已经配置过并创建了新的内容,需要关闭数据库才能进行移动操作,但不建议这么做,如果操作失误,可能导致启动失败或数据丢失。尽量在数据库安装阶段就规划好磁盘分布。