参考

Complete example for installing and uninstalling TimesTen Classic

概述

TimesTen 18.1.2.1版是首个兼容TimesTen Classic模式的安装包。Release Notes是这么说的:

This release supports Classic TimesTen In-Memory Database, in addition to TimesTen Scaleout.

Oracle Blogs里是这么说的:

One Download, Two Products …

也就是说一个介质中包含了两种类型的安装方式,此版本详细的新特性请见此PPT。

安装文档请参Oracle Docs中的Installation, Migration, and Upgrade Guide。

介质下载

从Oracle网站下载,版本选择Linux
Edelivery上也有,主要搜索关键字为“Oracle TimesTen In-Memory Database”。
此介质的MD5SUM为:7b5fc2f506a89f8560b503cb61774841

准备操作系统

操作系统的支持以Linux为主,详见下图:

本例中使用Oracle Linux 7。

如果使用VagrantBox,可使用以下的Vagrantfile,如果不是请忽略。

Vagrant.configure("2") do |config|config.vm.provider :virtualbox do |vb|vb.name = "tt18121"vb.memory = 2048vb.cpus = 2endconfig.vm.box = "ol7-latest"config.vm.hostname = "tt18121"config.vm.network "private_network", ip: "192.168.0.11"
end

用户,组设定

假定用户oracle为实例管理员,假定timesten为TimesTen 用户组,命令如下:

sudo groupadd -g 10000 timesten
sudo useradd -u 55000 -g timesten oracle
sudo passwd oracle

查看用户:

$ id oracle
uid=55000(oracle) gid=10000(timesten) groups=10000(timesten)

为方便,本例赋予实例管理员用户sudo,虽然这不是必需的:

sudo usermod -aG wheel oracle

目录设定

规划如下:

  • 安装文件位于/u01/installation (安装文件不是安装介质,指TimesTen术语installation)
  • 数据库文件位于/u01/database,数据和日志文件分布位于其下的data和log目录
    命令如下:
sudo mkdir -p /u01/installation
sudo mkdir -p /u01/database/data
sudo mkdir -p /u01/database/log
sudo chown oracle:timesten /u01/installation
sudo chown -R oracle:timesten /u01/database

创建安装

切换到实例管理员用户,本例为oracle。

su - oracle

创建安装:

unzip -d /u01/installation/ /vagrant/timesten181210.server.linux8664.zip

查看安装目录:

$ cd /u01/installation/
$ ls
tt18.1.2.1.0
$ cd tt18.1.2.1.0/
$ ll
total 96
dr-xr-x---. 3 oracle timesten    51 Feb 18 20:56 3rdparty
dr-xr-x---. 2 oracle timesten  4096 Feb 18 20:56 bin
dr-xr-x---. 4 oracle timesten    31 Feb 18 20:56 grid
dr-xr-x---. 3 oracle timesten  4096 Feb 18 20:56 include
dr-xr-x---. 2 oracle timesten  4096 Feb 18 20:56 info
dr-xr-x---. 3 oracle timesten  4096 Feb 18 20:56 lib
dr-xr-x---. 3 oracle timesten    19 Feb 18 20:56 network
dr-xr-x---. 3 oracle timesten    18 Feb 18 20:56 nls
dr-xr-x---. 2 oracle timesten  4096 Feb 18 20:56 oraclescripts
dr-xr-x---. 4 oracle timesten    40 Feb 18 20:56 PERL
dr-xr-x---. 7 oracle timesten    68 Feb 18 20:56 plsql
-r--r-----. 1 oracle timesten 76902 Feb 18 20:56 README.html
dr-xr-x---. 2 oracle timesten    26 Feb 18 20:56 startup
dr-xr-x---. 2 oracle timesten    90 Feb 18 20:56 support
dr-xr-x---. 3 oracle timesten    32 Feb 18 20:56 ttoracle_home
$ du -sh .
1.3G    .

验证安装:

