Timesten安装

Timesten安装

俩边防火墙一定要关闭

一 安装部分

  1. vi /etc//etc/redhat-release

Red Hat Enterprise Linux Server release 4.0 (Santiago)

  1. vi /etc/sysctl.conf
    kernel.sem = 250 32000 100 128

/sbin/sysctl -w net.ipv4.tcp_rmem=“4096 4194304 4194304”
/sbin/sysctl -w net.ipv4.tcp_wmem=“98304 4194304 4194304”
/sbin/sysctl -w net.ipv4.tcp_mem=“98304 4194304 4194304”
/sbin/sysctl -w net.core.rmem_default=65535
/sbin/sysctl -w net.core.wmem_default=65535
/sbin/sysctl -w net.core.rmem_max=4194304
/sbin/sysctl -w net.core.wmem_max=4194304
/sbin/sysctl -w net.ipv4.tcp_window_scaling=1

  1. install-package

    compat-libstdc++
    unixODBC-devel
    libaio-devel
    or
    libXp-devel

  2. 创建 tt 用户
    [root@server ~]# useradd ttadmin -g oinstall -G dba
    [root@server ~]# passwd ttadmin

5) 创建tt 目录
root 执行
mkdir /etc/TimesTen
chown ttadmin:oinstall /etc/TimesTen
mkdir /u01/tt
chown ttadmin:oinstall /u01/tt -R

  1. 拷贝 tt 安装文件到 /home/ttadmin 用户下

    root@dn2 timesten]# mv timesten112180.linux8664.tar.gz /home/ttadmin

7)授权
[root@dn2 timesten]# chown ttadmin:oinstall /home/ttadmin/timesten112180.linux8664.tar.gz

8)解压 包

[ttadmin@dn2 ~]$ tar -zxvf  timesten112180.linux8664.tar.gz 

9) 进入到解压出的目录

[ttadmin@dn2 ~]$ cd linux8664/

  1. install tt
    ./setup.sh

  2. Please choose an instance name for this installation? [ tt1121 ]
    敲击回车

    Please choose an instance name for this installation? [ tt1121 ]
    Instance name will be ‘tt1121’.
    Is this correct? [ yes ] yes

12)

[1] Client/Server and Data Manager
[2] Data Manager Only
[3] Client Only
   Which would you like to install? [ 1 ]
Of the following options :

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

Where would you like to install the tt1121 instance of TimesTen? [ 1 ] /u01/tt
/u01/tt not writable.
Where would you like to create the daemon home directory? [ /u01/tt/TimesTen/tt1121/info ]

The daemon logs will be located in /u01/tt/TimesTen/tt1121/info
Would you like to specify a different location for the daemon logs? [ no ]
Installing into /u01/tt/TimesTen/tt1121 …
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 53388.

Do you want to use the default port number for the TimesTen daemon? [ yes ]
敲击回车

14)
Restrict access to the the TimesTen installation to the group ‘oinstall’? [ yes ]
敲击回车

15) Would you like to enable PL/SQL for this instance? [ yes ]
   敲击回车

  1. Please enter a value for TNS_ADMIN (s=skip)? [ ] /u01/tt/TimesTen/tt1121/network/admin

    输入 /u01/tt/TimesTen/tt1121/network/admin

  2. What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 53389 ]
    敲击回车

  3. Installing server components …
    What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 53389 ]
    Do you want to install QuickStart and the TimesTen Documentation? [ no ] yes
    19) 其他的一路回车

  4. 安装成功之后显示如下
    Starting the daemon …
    TimesTen Daemon startup OK.
    End of TimesTen installation.

21)
可以通过命令来确定TimesTen是否已经启动。
[root@updba ~]# ps -ef|grep timesten
或tt安装用户下
[root@updba ~]# su - ttadmin
[ttadmin@updba ~]$ ttstatus

如果重启系统后需要手工或自动启动则如下处理
[root@updba ~]# su - ttadmin
[ttadmin@updba ~]$ ttdaemonadmin -h 可以看到操作参数
[ttadmin@updba ~]$ ttdaemonadmin -start 手工启动
[ttadmin@updba ~]$ ttdaemonadmin -stop 手工停止
22) tt自动启动配置
root下
[root@updba ~]# cd <$TT_HOME>/bin
[root@updba ~]# ./setuproot -install
按照提示即可完成自动启动配置

23) 编辑ttadmin .bash_profile

 export  TT_HOME=/u01/tt/TimesTen/tt1121
 export  PATH=$PATH:$HOME/bin:$TT_HOME/bin

 source .bash_profile
  1. 3.6 卸载
    卸载:
    $TT_HOME/bin/ttdaemonadmin -stop
    $TT_HOME/bin/setup.sh -uninstall
    或手工删除
    rm -rf $TT_HOME
    vi /etc/TimesTen/instance_info
    去掉需要删除的实例部分配置即可或直接删除/etc/TimesTen目录

  1. [ttadmin@dn2 ~]$ cd $TT_HOME/info
    vi sys.odbc.ini

