Red Hat TimesTen安装记录

1:内核参数修改

# vi /etc/sysctl.conf
kernel.sem=350 32000 100 128

#sysctl –p

备注:此安装过程为测试环境,具体参数修改要参考TimesTen官方文档。

2:创建用户及组信息

[root@nxjs05 wzh]# groupadd timesten
[root@nxjs05 wzh]# useradd timesten -g timesten -G timesten
[root@nxjs05 wzh]# passwd timesten
Changing password for user timesten.
New password: 
BAD PASSWORD: it is based on a dictionary word
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@nxjs05 wzh]#    

密码为:timesten

3:Huge pages设置

# id -g timesten
505
# vi /etc/sysctl.conf
vm.nr_hugepages = 2560
vm.hugetlb_shm_group = 505
# sysctl -p

备注:此安装过程为测试环境,具体参数修改要参考TimesTen官方文档。

4:设置memlock参数

# vi /etc/security/limits.conf
timesten soft   memlock    5242880
timesten hard   memlock    5242880
---
5G*1024*1024
重启

5:下面操作请在Timesten安装完成后用timesten用户进行操作

 

[timesten@nxjs05 info]$ vi ttendaemon.options 
# Commented values are default values
#-supportlog /opt/Timesten/TimesTen/wzhkfcs/info/ttmesg.log
#-maxsupportlogfiles 10
#-maxsupportlogsize 10485760
#-userlog /opt/Timesten/TimesTen/wzhkfcs/info/tterrors.log
#-maxuserlogfiles 10
#-maxuserlogsize 0x100000
#
-verbose
#-tns_admin
-server 53397
-linuxLargePageAlignment 2

[timesten@nxjs05 info]$ ttdaemonadmin -stop
TimesTen Daemon stopped.

[timesten@nxjs05 info]$ ttdaemonadmin -start
TimesTen Daemon startup OK.

[timesten@nxjs05 info]$ ttstatus
TimesTen status report as of Mon Nov 16 19:54:40 2015

Daemon pid 3186 port 53396 instance wzhkfcs
TimesTen server pid 3195 started on port 53397
------------------------------------------------------------------------
Accessible by group timesten
End of report
[timesten@nxjs05 info]$

 

6:文件设置

# mkdir /etc/TimesTen
# chgrp –R timesten /etc/TimesTen
# chmod 775 /etc/Timesten/
# mkdir  -p  /opt/ttdata/logs
#mkdir   -p  /opt/ttdata/database
# chown –R timesten:timesten /opt/

  安装前若不作此操作,在安装过程中也会提示让你去创建/etc/TimesTen,另外的文件目录则为安装规范,安装的时候指定安装到该目录下。

 

7:环境变量设置

切换到timesten用户下:
$ cd
$ vi .bash_profile
export
CLASSPATH=/opt/Timesten/TimesTen/wzhkfcs/lib/ttjdbc14.jar:$CLASSPATH
export
PATH=/opt/Timesten/TimesTen/ wzhkfcs /bin:$PATH
export
LD_LIBRARY_PATH=/opt/Timesten/TimesTen/ wzhkfcs /lib:$LD_LIBRARY_PATH

保存,退出。wzhkfcs为实例名称
$source .bash_profile

8:安装

# su –timesten
$ cd /opt/linux8664
$ ./setup.sh 
NOTE: Each TimesTen installation is identified by a unique instance name.
      The instance name must be a non-null alphanumeric string, not longer
      than 255 characters.
Please choose an instance name for this installation? [ tt1122 ] wzhkfcs
Instance name will be 'wzhkfcs'. Is this correct? [ yes ]

说明:
此处输入你的Timesten的实例名,这里需要注意的是Timesten的实例名和oracle的实例名并不一样,在Timesten中一个Timesten软件只能有一个实例名。如果想要在一台机器上创建多个实例则需要安装多个Timesten软件。

Which would you like to install? [ 1 ] 

Of the following options :

  [1] /home/timesten
  [2] /opt
  [3] Specify a location
  [q] Quit the installation

Where would you like to install the wzhkfcs instance of TimesTen? [ 1 ] 3
Please specify a directory to install TimesTen? [ /home/timesten ] /opt/Timesten
The directory /opt/Timesten does not exist.
Do you want to create it? [ yes ] yes
Where would you like to create the daemon home directory? [ /opt/Timesten/TimesTen/wzhkfcs/info ] 

The daemon logs will be located in /opt/Timesten/TimesTen/wzhkfcs/info
Would you like to specify a different location for the daemon logs? [ no ] 
Installing into /opt/Timesten/TimesTen/wzhkfcs ...
Uncompressing ...

NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
      daemon port number must be the same across all TimesTen installations
      managed within the same Oracle Clusterware cluster.

NOTE: All installations that replicate to each other must use the same daemon
      port number that is set at installation time. The daemon port number can
      be verified by running 'ttVersion'.

The default port number is 53396.

Do you want to use the default port number for the TimesTen daemon? [ yes ]
The daemon will run on the default port number (53396).

NOTE: For security, we recommend that you restrict access to the
      TimesTen installation to members of a single OS group. Only members of
      that OS group will be allowed to perform direct mode connections to
      TimesTen, and only members of that OS group will be allowed to perform
      operations that access TimesTen data stores, TimesTen files and shared
      memory. The OS group defaults to the primary group of the instance
      administrator. You can default to this group, choose another OS group
      or you can make this instance world-accessible. If you choose to make
      this instance world-accessible, all database files and shared memory
      are readable and writable by all users.