cd /u01/installation/tt18.1.*/bin
unset TIMESTEN_HOME
./ttInstallationCheck
```exit
注意,需要unset环境变量是为防止ttInstallationCheck命令检查$TIMESTEN_HOME目录。
当然也可以直接指定安装目录,例如:
```bash
$ ./ttInstallationCheck
This installation has been verified.$ ./ttInstallationCheck -install_dir /u01/installation/tt18.1.4.1.0/This installation has been verified.

创建classic实例

一路回车,只有设置TNS_ADMIN 时输入s。

$ ./ttInstanceCreateNOTE: Each TimesTen instance is identified by a unique name.The instance name must be a non-null alphanumeric string, not longerthan 255 characters.Please choose an instance name for this installation? [ tt181 ]
Instance name will be 'tt181'.
Is this correct? [ yes ]
Where would you like to install the tt181 instance of TimesTen? [ /home/oracle ]
Creating instance in /home/oracle/tt181 ...
INFO: Mapping files from the installation to /home/oracle/tt181/installNOTE: If you are configuring TimesTen for use with Oracle Clusterware, thedaemon port number must be the same across all TimesTen installationsmanaged within the same Oracle Clusterware cluster.NOTE: All installations that replicate to each other must use the same daemonport number that is set at installation time. The daemon port number canbe verified by running 'ttVersion'.The default port number is 6624.Do you want to use the default port number for the TimesTen daemon? [ yes ]
The daemon will run on the default port number (6624).In order to use the '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/ttInstanceModify.Please enter a value for TNS_ADMIN (s=skip)? [  ] s
What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 6625 ]Would you like to use TimesTen Replication with Oracle Clusterware? [ no ]NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.The startup script is located here :'/home/oracle/tt181/startup/tt_tt181'Run the 'setuproot' script :/home/oracle/tt181/bin/setuproot -install
This will move the TimesTen startup script into its appropriate location.The 18.1 Release Notes are located here :'/u01/installation/tt18.1.2.1.0/README.html'Starting the daemon ...
TimesTen Daemon (PID: 5640, port: 6624) startup OK.

以上为实例的完全安装,如果只想安装客户端可以运行一下命令:

./ttInstanceCreate -clientonly

环境变量设置

执行以下命令,注意不是粘贴到.bash_profile文件中:

echo 'export TIMESTEN_HOME=~/tt181' >> ~/.bash_profile
echo '. $TIMESTEN_HOME/bin/ttenv.sh' >> ~/.bash_profile
source ~/.bash_profile

然后验证实例状态:

$ ttversion
TimesTen Release 18.1.2.1.0 (64 bit Linux/x86_64) (tt181:6624) 2019-02-18T19:19:18ZInstance admin: oracleInstance home directory: /home/oracle/tt181Group owner: timestenDaemon home directory: /home/oracle/tt181/infoPL/SQL enabled.

查看实例配置文件:

$ cat $TIMESTEN_HOME/conf/timesten.conf
# TimesTen Instance Configuration File
# Created by ttInstanceCreate
# Commented values are default values
hostname=ol7-vagrant
timesten_release=18.1.2
instance_name=tt181
daemon_port=6624
server_port=6625
admin_user=oracle
admin_uid=55000
group_name=timesten
instance_guid=B1E7F2DE-1383-4100-A9E2-6B8E15BED96D
verbose=1

为日志文件记录添加日期

默认的日志文件记录只输出时间,没有日期。
修改文件timesten.conf:

 vi $TIMESTEN_HOME/conf/timesten.conf

添加以下行:

show_date=1

重启Daemon生效:

$ ttdaemonadmin -restart
TimesTen Daemon (PID: 13264, port: 6624) stopped.
TimesTen Daemon (PID: 13425, port: 6624) startup OK.

验证:

tail  $TIMESTEN_HOME/diag/ttmesg.log
...
2019-04-22 14:42:55.432 Info:    : 13425: << Date : Mon Apr 22 14:42:55 2019, daemon port 6624 >>
2019-04-22 14:42:56.432 Info:    : 1342 ...

