TimesTen Classic 18c 安装与配置过程

2024-02-04 13:18

本文主要是介绍TimesTen Classic 18c 安装与配置过程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

参考

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 安装与配置过程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/677628

相关文章

浅析Spring Security认证过程

类图 为了方便理解Spring Security认证流程,特意画了如下的类图,包含相关的核心认证类 概述 核心验证器 AuthenticationManager 该对象提供了认证方法的入口,接收一个Authentiaton对象作为参数; public interface AuthenticationManager {Authentication authenticate(Authenti

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

Centos7安装Mongodb4

1、下载源码包 curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.1.tgz 2、解压 放到 /usr/local/ 目录下 tar -zxvf mongodb-linux-x86_64-rhel70-4.2.1.tgzmv mongodb-linux-x86_64-rhel70-4.2.1/

hadoop开启回收站配置

开启回收站功能,可以将删除的文件在不超时的情况下,恢复原数据,起到防止误删除、备份等作用。 开启回收站功能参数说明 (1)默认值fs.trash.interval = 0,0表示禁用回收站;其他值表示设置文件的存活时间。 (2)默认值fs.trash.checkpoint.interval = 0,检查回收站的间隔时间。如果该值为0,则该值设置和fs.trash.interval的参数值相等。

NameNode内存生产配置

Hadoop2.x 系列,配置 NameNode 内存 NameNode 内存默认 2000m ,如果服务器内存 4G , NameNode 内存可以配置 3g 。在 hadoop-env.sh 文件中配置如下。 HADOOP_NAMENODE_OPTS=-Xmx3072m Hadoop3.x 系列,配置 Nam

作业提交过程之HDFSMapReduce

作业提交全过程详解 (1)作业提交 第1步:Client调用job.waitForCompletion方法,向整个集群提交MapReduce作业。 第2步:Client向RM申请一个作业id。 第3步:RM给Client返回该job资源的提交路径和作业id。 第4步:Client提交jar包、切片信息和配置文件到指定的资源提交路径。 第5步:Client提交完资源后,向RM申请运行MrAp

wolfSSL参数设置或配置项解释

1. wolfCrypt Only 解释:wolfCrypt是一个开源的、轻量级的、可移植的加密库,支持多种加密算法和协议。选择“wolfCrypt Only”意味着系统或应用将仅使用wolfCrypt库进行加密操作,而不依赖其他加密库。 2. DTLS Support 解释:DTLS(Datagram Transport Layer Security)是一种基于UDP的安全协议,提供类似于

Centos7安装JDK1.8保姆版

工欲善其事,必先利其器。这句话同样适用于学习Java编程。在开始Java的学习旅程之前,我们必须首先配置好适合的开发环境。 通过事先准备好这些工具和配置,我们可以避免在学习过程中遇到因环境问题导致的代码异常或错误。一个稳定、高效的开发环境能够让我们更加专注于代码的学习和编写,提升学习效率,减少不必要的困扰和挫折感。因此,在学习Java之初,投入一些时间和精力来配置好开发环境是非常值得的。这将为我

【Python编程】Linux创建虚拟环境并配置与notebook相连接

1.创建 使用 venv 创建虚拟环境。例如,在当前目录下创建一个名为 myenv 的虚拟环境: python3 -m venv myenv 2.激活 激活虚拟环境使其成为当前终端会话的活动环境。运行: source myenv/bin/activate 3.与notebook连接 在虚拟环境中,使用 pip 安装 Jupyter 和 ipykernel: pip instal