Restrict access to the the TimesTen installation to the group 'timesten'? [ yes ]

说明:为Timesten建立监听端口和选择用户组,这里默认为timesten用户组。


NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries.

Would you like to enable PL/SQL for this instance? [ yes ] 

In order to use the 'Oracle TimesTen Application-Tier Database Cache' feature in any databases
created within this installation, you must set a value for the TNS_ADMIN
environment variable. It can be left blank, and a value can be supplied later
using <install_dir>/bin/ttModInstall.

Please enter a value for TNS_ADMIN (s=skip)? [  ] s

Installing server components ...
What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 53397 ]

说明:这里是在Cache connect to oracle的时候timesten需要通过tns_admin来识别connect的ORACLE地址,由于timesten的tnsname.ora和oracle的通用,所以我们这里选择跳过,等装完后将ORACLE的TNSNAME.ORA复制过来即可。

Do you want to install the Quick Start Sample Programs and the TimesTen Documentation? [ no ] 
Would you like to install the documentation (without the Quick Start Sample Programs)? [ yes ] no
Installing client components ...

Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] 

NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.

Run the 'setuproot' script :
        cd /opt/Timesten/TimesTen/wzhkfcs/bin
        ./setuproot -install
This will move the TimesTen startup script into its appropriate location.

The startup script is currently located here :
  '/opt/Timesten/TimesTen/wzhkfcs/startup/tt_wzhkfcs'.

The documentation was not installed.
To manually install the documentation, run the command 'setup.sh -installDoc'

The 11.2.2.8 Release Notes are located here :
  '/opt/Timesten/TimesTen/wzhkfcs/README.html'

Starting the daemon ...
TimesTen Daemon startup OK.
End of TimesTen installation.
[timesten@nxjs05 linux8664]$

说明:不使用Oracle Clusterware,按默认值no回车,然后使用root用户运行所提示的脚本,这样就完成安装了。


[root@nxjs05 bin]# ./setuproot -install
$* is no longer supported at ./setuproot line 260.
Would you like to install the TimesTen daemon startup scripts into /etc/init.d? [ yes ] 
Copying /opt/Timesten/TimesTen/wzhkfcs/startup/tt_wzhkfcs to /etc/init.d

Successfully installed the following scripts :
/etc/init.d/tt_wzhkfcs
/etc/rc.d/rc0.d/K45tt_wzhkfcs
/etc/rc.d/rc1.d/K45tt_wzhkfcs
/etc/rc.d/rc2.d/S90tt_wzhkfcs
/etc/rc.d/rc3.d/S90tt_wzhkfcs
/etc/rc.d/rc5.d/S90tt_wzhkfcs
/etc/rc.d/rc6.d/K45tt_wzhkfcs

[root@nxjs05 bin]#

9:创建Timesten数据库

(1) 配置sys.odbc,ini参数

/opt/Timesten/TimesTen/wzhkfcs/info 
[timesten@nxjs05 info]$ vi sys.odbc.ini 
[ODBC Data Sources]
wzhkfcs=TimesTen 11.2.2 Driver

说明:在ODBC数据源处添加你所需要建立的Timesten的dsn名称。


[wzhkfcs]
Driver=/opt/Timesten/TimesTen/wzhkfcs/lib/libtten.so
DataStore=/opt/ttdata/database/wzhkfcs
LogDir=/opt/ttdata/logs/wzhkfcs
PermSize=1500
TempSize=150
PLSQL=1
ConnectionCharacterSet=AL32UTF8
DatabaseCharacterSet=AL32UTF8

#OracleNetServiceName=
#OracleId=

说明:在/oradata/ttdata/sys.odbc.ini配置文件中添加相应dsn名称的配置参数:
Driver的参数可以直接拷贝Timesten给的实例中的内容
DataStore则是存放ckpt文件以的路径(确认已经创建路径所对应的目录文件)
LogDir是存放Timesten的错误日志以及log文件的路径(确认已经创建路径所对应的目录文件)
PermSize是Timesten所需要使用的永久内存大小,单位为M
TempSize是Timesten所需要使用的临时内存大小,一般为PermSize的八分之一或者十分之一。也可以按官方文档的公式来计算:
PermSize is less than 64 MB
TempSize = 32 MB + ceiling(PermSize / 4 MB)
Otherwise
TempSize = 40 MB + ceiling(PermSize / 8 MB)

ConnectionCharacterSet是在与Oracle进行连接的时候需要用到的,应与所连接的Oracle服务器的自己保持相同。
DatabaseCharacterSet是Timesten数据库的字符集,如果要有当cache的打算也应与对应的oracle数据库保持一样的字符集
OracleNetServiceName是tnsname.ora中的servicename,用来连接对应oracle数据库
OracleId是Cache的Oracle数据库的实例名

(2) 创建和启动数据库

[timesten@nxjs05 info]$ ttisql wzhkfcs

Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
connect "DSN=wzhkfcs";
Connection successful: DSN=wzhkfcs;UID=timesten;DataStore=/opt/ttdata/database/wzhkfcs;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;DRIVER=/opt/Timesten/TimesTen/wzhkfcs/lib/libtten.so;LogDir=/opt/ttdata/logs/wzhkfcs;PermSize=1500;TempSize=150;TypeMode=0;
(Default setting AutoCommit=1)
Command>

(3)创建用户

Command>create user test identified by test;
Command>grant create table,connect,create view,admin,cache_manager to test;

 

posted @ 2015-11-30 20:00  yshy  阅读(349)  评论(0编辑  收藏  举报