设置实例开机自动启动

是可选的设置(需要用户有sudo权限,否则记录TIMESTEN_HOME环境变量后,用root执行)。

sudo TIMESTEN_HOME=$TIMESTEN_HOME -s
cd $TIMESTEN_HOME/bin
./setuproot -install -force

输出如下:

[root@ol7-vagrant bin]# ./setuproot -install -force
Copying /home/oracle/tt181/startup/tt_tt181 to /etc/init.dSuccessfully installed the following scripts :
/etc/init.d/tt_tt181
/etc/rc.d/rc0.d/K45tt_tt181
/etc/rc.d/rc1.d/K45tt_tt181
/etc/rc.d/rc2.d/S90tt_tt181
/etc/rc.d/rc3.d/S90tt_tt181
/etc/rc.d/rc5.d/S90tt_tt181
/etc/rc.d/rc6.d/K45tt_tt181

重启机器验证实例已自动启动:

$ ttstatus
TimesTen status report as of Mon Apr 22 04:14:00 2019Daemon pid 3072 port 6624 instance tt181
TimesTen server pid 3079 started on port 6625
------------------------------------------------------------------------
------------------------------------------------------------------------
Accessible by group timesten
End of report
$ ps -ef|grep -i timesten
oracle    3072     1  0 04:12 ?        00:00:00 /home/oracle/tt181/install/bin/timestend -initfd 13 -minsubs 2 -boot
oracle    3076  3072  0 04:12 ?        00:00:00 /u01/installation/tt18.1.2.1.0/bin/timestensubd -verbose -id 1000000 -facility user
oracle    3077  3072  0 04:12 ?        00:00:00 /u01/installation/tt18.1.2.1.0/bin/timestensubd -verbose -id 1000001 -facility user
oracle    3079  3072  0 04:12 ?        00:00:00 /u01/installation/tt18.1.2.1.0/bin/ttcserver -verbose -id 1000002 -p 6625 -facility user -group timesten
oracle    5171  5135  0 04:14 pts/0    00:00:00 grep --color=auto -i timesten

创建数据库

进入配置文件目录,编辑DSN配置文件sys.odbc.ini:

cd $TIMESTEN_HOME/conf
vi sys.odbc.ini

创建新DSN,本例为TTDB。在[ODBC Data Sources]一节中添加一行:

[ODBC Data Sources]
...
TTDB=TimesTen 18.1 Driver
...

创建一新的小节[TTDB]如下,其中内存大小的单位为M:

[ODBC Data Sources]
TTDB=TimesTen 18.1 Driver[TTDB]
Driver=/home/oracle/tt181/install/lib/libtten.so
DataStore=/u01/database/data/ttdb
LogDir=/u01/database/log
PermSize=512
TempSize=64
LogBufMB=256
LogBufParallelism=8
DatabaseCharacterSet=ZHS16GBK
ConnectionCharacterSet=ZHS16GBK
OracleNetServiceName=orcl

注意第一节[ODBC Data Sources]中的声明也很重要,否则SQL Developer看不到此条目。

以上假设:

  • 字符集为ZHS16GBK,请与Oracle数据库字符集一致
  • Oracle数据库的TNS接口名为orcl
  • Permsize和TempSize为内存数据库的大小
    根据实际情况更改你的配置。

创建数据库:

$ ttisql ttdbCopyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.connect "DSN=ttdb";
Connection successful: DSN=TTDB;UID=oracle;DataStore=/u01/database/data/ttdb;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/home/oracle/tt181/install/lib/libtten.so;LogBufMB=256;LogBufParallelism=8;LogDir=/u01/database/log;PermSize=512;TempSize=64;OracleNetServiceName=orcl;
(Default setting AutoCommit=1)
Command> dssize
The following values are in MB:PERM_ALLOCATED_SIZE:      512PERM_IN_USE_SIZE:         14.041PERM_IN_USE_HIGH_WATER:   14.071TEMP_ALLOCATED_SIZE:      64TEMP_IN_USE_SIZE:         17.853TEMP_IN_USE_HIGH_WATER:   23.949Command> exit
Disconnecting...
Done.

