ITPub博客

首页 > Linux操作系统 > Linux操作系统 > timesten系列二:如何安装timesten

timesten系列二:如何安装timesten

原创 Linux操作系统 作者:wzy25 时间:2019-02-19 08:00:05 0 删除 编辑
imesten支持在linux,unix,windows上面运行,最新的版本是 7.0.5 ,下面我们将以在
oracle enterprise linux 5.0 上面为例说明如何安装 timesten,真的很简单,比装oracle简单

安装目录 /oracle/timesten
操作系统版本 oracle enterprise linux 5.0 32bit
需要把SELINUX关闭
timesten instance名字为tt70

1.修改内核参数
修改/etc/sysctl.conf文件,加上如下列
kernel.shmmax=2147483648
kernel.sem = "250 32000 128 100"
net.ipv4.tcp_rmem="4096 4194304 4194304"
net.ipv4.tcp_wmem="98304 4194304 4194304"
net.ipv4.tcp_mem="98304 4194304 4194304"
net.core.rmem_default=65535
net.core.wmem_default=65535
net.core.rmem_max=4194304
net.core.wmem_max=4194304
net.ipv4.tcp_window_scaling=1
net.ipv4.ip_local_port_range="1024 65000"
然后执行 sysctl -p ,使修改生效

2.为了能够连接到oracle做同步,请安装oracle 10.2的客户端
oracle以oracle用户,dba组安装
3.添加用户
useradd -g dba -u 505 timesten
4.用root用户登陆os
然后执行下面的操作,为timesten保存安装信息用
mkdir /etc/TimesTen
chmod 775 /etc/TimesTen
chgrp timesten /etc/TimesTen
5.设置用户.bash_profile
export CLASSPATH=/oracle/timesten/TimesTen/tt70/lib/ttjdbc14.jar:$CLASSPATH
export PATH=/oracle/timesten/TimesTen/tt70/bin:$PATH
export ORACLE_HOME=/oracle/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/oracle/timesten/TimesTen/tt70/lib:$LD_LIBRARY_PATH
注意:LD_LIBRARY_PATH 一定要包含上面的几个目录,否则cache 会出问题

下载地址 :
http://download.oracle.com/otn/t ... 0500.linux86.tar.gz
然后 解开 timesten安装包
tar xvzf timesten70500.linux86.tar.tar

cd linux86/
./setup.sh

后面会提示输入路径,名称,端口等,一路回车,就ok了,具体的安装提示,请看下面:

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? [ tt70 ]
Instance name will be 'tt70'.
Is this correct? [ yes ]

Please select a product :

[1] Oracle TimesTen In-Memory Database
[2] Oracle In-Memory Database Cache

Which product would you like to install? [ 1 ]

Of the three components:

[1] Client/Server and Data Manager
[2] Data Manager Only
[3] Client Only

Which would you like to install? [ 1 ]
Where would you like to install the tt70 instance of TimesTen? [ /home/timesten ] /oracle/timesten
The directory /oracle/timesten does not exist.
Do you want to create it? [ yes ]
Where would you like to create the daemon home directory? [ /oracle/timesten/TimesTen/tt70/info ]
The directory /oracle/timesten/TimesTen/tt70/info does not exist.
Do you want to create it? [ yes ]
Installing into /oracle/timesten/TimesTen/tt70 ...
Uncompressing ...


The TimesTen Demo applications can take up to 64 Mbytes of disk space.
Depending on how your system is configured, you may not want to create the
DemoDataStore directory in the default location,
/oracle/timesten/TimesTen/tt70/info/DemoDataStore

Where would you like to create the DemoDataStore directory? [ /oracle/timesten/TimesTen/tt70/info ]
Creating /oracle/timesten/TimesTen/tt70/info/DemoDataStore ...

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 17000.

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

Processing /oracle/timesten/TimesTen/tt70/PERL/perl.tar ...

Would you like to enable datastore access control? [ no ]
The daemon logs will be located in /oracle/timesten/TimesTen/tt70/info
Would you like to specify a different location for the daemon logs? [ no ]

NOTE: It appears that you are running version 4.1 of the g++
compiler. TimesTen ships with multiple sets of client libraries and server
binaries : one built with g++ 3.2.3, one with g++ 3.4.6, and one with
g++ 4.1.0. The installer has created links to the 4.1.0 library in the
/lib directory and to the 4.1.0 server binary in the
/bin directory. If you want to use a different compiler,
please modify the links to point to the desired library and server binary.