[tt]
Driver=/u01/tt/TimesTen/tt1121/lib/libtten.so
DataStore=/u01/tt/TimesTen/tt1121/info/tt
PermSize=40
TempSize=32
Overwrite=0
PLSQL=1
DatabaseCharacterSet=AL32UTF8
PLSQL_TIMEOUT=0
Connections=30
ConnectionCharacterSet=AL32UTF8
PermSize=800
RecoveryThreads=8
TempSize=200
Preallocate=0
LogFileSize=512
CkptFrequency=600
LogBufMB=50
OraclenetServiceName=orcl
注意这里的网络连接服务名orcl必须在tnsnames.ora定义的

  1. 配置网络

cd $TT_HOME/network/admin
vi tnsnames.ora
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.140.61)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)

2) 检测 tt store 是否安装成功

[ttadmin@dn2 info]$ ttisql tt

 connect "DSN=tt";
 Connection successful: DSN=tt;UID=ttadmin;DataStore=/u01/tt/TimesTen/tt1121/info/tt;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;LogFileSize=512;DRIVER=/u01/tt/TimesTen/tt1121/lib/libtten.so;PermSize=40;TempSize=32;Connections=30;CkptFrequency=600;RecoveryThreads=8;TypeMode=0;PLSQL_TIMEOUT=0;OracleNetServiceName=orcl;LogBufMB=50;
 (Default setting AutoCommit=1)
 如上表示成功 

oracle
3) 权限问题
3.1 注意是在安装tt 那边的oracle 用户 拷贝文件
[oracle@dn2 ~]$ cd /u01/tt/TimesTen/tt1121/oraclescripts
scp grantCacheAdminPrivileges.sql initCacheGlobalSchema.sql 172.16.140.61:/home/oracle
3.2
在oracle 数据库那边 执行
create tablespace ttdb datafile ‘ O R A C L E B A S E / o r a d a t a / ORACLE_BASE/oradata/ ORACLEBASE/oradata/ORACLE_SID/ttdb01.dbf’ size 150M autoextend on;
SQL> @/home/oracle/initCacheGlobalSchema.sql “ttdb”

Please enter the tablespace where TIMESTEN user is to be created
The value chosen for tablespace is ttdb

******* Creation of TIMESTEN schema and TT_CACHE_ADMIN_ROLE starts *******

  1. Creating TIMESTEN schema
  2. Creating TIMESTEN.TT_GRIDID table
  3. Creating TIMESTEN.TT_GRIDINFO table
  4. Creating TT_CACHE_ADMIN_ROLE role
  5. Granting privileges to TT_CACHE_ADMIN_ROLE
    ** Creation of TIMESTEN schema and TT_CACHE_ADMIN_ROLE done successfully **

PL/SQL procedure successfully completed.

3.3     SQL>  create user ttm identified by oracle default tablespace ttdb;
        SQL>  @/home/oracle/grantCacheAdminPrivileges.sql "ttm"

The value chosen for administrator user id is ttm

***************** Initialization for cache admin begins ******************
0. Granting the CREATE SESSION privilege to TTM

  1. Granting the TT_CACHE_ADMIN_ROLE to TTM
  2. Granting the DBMS_LOCK package privilege to TTM
  3. Granting the RESOURCE privilege to TTM
  4. Granting the CREATE PROCEDURE privilege to TTM
  5. Granting the CREATE ANY TRIGGER privilege to TTM
  6. Granting the DBMS_LOB package privilege to TTM
  7. Granting the SELECT on SYS.ALL_OBJECTS privilege to TTM
  8. Granting the SELECT on SYS.ALL_SYNONYMS privilege to TTM
  9. Checking if the cache administrator user has permissions on the default
    tablespace
    No existing permission.
  10. Altering the cache administrator to grant unlimited tablespace on TTDB
  11. Granting the CREATE ANY TYPE privilege to TTM
    ********* Initialization for cache admin user done successfully *******

3.4 oracle 授权给ttm 用户可以管理
grant all on scott.emp to ttm;
grant all on scott.dept to ttm;
grant all on scott.salgrade to ttm;
grant all on scott.bonus to ttm;
grant dba to ttm;

TT
3.5 tt 端
[root@dn2 /]# su - ttadmin
[ttadmin@dn2 ~]$ ttisql tt

Command> create user ttm identified by uplooking;
Command> grant create session,cache_manager,create any table,drop any table to ttm;
Command> create user scott identified by tiger;
Command> grant create session,create any table to scott;
Command> exit

3.6
[ttadmin@dn2 ~]$ ttisql “dsn=tt;uid=ttm;pwd=uplooking;oraclepwd=oracle”

Command> call ttcacheuidpwdset(‘ttm’,‘oracle’);
Command> call ttgridcreate(‘testgrid’);
Command> call ttgridnameset(‘testgrid’);

oracle
3.7 oracle 端
[oracle@updba ~]$ sqlplus scott/tiger
SQL> alter table salgrade modify(grade primary key not null);

TT
3.8 tt 端
[ttadmin@updba ~]$ ttisql “dsn=tt;uid=ttm;pwd=uplooking;oraclepwd=oracle”
Command>call ttcachestart;
ttcachestart实现数据库数据到内存从而达到高速缓存的目的
Command>drop cache group t1;
Command>create readonly cache group t1
autorefresh interval 5 seconds mode incremental
from
scott.salgrade(
grade number primary key,
losal number,
hisal number );

3.9 Command> load cache group t1 commit every 10 rows;

1.10 ttisql “dsn=tt;uid=scott;pwd=tiger;oraclepwd=tiger”
Command> tables;

select * from salegrade;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值