设置数据库内存加载策略:

此为可选步骤。
设置加载策略为手动:

ttadmin -rampolicy manual ttdb

设置完后,以后必须用以下命令加载和卸载数据库:

ttadmin -ramload ttdb
ttadmin -ramunload ttdb

如果希望随daemon自动启动,可以如下设置:

ttadmin -rampolicy always ttdb

设置与Oracle数据库的连接

假设有一Oracle数据库,网络可达。
首先拷贝样例tnsnames.ora文件:

cp /u01/installation/tt18.1.*/network/admin/samples/tnsnames.ora $TIMESTEN_HOME/conf
chmod u+w $TIMESTEN_HOME/conf/tnsnames.ora

编辑此文件,添加Oracle数据库接口描述,也可以直接从Oracle数据库上拷贝此文件。以下为示例

$ cat tnsnames.ora
...orclpdb =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = odbserver)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orclpdb)))

需要使用ttinstancemodify来修改TNS_ADMIN,使sqlplus可以找到tnsnames.ora文件。本例设置为$TIMESTEN_HOME/conf

$ ttinstancemodifyInstance Info
-------------Name:           tt181
Version:        18.1.4.1.0
Location:       /home/oracle/tt181
Installation:   /u01/installation/tt18.1.4.1.0
Daemon Port:    6624
Server Port:    6625Would you like to change the installation that this instance points to? [ no ]The daemon for instance 'tt181' is currently configured to use port 6624.
Would you like to change this port? [ no ]
The server for instance 'tt181' is currently configured to use port 6625.
Would you like to change this port? [ no ]
TNS_ADMIN for the instance 'tt181' is currently not set.
Would you like to change TNS_ADMIN for this instance? [ no ] yes
Please enter a value for TNS_ADMIN (q=quit)? [  ] /home/oracle/tt181/confDo you want to restart the daemon using the new configuration? [ yes ]
Restarting the daemon ...
TimesTen Daemon (PID: 6392, port: 6624) stopped.
TimesTen Daemon (PID: 15305, port: 6624) startup OK.
The instance 'tt181' is now configured with :
TNS_ADMIN=/home/oracle/tt181/confWould you like to configure TimesTen Replication with Oracle Clusterware? [ no ]

TNS_ADMIN实际上重新登陆后才能生效,如果需要马上生效:

export TNS_ADMIN=$TIMESTEN_HOME/conf

使用以下的命令测试Oracle数据库联通性:

sqlplus username/password@orcl
sqlplus sys/password@orcl as sysdba

下一步

如果想快速测试缓存组,可参见Timesten Classic 18.1 建立缓存组