Installing server components ...
Would you like to log all server Connects/Disconnects? [ yes ]
What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 17002 ]
Starting the daemon ...
TimesTen Daemon startup OK.

Installing client components ...
What is the name of the host running the TimesTen server? [ rac01 ]
What is the TCP/IP port number that the TimesTen server is listening on? [ 17002 ]
What is the name of the instance running the TimesTen server? [ tt70 ]
Creating new /oracle/timesten/TimesTen/tt70/info/sys.ttconnect.ini
Extracting 3rd party tools ...
Would you like to install the documentation? [ yes ] no
Documentation not installed.
To manually install the documentation, run the command 'setup.sh -installDoc'


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

Run the script '/oracle/timesten/TimesTen/tt70/bin/setuproot' as root.
This will move the TimesTen startup script into its appropriate location.

The startup script is currently located here :
'/oracle/timesten/TimesTen/tt70/startup/tt_tt70'.

End of TimesTen installation.

为了添加随着OS启动而启动timesten daemon的脚本,需要按照提示,用root用户执行下面的脚本:
/oracle/timesten/TimesTen/tt70/bin/setuproot

很简单,就完成了安装了,看看timesten启动之后的进程情况:

ps -ef |grep timesten
timesten 2200 1 0 18:45 ? 00:00:00 /oracle/timesten/TimesTen/tt70/bin/timestend -initfd 13
timesten 2203 2200 0 18:45 ? 00:00:00 /oracle/timesten/TimesTen/tt70/bin/timestensubd
timesten 2204 2200 0 18:45 ? 00:00:00 /oracle/timesten/TimesTen/tt70/bin/timestensubd
timesten 2205 2200 0 18:45 ? 00:00:00 /oracle/timesten/TimesTen/tt70/bin/timestensubd
timesten 2206 2200 0 18:45 ? 00:00:00 /oracle/timesten/TimesTen/tt70/bin/timestensubd
timesten 2208 2200 0 18:45 ? 00:00:00 /oracle/timesten/TimesTen/tt70/bin/ttcserver

系统安装完成之后,会有一个缺省的data store(这个概念和oracle的schema概念差不多),叫 TpcbData_tt70
我们现在就连接到这个data store来看看,看看timesten工作是否正常。

ttIsql TpcbData_tt70 (注释:ttIsql 是一个和oracle sqlplus差不多的命令行交互控制工具)

[timesten@rac01 info]$ ttIsql TpcbData_tt70

Copyright (c) 1996-2008, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.



connect "DSN=TpcbData_tt70";
Connection successful: DSN=TpcbData_tt70;UID=timesten;DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/TpcbData;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;WaitForConnect=0;DRIVER=/oracle/timesten/TimesTen/tt70/lib/libtten.so;Authenticate=0;PermSize=16;TypeMode=0;
(Default setting AutoCommit=1)
Command> tables;
SYS.CACHE_GROUP
SYS.COLUMNS
SYS.COLUMN_HISTORY
SYS.COL_STATS
SYS.DUAL
SYS.INDEXES
SYS.MONITOR
SYS.OBJ_ACC_RIGHT
SYS.PLAN
SYS.SEQUENCES
SYS.SYNONYMS
SYS.SYS_ACC_RIGHT
SYS.TABLES
SYS.TABLE_HISTORY
SYS.TBL_STATS
SYS.TCOL_STATS
SYS.TINDEXES
SYS.TRANSACTION_LOG_API
SYS.TTABLES
SYS.TTBL_STATS
SYS.USERS
SYS.VIEWS
SYS.XLASUBSCRIPTIONS
TTREP.REPELEMENTS
TTREP.REPLICATIONS
TTREP.REPNETWORK
TTREP.REPPEERS
TTREP.REPSTORES
TTREP.REPSUBSCRIPTIONS
TTREP.REPTABLES
TTREP.TTSTORES
31 tables found.


在来做一个创建表的测试

Command> create table test(id number(2));
Command> insert into test values(1);
1 row inserted.
Command> commit;
Command> select * from test;
< 1 >
1 row found.

TT的语法和oracle几乎是一样的,特别是dml和ddl,所以,如果有oracle的基础,就很容易了。

ok,TT工作正常,安装顺利结束。

如何启动停止timesten呢?(以后就简称timesten为TT)
启动TT
ttDaemonAdmin -start
停止TT
ttDaemonAdmin -stop

TT的所有配置文件都放在 install_dir/info目录下
TT产生的日志也都在 install_dir/info

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/3618/viewspace-485591/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2001-12-14

  • 博文量
    1011
  • 访问量
    764867