TimesTen Classic 18c 安装与配置过程相关推荐

  1. win7下python的安装与配置_Win7下Python与Tensorflow-CPU版开发环境的安装与配置过程...

    以此文记录Python与Tensorflow及其开发环境的安装与配置过程,以备以后参考. 1 硬件与系统条件 Win7 64位系统,显卡为NVIDIA GeforeGT 635M 2 安装策略 a.由 ...

  2. windows mysql源码安装配置_windows下MySQL5.6版本安装及配置过程附有截图和具体介绍...

    随着MYSQL版本的升级以及电脑系统的变化,我们给大家整理了种种电脑环境下安装MYSQL的图解过程,希望我们整理的内容能够帮助到大家:mysql安装图解总结 https://www.in68.com/ ...

  3. mysql安装与配置的截图_windows下MySQL5.6版本安装及配置过程附有截图和详细说明...

    随着MYSQL版本的更新以及电脑系统的变化,我们给大家整理了各种电脑环境下安装MYSQL的图解过程,希望我们整理的内容能够帮助到大家:mysql安装图解总结 https://www.jb51.net/ ...

  4. php什么设置前端代码,代码编辑器与PHPSTUDY的安装与配置过程(前端第一课)

    前端第一课:编辑器与PHPSTUDY的安装与配置过程 编辑器安装过程 1.Visual Studio Code 官网下载软件,解压下载文件,打开安装程序安装至你的计算机. 2.安装"Chin ...

  5. Win7上Git安装及配置过程 [转]

    文档名称 Win7上Git安装及配置过程 创建时间 2012/8/20 修改时间 2012/8/20 创建人 Baifx 简介(收获) 1.在win7上安装msysgit步骤: 2.在win7上安装T ...

  6. SQL Server 2008安装和配置过程

    下面我将用图解的方式,来介绍SQL Server 2008安装和配置过程,希望对大家有所帮助. 闲言少叙,直奔主题!点击setup.exe安装文件后,如果系统没有以下组件,则会出现如下提示! 安装20 ...

  7. 图解MySQL5.5详细安装与配置过程

    出自:http://www.dbhom.com/show.aspx?id=77&cid=9 MySQL是一个开源的关系型数据库管理系统,原由瑞典MySQL AB公司开发,目前属于Oracle公 ...

  8. linux下面的j2sdk的安装和配置过程

    linux下面的j2sdk的安装和配置过程! 1.下载一个Linux Platform的JDK,建议下载RPM自解压格式的 (RPM in self-extracting file,j2sdk-1_4 ...

  9. CentOS 安装 tomcat 环境安装及配置过程完整版

    CentOS 安装 tomcat 环境安装及配置过程 查看安装包信息 yum info tomcat 安装 yum -y install tomcat 查看是否安装成功 rpm -q tomcat 输 ...

最新文章

  1. golang中base64编码_MySQL中如何将字符串转为base64编码?
  2. 栈的应用_DFS解迷宫问题
  3. Android技能树 — 树基础知识小结(一)
  4. java.lang.NoClassDefFoundError: scala/xml/MetaData
  5. oracle动态采样超时,解决 ORACLE 11.2 动态采样导致的性能问题
  6. left join on and 与 left join on where的区别
  7. 微分方程在matlab中的实现,Matlab微分方程参数优化的Forcal实现
  8. 辐射4核能选项用计算机失败,gg修改器出现保护进程加载失败怎么解决 | 手游网游页游攻略大全...
  9. 数学归纳法在数据结构与算法分析设计中的应用
  10. SQL Server中, DateTime (日期)型操作的 SQL语法
  11. 语法制导的翻译是如何实现的_考研寄宿:怎样提高英语翻译的能力?
  12. 小程序键盘遮挡输入框情况之一
  13. curlopt_ssl_verifypeer后https还是验证不过_2020CNAS能力验证小总结
  14. Android Studio主菜单(Main Menu)消失后,恢复显示
  15. 网站打开慢解决办法——在Google Chrome浏览器中安装ReplaceGoogleCDN插件
  16. 国资优选—兰溪市金融控股投资有限公司思想工作会议召开
  17. 五维图matlab,五维立体图,怎么画五维图(即以五边形反映各项水平)
  18. appium 切换上下文的时候报错
  19. C语言解一元二次方程
  20. 数据库与身份认证:在项目中操作 MySQL

热门文章

  1. iOS CoreLocation和MapKit详解
  2. 2008人气最火最期待的网游10款
  3. 【自撰】zooKeeper 集成 Java代码
  4. Linux进阶学习笔记之——局域网控制者:Proxy(代理)服务器
  5. 网络夺命连环问8--说一下HTTP3牛币在哪里?
  6. 卖不掉的“爆款”,追不上的潮流,服饰业的出路在哪里?
  7. 小米手机 java 代码无法连接短信_小米手机无法接受和发送短信,为什么?
  8. codeup 结构体输入输出问题 B: C语言11.2
  9. 三国杀游戏基于.NET,Winform(开源项目长期维护)毕业设计C#
  10. 安卓模拟器和pc进行Socket连接--app和pc通信